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

0x50 and 0x51 STALK datagrams not compliant with the current SK document schema #154

Closed
raffmont opened this issue Aug 19, 2019 · 1 comment

Comments

@raffmont
Copy link
Contributor

STALK sentences about 0x50 (latitude) and 0x51 (longitude) datagrams are corrected parsed extracting the latitude and the longitude from the Raymarine Seatalk connection (I'm using the great Digital Yacht ST2NMEA USB converter).

The signalk-parser-nmea0183 component map SeaTalk latitude and longitude as follows:

"position": {
"meta": {
"description": "The position of the vessel in 2 or 3 dimensions (WGS84 datum)"
},
"latitude": {
"value": 40.76733333333333,
"$source": "USB0.ST",
"timestamp": "2019-08-19T11:31:30.207Z",
"sentence": "ALK"
},
"longitude": {
"value": 14.029,
"$source": "USB0.ST",
"timestamp": "2019-08-19T11:31:30.271Z",
"sentence": "ALK"
}
},

This approach worked fine with the previous version of the SK document schema (it was working in August 2018), but now the SK document schema states the following data structure for position:

"position": {
"meta": {
"description": "The position of the vessel in 2 or 3 dimensions (WGS84 datum)"
},
"value": {
"longitude": 14.029055,
"latitude": 40.767511666666664
},
"$source": "USB1.GP",
"timestamp": "2019-08-19T11:31:31.000Z",
"sentence": "RMC"
},

Apparently, with the new SK document schema it is mandatory update both latitude and longitude at the same time.

Basically the 0x50.js hook should know the value read from the previous execution if the 0x51.js hook and inject both latitude and longitude in the document and viceversa with 0x51.js and 0x50.js.

Bast regards.
Raffaele

@raffmont
Copy link
Contributor Author

I worked on fix this issue. A pull request #155 has been submitted. I tested the solution on the boat right now and it works. Both fields navigation.position and navigation.datetime are correctly set.
The plugin set-system-time works correctly with datetime set by SeaTalk network.
I'm using Digital Yacht ST2NMEA USB interface set as full STALK data source (https://digitalyacht.co.uk/product/st-nmea-usb/).

@tkurki tkurki closed this as completed in ec2e6d9 Aug 20, 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

No branches or pull requests

1 participant