View Single Post
  #7   Spotlight this post!  
Unread 09-10-2013, 09:42
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Suggestions on a good way to get angle?

Quote:
Originally Posted by mkaa00x View Post
o get the answer for the value of the angle made by the CIM and basically set a value, until angle reaches approximately point A, keep making the CIM spin in 1 direction.
Unless you have a "one direction only" requirement, that's not how it should work.

Say you're at an angle of 85 degrees and you want to be at 80 degrees. Wouldn't it be better to go back 5 degrees than to go forward 355 degrees?

BTW, the C++ WPILib code does exactly that:

Code:
 *  Set the PID controller to consider the input to be continuous,
 *  Rather then using the max and min in as constraints, it considers them to
 *  be the same point and automatically calculates the shortest route to
 *  the setpoint.



Reply With Quote