|
Re: Angle from X,Y
The inverse tangent function (arctan) will give you the angle from the origin to a point. For example: given (x,y), arctan(y/x) = the angle from the origin to the point (x,y).
If you search CD for something like "arctan" or "trig" or "trigonometry", you should get a fair amount of results already covering implementation of trigonometric functions on the FRC controller.
I don't have any experience using these, myself, but I've heard that a few teams have had success with using an arbitrary degree Taylor series approximation of trig functions.
__________________
I played hacky sack with Andy Baker.
2001-2004: Team 258, The Sea Dawgs
2005: Team 1693, The Robo Lobos
|