-
Notifications
You must be signed in to change notification settings - Fork 48
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
callsignVhf not according to the spec #221
Comments
What's the OCPN issue here? When parsing AIVDM O checks message 5 and 24 |
N2k-Signalk does not include callsignVhf at all currently. Just created a PR there - see link above. |
From the spec you refer to the path would be the one we use in O?
I'm sorry but do not understand why an issue here, or is it still anything to change in O? |
@Hakansv no issue in O. @wellenvogel please check again https://github.com/SignalK/nmea0183-signalk/blob/master/hooks/VDM.js#L189-L190 Usually you send a path to a leaf value and the value in the delta. That is handled by the conversion to Full model by adding timestamp and source information to the leaf value and if there are multiple sources for that particular path the multiple values handling kicsk in and creates the values substructure. But what if we want a plain value in the leaf? There's special provision in the delta to full conversion that merges the data from pathValues with an empty (non null) path's value with the full data. So to set callsignVhf to a string value you send a delta that has a pathvalue with an empty path and a nested object structure communication => callsignVhf => value. |
Not sure what you mean. |
@tkurki
(2) When I changed lines 187++ to
I receive:
(My) conclusion: |
The JSON schema files in specification are the real master data for the schema and Appendix A Keys reference is derived from that. JSON schema is much more expressive, but hard to understand and we created keys reference for humans, but it is not complete. In JSON schema To validate nmea0183-signalk output we can convert the delta to full data and validate that with This is the approach in used in many tests in nmea0183 and n2k converters. The difference between the values with metadata and values without it is confusing. We went a little overboard with "one full model and associated schema to rule them all" idea and deltas, that are actually often much more relevant and convenient, came later. Something to improve on in a subsequent SK version. |
Ok, played a bit with the tests.
whereas callsignVhf will come as:
no $source, no timestamp, no meta - and even no "value" property. I understand that it works right now the way you described - but for me (as a user) it's nearly impossible to get an idea about what to expect at the API by looking at the documentation. |
When decoding AIS data (AIVDM) the decoder creates at vessels//communication an object with the following layout:
{"callsignVhf":"DQGG"}
.According to the spec the decoder should instead generate a simple string value at:
vessels//communication/callsignVhf.
https://signalk.org/specification/1.5.0/doc/vesselsBranch.html#vesselsregexpcommunicationcallsignvhf
Seems a bug to me.
The text was updated successfully, but these errors were encountered: