-
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
Meteorological and hydrographic data from AIS VDM binary message 8 #245
Conversation
Meteo data functions are now re-checked and some fixes implemented. Should be ready for merge. |
@Hakansv here's the work in progress of implementing AIS meteo data in 0183-signalk. |
See also OpenCPN/OpenCPN#3541 |
Very good. Some comments: I miss the time stamps. Needed to info about issued time. horizontalVisibility: The most significant bit is an indication for a static value or a greater than or equal value. Do you handle that? If MSB is high we may need a tag for that? Position and e.g. air temperature are as per 2's complement to get + or - signs. How do you handle that? MMSI numbers: Håkan |
Bug fixes for ggencoder of VDM msg8 are still pending release to npmjs. Otherwise fixes are merged to code. https://github.com/fulup-bzh/GeoGate/commits/master/ Other part is is this update to VDM code. If it looks ok, then we are very close to have VDM msg8 support in SK. |
This can be added.
I'll take a look to this.
Encoding done in ggencoder and it has support for msg8 now. Lat&Lon calculations have still issue and fix not released to Npmjs. Merged to code.
This part requires a bit refactoring if AtoNs reuse MMSI code. Need to add check for position too. |
For the MMSI number it's not only reuse of single AtoN numbers. For Sweden about 80 stations have the same MMSI number. UK, Finland and many others use the same system. |
Btw: The horizontal visibility ">" sign is here |
Is OCPN decoding Msg8 DAC 1 FI 11 messages? These messages should be deprecated 10y ago, but still those seems to be in use, mainly U.S. Msg 8 DAC 1 FI 31 are currently added to ggencoder. I'm not familiar U.S. addons. My code is based on IALA data Msg8 DAC 1 FI 11 |
No.
There are some US data in the air. But can be discussed later. Let's start with dac 1 fi 31.
Hmm. A quick test of dac 001 Fi 11 and there are some data in the air now. According to mmsi 002300061 probably Finnish. I'll look further into this and consider implementation. It may be the same data is in dac 001 Fi 31? Not less since the same mmsi is present also there. Thanks for the links. |
In principle I am not fond of making up mmsi numbers. I think on the SK side we don’t need that, as we could use uuid’s as context, the id that is used for identifying the entity that the data is for. Another option would be to create a new ”mmsi like” context type: use some other prefix than |
OCPN is using 1994+ running number. AtoN ID might then change from time to time.
|
OCPN use an own data base for meteo stations. Every received message is compared by it's position to detect if that station is received before. If so the message mmsi ID is reused. If not found a new mmsi-ID is assigned for the station at that position. See attached example. Origin and "fake" mmsi are both shown.
|
Would this work? What is probability that other AtoN has same first 3 decimals for lat & lon?
|
The construction would probably work as such. But not for SignalK as a distributed system. |
If SK data is proxied and distributed outside private network, then fake ID is a big show stopper. But situation is as bad if same AtoN MMSI contains data from multiple places and that is distributed outside private networks too. I see no good solution... |
New lib version 1.0.7 should be online |
@Hakansv do you have test/real life data available that you could share with us for development & verify purposes? |
@KEGustafsson links to my test server below. Welcome.. |
Agree. What you can do is to forward the mmsi logic you receive from the Meteo issuer. As the VHF AIS system does now. One possible adding: We, OCPN, has introduced a new "sensors.ais.class" called "METEO". You could do the same and add that value for all Ais8_Dac001:Fi31 targets? (And further Ais8_Dac367_Fi33) |
Another viewpoint: normal AIS messages are for a vessel/aircraft/something with an identity and a position. These messages are different in that the identity is the sender, not the "thing" that the data is for, and the position is not the position of the "thing" but the observations. So we have two things to play with in SK: the identity and the position. One obvious discrepancy that I assume you addressed in O is that a track for these observations makes no sense as the position is not |
@tkurki It's correct a Meteo station is a stable point not moving and thus all trace info in OCPN are abandoned. This is to compare with Meteo data from Ais8_Dac367_Fi33 described here where each station also has a more or less common MMSI but also a Site-ID constructed so that the combination MMSI and Site-ID are always unique. That logic is also reused in OCPN when we assign such a station to our local mmsi-ID 1994-series. It could be SK can do something similar? Make a "MeteoPoint-ID". Edit: And if I understand you correct; when using "environment.observations" the Class A confusion may be automatically solved since such a data collection would not be mixed with other target "updates"? |
Did I understood correctly? Would it be something like this? E.g. Data taken from https://meri.digitraffic.fi/api/sse/v1/measurements |
I think we can start tying up the loose ends here:
|
@tkurki |
I'd also like to put on the table for re-consideration the following paths which have been assigned object values. Similarly for The justification being that VDM messages are not the only likely source of weather data and it should be straight forward to align values. |
This is already done by @KEGustafsson |
I would say not.
Good reasoning, fully agree |
Yes also to current set and drift. |
Last fix tested successfully. |
@tkurki @panaaj What is the status with this PR? Any more modification required? @afischerdev Is ggencoder ready to release a new version to npmjs? This one depends on that one. |
Yes, I could do that. When you say the current status is alright for your needs. |
Upon resolution of the following points I am OK with it:
|
FYI Freeboard-SK v2.5.0 release has support for this PR. |
OpenCPN will also have support as soon this PR is implemented and validated there. |
There is investigation going on about meta if feasible to add here. Because this is not normal plugin, there is no plugin methods to add functionalities. |
I started adding some tests. The first line of Håkan's test data file |
The test naturally fails, because there is no ggencoder with these features published yet. |
@tkurki |
But producing a "home made" full ISO string from date, hour, minute can of course give strange value also live. If for example the sensor's time in the AIVDM sentence is 31-23:59 and "now"-time is two minutes later the fictional ISO date format will be in future. |
@afischerdev Can you release & publish ggencoder? All fine from this point of view. @tkurki Date is partially parsed & generated as it is lacking year details as @Hakansv commented earlier. Can we omit year in the date test? |
New version [email protected] is online,, please see |
Minor updates to VDM tests and now those are passed too. |
Dual sentence VDM meteo test case added to increase test coverage. |
@tkurki |
Meteorological and hydrographic data from AIS VDM binary message 8 mapped to Signal K paths with
contextPrefix = 'atons.'
.Resolves issue #244
!AIVDM,1,1,1,B,8>h8nkP0Glr=<hFI0D6??wvlFR06EuOwgwl?wnSwe7wvlOw?sAwwnSGmwvh0,0*17