1

I'm working on a 2d (x,y) plane. I have the initial point, a length and a bearing relative to north-aviation style bearing. Can someone help me calculate the end point of this line? I've seen a few different formulas but my maths isn't great so I'm not sure if they are correct.

Thanks

drunkmonkey
  • 1,111
  • 1
  • 17
  • 27
  • Off-topic: this isn't a programming question... – Oliver Charlesworth Jan 13 '13 at 20:19
  • It might not be a 'programming' question but once I know how to solve this I will adding the code/converting the formula to code to my application. I've seen similar questions which received answers and weren't denounced as off-topic. – drunkmonkey Jan 13 '13 at 20:57
  • Sure. But the most appropriate thing to do would be to pick up an introductory maths book that covers trigonometry and geometry. Because my guess would be that this isn't going to be the only trig problem you encounter... – Oliver Charlesworth Jan 13 '13 at 20:58
  • possible duplicate of [Calculate second point knowing the starting point and distance](http://stackoverflow.com/questions/2187657/calculate-second-point-knowing-the-starting-point-and-distance) – Peter O. Jan 13 '13 at 22:46

1 Answers1

1

Try this

Sketch

where r is the distance and t the angle (in radians). Note the +y is towards North.

John Alexiou
  • 28,472
  • 11
  • 77
  • 133
  • 1
    That should be a plus sign in the formula for x_B if positive x points east, as it should in a right handed coordinate system. – duffymo Jan 13 '13 at 23:14
  • Oh yes, the positive angle is CW and not CCW. Fixed. – John Alexiou Jan 14 '13 at 16:38
  • No, in a right handed coordinate system the angle is zero at the x-axis and is positive in the CCW direction. Your coordinate system is left handed if CW is positive. – duffymo Jan 14 '13 at 16:57
  • I added a picture which should explain my choice of signs. – John Alexiou Jan 14 '13 at 20:28
  • I think the second equation is incorrect; the sign should be negative; -r*cos(t). The convention that I gave you is the most common one. Make t = 0 at the x-axis and your life will be much, much better. – duffymo Jan 14 '13 at 20:34