Open rezder opened 3 years ago
In VHW.js https://github.com/SignalK/signalk-to-nmea0183/blob/1cabd1357cf182f73ba632f61aaa6c2e20af3357/sentences/VHW.js#L22 you are adding the magneticVariation to headingTrue to get the headingMagnetic should you not subtract.
From the documentation on https://signalk.org/specification/1.5.0/doc/vesselsBranch.html
Description: The magnetic variation (declination) at the current position that must be added to the magnetic heading to derive the true heading. Easterly variations are positive and Westerly variations are negative (in Radians).
i agree with the statement of rezder! Line 22 should be changed to: var headingMagnetic = headingTrue - magneticVariation
In VHW.js https://github.com/SignalK/signalk-to-nmea0183/blob/1cabd1357cf182f73ba632f61aaa6c2e20af3357/sentences/VHW.js#L22 you are adding the magneticVariation to headingTrue to get the headingMagnetic should you not subtract.
From the documentation on https://signalk.org/specification/1.5.0/doc/vesselsBranch.html
Description: The magnetic variation (declination) at the current position that must be added to the magnetic heading to derive the true heading. Easterly variations are positive and Westerly variations are negative (in Radians).