# Trigonometry - Bearing

• January 18th, 2012, 01:41 PM
L8TON
Trigonometry - Bearing
Im not sure if this is the correct place to post this question....but here it goes.

I have a task of being able to program a Class in Java to calculate the bearing from North to a point. The only objects that are known are 2 positions, both have a bearing from North and the distance from 0. So for example - position 1 - 30 degrees and 10m, position 2 - 190 degrees and 50m. How would you calculate the bearing if you wanted to travel from position 1 to position 2. I can calculate the distance between the 2 positions using the cosine rule, but have no idea how to create a class that will accuratly calculate the bearing in different scenarios?

Any help or advise would be greatly appreciated.
• January 18th, 2012, 05:03 PM
pbrockway2
Re: Trigonometry - Bearing
With the cosine rule you have found the sides of the triangle. And you already know one of the angles: that of the given sides at the origin.

Use the sine rule to determine the angle at one end or the other of the side whose length you have just found.