2022-04-15, 02:56 AM
(2022-04-15, 02:12 AM)dreeas Wrote: Wont that also be 180 degrees off? Since -3.14 is 180 degrees.
0 is 0 degrees true north. -3.14 is 180 degrees counterclockwise and 3.14 is 180 degrees clockwise.
In java, how can I write:
if >0 *180/pi (positive radian)
<0 *180/pi + 360 (negative radian)
If I do that I guess it should be right.
take a look at some of the other .js files in the Calc directory of Derived data, some of them have statements like that - try SteerError - I wrote that one and it resolves the difference between bearing to a waypoint and current course in terms of Steer right and steer left