Thread: Angle from X,Y
View Single Post
  #10   Spotlight this post!  
Unread 12-04-2004, 16:29
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
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