-
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
feature: add support for satellite data (GSA, GSV) #187
Conversation
I've tried the GSV from branch sats-in-view and it's not working. No GPGSV is read. My GSV looks like this. (For test: TCP; signalk.stupan.se port: 10112)
Following the recommendation in the note below from the specification for GSV: (probably older than 4.11) So Notes: 1 (from spec 4.11) Satellite information may require the transmission of multiple sentences all containing identical field formats when sending a complete message. The first field specifies the total number of sentences, minimum value 1. The second field identifies the order of this sentence (sentence number), minimum value 1. For efficiency it is recommended that null fields be used in the additional sentences when the data is unchanged from the first sentence. |
Thanks, fixed to work without repeated fields. |
@tkurki
When these new paths are agreed to update the SK specification we will adapt it into O code as well. Thanks. |
@tkurki One level of object is no problem:
The we code:
But...
This one is easy and works fine: But how can I parse the satellites: value and like "elevation": value? |
@tkurki Håkan |
Yes. I'll update my code soonish. |
OK, good. I can PR my changes if you want? |
I force pushed a slightly modified version of what you had. I don't want to loose precision by rounding, even if it does not really matter in this case, and numbers should be numbers. I also changed the count field to |
@tkurki |
@tkurki |
@tkurki
|
Next steps: Add support for multiple gnss systems
Check that this is in line with what we already have in the specification
Add support for the same stuff in n2k-signalk
|
NMEA0183 using talker ID to identify the GNSS systems fits very badly with how Signal K is using talker id. SK has the concept of a source, that translates roughly to a sensor. In N2K it is a device on the N2K bus, in 0183 it is a talker. So in data from 0183 the source is a combination of a (connection) label/id (assigned in the SK server UI by the user) and the talker ID.
Data with differerent talker IDs therefore look like data from two different devices. I am not sure how to solve this. One way would be to add a configurable option to a NMEA0183 connection, that would tell the parser to use a generated talker id, like A place where this fails is data log files, where the connection label/id is not stored at all. That we can solve by including the label id in the data logs and a bit of defensive coding for backwards compatibility in playback. That leaves the problems
One totally new avenue would be to create a new mechanism, where this kind of metadata about a sensor would end up under ping @sbender9 - do we have something that puts this kind of data under |
The TalkerID, for GSV, is nothing else than a satellite system pointer. That is; "for what satellite system are the constellation data in the message referring to." So GSV is sent from the receiver in up to six groups divided per sat system. All in one second. The talkerID is the group divider. So, apart from most other NMEA messages, the GSV-TalkerID is essential and unique info. For other messages like e.g. xxRMC we don't need to care about the TalkerID to use the messaged data. The GSV TalkerID info belongs to every single message and can't be stored anywhere else. I understand this doesn't comply with the SK way of handling the TalkerID. It's the same for OCPN where we until now don't care about the TalkerID to use the info. The NMEA0183 specification for this seems also a to be a "quick" solution apart from how they normally handle data info. So my question is still if SK could implement the TalkerID info for the GSV message beside the "count" path? The value for "count" is actually the number of sats for the "TalkerID"-system. How the N2k specification handle this I don't know but it would be in some similar way. Satellite constellation data would belong to a single satellite system in the same way for every GNSS receiver. |
I understand and I am not saying that SK is correct, just saying how it is. Supporting only NMEA0183 in a NMEA0183 specific way is not a good option. Let's try to find out more about how this is in N2K. |
Very good. |
Here are the states per satellite in current canboat https://github.com/canboat/canboat/blob/master/analyzer/pgns.json#L14805-L14810 Real world example data https://gist.github.com/tkurki/f98c6f2f0d3b2dff6912706a7c88fee0 |
The PGN 129793 would be closest: (But search for e.g. Galileo and there are three more PGNs But Canboat PGN's are missing a few GNSS types: |
Sorry, correction! PGN would be 129029. The one above is for AIS. |
@tkurki |
Published in version 3.10.0. |
No description provided.