View Single Post
  #25   Spotlight this post!  
Unread 03-02-2013, 09:53
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Move Robot a set angle

Quote:
On the other hand, if I wanted to turn the robot to an absolute heading, I would probably...you know what, I'm not sure. All my ideas thus far would eliminate the problem of whirling in circles when going from, say, 2520 degrees to 45. But all my ideas would not fix the problem of going from 359 to 0.
Circular coordinate systems have many values that encode the same angle.
Mod or Quotient and Remainder will collapse them into those represented in a single circle. As you noted, there are still two useful solutions to your 359 move to 0. You can move 359 degrees one direction or 1 degree the other.

You usually want to select the movement with the smaller absolute value. So you need mod, and you need to consider both the positive movement and negative movement. For crab systems or turrets, there is usually a further restriction that may invalidate one of the solutions -- cables only stretch and twist by so much.

I'd highly recommend you develop your input filter as a separate VI and test it for the full range of values it is to deal with. Often it is useful to plot the output versus input and sweep across the range of values at some resolution.

Greg McKaskle