|
Re: Angle from X,Y
This is the formula that LeoM posted a while back to get the angle from rectangular coordinates. Worked extremely well back in 2002
Temp1 was the positive distance in X direction
Temp2 was the positive distance in Y direction
temp3 = (temp2*127) / SQR((temp1*temp1)+(temp2*temp2)) 'Make values on a 127 unit circle
ss_degrees = ((1-(temp3/118))*(((temp3+181)*temp3+744)/769))+((temp3/118)*(((((3*temp3-707)*temp3+42611)/20))+((temp3-115)/3)))
ss_degrees = (ss_degrees*180)/128 'Convert to Degrees
__________________
Robonaut Next Generation Control System Development
2003 GLR Champions (302,67,226)
2003 Buckeye Semi-Finalists(902,494,226)
2002 Nationals QuarterFinalists
2001 West MI QuarterFinalists
2000 GLR Semi-Finalists
|