Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bearings as Direction [0,360] instead of Angles [-180,180] #106

Open
RhumbRunner opened this issue Apr 12, 2022 · 1 comment
Open

Bearings as Direction [0,360] instead of Angles [-180,180] #106

RhumbRunner opened this issue Apr 12, 2022 · 1 comment

Comments

@RhumbRunner
Copy link

Calculations for Course DTG, XTE, BRG, etc (based on courseGreatCircle.nextPoint / previousPoint) creates negative values for the bearingTrue and bearingMagnetic which is the calculated angle from North (0 Deg True) to the next point. So to get the compass bearing to steer to the next point you would have to subtract the value from 360. Shouldn't it always be a value (in Degrees) between 0 and 360? or expressed in radians 0 to 6.283185 (2xPi)? The negative numbers are seen only when the bearingTrue should be from 180 to 360. It seems to work right when its between 0 and 180. Both Freeboard and Kip don't have a way to convert the negative values back to the real heading you would need to know. Seems like a massive error in the plugin to me?

Bottom line... Shouldn't all course values be direction [0,360] in stead of angles [-180,180]

@RhumbRunner
Copy link
Author

RhumbRunner commented Jul 20, 2022

I don't know how to Fork but, here is my code that puts out the directions in a direction [0,360] in the SI Radians. if someone could evaluate it and possible merge it into the next release... Thanks
courseData.js.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant