View Single Post
  #4   Spotlight this post!  
Unread 28-05-2013, 14:56
apples000's Avatar
apples000 apples000 is offline
Registered User
no team
 
Join Date: Mar 2012
Rookie Year: 2012
Location: United States
Posts: 222
apples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant future
Re: Java Swerve Drive Math Inconsistencies

Quote:
Originally Posted by Ether View Post

Is there a reason you left out the "if(max>1)" part of the normalization?

Code:
if(max>1){ws1/=max; ws2/=max; ws3/=max; ws4/=max;}
Yup, that was the problem. Now it works great. The difference between the swerve calculator program and Ether's spreadsheet and the cRIO is < 0.01, so I'm happy. It also explains why the swerve calculator sometimes comes up with a solution that has a wheel speed > 1.