| | Navigation & Encoders
|
| I know this is not really handyboard specific but hey... Does anybody know the equation for finding a heading (theta) from a current position P(x,y) to a goal position G(x,y). I sure there's a tangent in there somewhere but I've already dredged up (...) (25 years ago, 4-May-99, to lugnet.robotics.handyboard)
| | | | Re: Navigation & Encoders
|
| (...) The angle relative to the x axis is given by: theta = arctan((y2 - y1)/(x2 - x1)) Remember, the tangent of an angle is the length of the opposite side divided by the length of the adjacent side of the corresponding unit right triangle (i.e., (...) (25 years ago, 4-May-99, to lugnet.robotics.handyboard)
| | | | Re: Navigation & Encoders
|
| (...) Dear Andrew, You want the angle that line joining G and P make with X axis. That is arctan of the slope of the line from P to G. slope =(yP-yG)/(xP-xG) hence, theta = arctan ((yP-yG)/(xP-xG)) where P=(xP,yP) and G=(xG,yG) Note that this angle (...) (25 years ago, 5-May-99, to lugnet.robotics.handyboard)
| |