How do I determine if there is a courseOverGroundMagnetic?

Subj.
11 Replies
PaddyB
PaddyB3mo ago
Click on data browser and type a few letters in the search
No description
Владимир Калачихин
@PaddyB, you didn't understand the question.
PaddyB
PaddyB3mo ago
that's what it sounded like you asked, "is there courseOverGroundMagnetic?" Try asking differently maybe?
Teppo Kurki
Teppo Kurki3mo ago
i don't understand your question any better than Paddy does
Владимир Калачихин
Heh. As knew, the NMEA0183 VTG sentence (and other) has no differences between 0 magnetic course and no magnetic course. But SignalK must have. But I see that courseOverGroundMagnetic == 0 instead null when the VTG field three in all sentences == 0. So yes, I asked, "is there courseOverGroundMagnetic?"
Teppo Kurki
Teppo Kurki3mo ago
If the VTG field is empty then sk value is null. Zero in VTG converts to zero in SK
Teppo Kurki
Teppo Kurki3mo ago
GitHub
nmea0183-signalk/hooks/VTG.js at master · SignalK/nmea0183-signalk
NMEA0183 to Signal K parser. Contribute to SignalK/nmea0183-signalk development by creating an account on GitHub.
Владимир Калачихин
A small part of GNSS receivers send empty if no magnetic course. Majority send 0. Well, you'll have to make a crutch again, instead of just using SignalK.
Scott Bender
Scott Bender3mo ago
What I if the heading really is zero?
Teppo Kurki
Teppo Kurki3mo ago
Well, we can change things if it makes sense. Cog from gnss is probably extremely rarely exactly zero, so treating zero as invalid makes sense if that is how things mostly work Are you talking about magnetic specifically? Or are you saying that if both magnetic and true are zero then the input is invalid?
Владимир Калачихин
Just I doing a display of courseOverGroundMagnetic in my new plugin 🙂 But yes, in NMEA0183 mostly no difference between 0 and no value (AIS has it). The gpsd somehow solves this problem, but no SignalK. A naive approach can be suggested: if the value == 0 during of n seconds then the value = null. I'm going to implement it.