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

SeaTalk composite data management #155

Closed
wants to merge 7 commits into from
Closed

Conversation

raffmont
Copy link
Contributor

SeaTalk produces different datagrams for position (0x50, 0x51) and for datetime (0x54, 0x56).
This pull request fixes the issue #154 about the navigation.position and (topic not covered by the issue, but related to the same behaviour) navigation.datatime.
In order to solve the composite data management, two module global data structure are used:
position - for latitude and longitude
datetime - for date (year, month, day) and time (hour, minute, seconds, milliSeconds)
In 0x50 and 0x51 hooks, a SignalK update is created if and only if both latitude and longitude have been already read.
In 0x54 and 0x56 hooks, a SignalK update is created when both data and time have been already read.

@tkurki
Copy link
Member

tkurki commented Aug 19, 2019

Module globals will not work correctly if the system has more than one STALK source. See https://github.com/SignalK/signalk-parser-nmea0183/blob/master/hooks/VDM.js#L51-L53 on how to use a session for managing state.

@raffmont raffmont closed this Aug 19, 2019
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

Successfully merging this pull request may close these issues.

2 participants