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

Question about 'not available' values and nulls #27

Open
chelliwell opened this issue Jan 28, 2020 · 0 comments
Open

Question about 'not available' values and nulls #27

chelliwell opened this issue Jan 28, 2020 · 0 comments

Comments

@chelliwell
Copy link
Contributor

Hi. I'm working through our shim between AisParser and our database and have noticed some inconsistency.
I'd got the impression (probably from looking at one particular parameter yesterday) that you weren't intercepting the "not available" values when parsing the bits. However I've just spotted that you do set null values in (for example) ReadRateOfTurn and ReadTrueHeading. Whereas you don't in (for example) ReadSpeedOverGround and ReadCourseOverGround.

It's debatable whether the 'not available' value (e.g. 511) should be passed back as-is, or intercepted-and-nulled - we had a long conversation ourselves this morning about which is best in later processing.
Our reasoning (in the context of our particular project): we have a wrapper around AisParser to convert a message into a 'dynamic data record' and/or a 'static/voyage data record'. The calling code doesn't know about the individual message types, it just gets the record(s) back.
So if the 'not available' values are nulled by AisParser, then that calling code can't differentiate between "the parameter has a 'not available' value in the message" compared with "the message [type] doesn't include that parameter". e.g. Rate Of Turn in a Position Report (1) vs. a StandardClassB (18).

It's not a killer for us at present, but if our customer needs us to process stuff differently in the future then it could be - so just thought I'd raise it with you for possible consideration/discussion! Cheers.

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