ATM I'm finishing up converting some of the original node-nmea codecs to output Signal K, and adding tests.As soon as that's done, I'll put the code on github.
--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
State (I assume you mean Status field from RMC) doesn't make any sense. Lots of 0183 messages have the validity fields. I think SignalK should ignore invalid messages. The only other option I see is that each RMC-derived value has validity flag, or if the default is that data is valid a flag indicating that the data is invalid.
Other stuff:(A) I would like to see more info in the source. With multiple (0183) sources I want to know where the data is coming from, in my case for example /dev/plotter and /dev/vhf (USB adapters named by udev).
(B) How do we deal with multiple concurrent values from multiple sources for the same piece of information in the tree? Example is Vessel Heading in N2K feed from Freya atOne option is that the leaf value is either {value:...} or [{value:...},{value:,,,}], but it makes things iffy.
Also the same information is coming in different 0183 sentences with possibly different update rates. Should they be separate or the same? Include the sentence in the data item? For N2K each source has an id, which should be there.
(C) Longitude and latitude as different, unrelated values doesn't make any sense in electronic navigation, or can somebody name a relevant source that produces discrete values for these? I would prefer GeoJSON "coordinates": [125.6, 10.1] notation (optional elevation not really relevant I guess), crs is WGS84 unless specified as in GeoJSON
On Tue, Apr 8, 2014 at 1:08 PM, Teppo Kurki <t...@iki.fi> wrote:State (I assume you mean Status field from RMC) doesn't make any sense. Lots of 0183 messages have the validity fields. I think SignalK should ignore invalid messages. The only other option I see is that each RMC-derived value has validity flag, or if the default is that data is valid a flag indicating that the data is invalid.I agree, we shouldn't include validity flags in the model. However, SignalK conformant servers should log them somewhere and send an alarm message if some threshold is crossed (e.g. 15 invalid depth readings in a row or x number in the last minute or something). However, this is an implementation detail and not a data model issue. My vote is drop them from the model.
Other stuff:(A) I would like to see more info in the source. With multiple (0183) sources I want to know where the data is coming from, in my case for example /dev/plotter and /dev/vhf (USB adapters named by udev).I think that implies some sort of way to configure a "friendly" name in the server, no? I assume you'd rather see "Cockpit Plotter" or "Nav Station Plotter" as the source rather than /dev/plotter1 or /dev/plotter2?
(B) How do we deal with multiple concurrent values from multiple sources for the same piece of information in the tree? Example is Vessel Heading in N2K feed from Freya atOne option is that the leaf value is either {value:...} or [{value:...},{value:,,,}], but it makes things iffy.Do you want to be able to display both on the client? Or just one? If just one, Kees has mentioned some "mapping" that he has done to tell his server which sources' values should be transmitted. Personally, I don't want to see more than one instance of any value, it would be distracting. I would however like to be able to specify a precedence, e.g. for GPS coordinates: "1. GPS receiver on stern rail, 2. Autopilot GPS receiver, 3. GPS from masthead".
Also the same information is coming in different 0183 sentences with possibly different update rates. Should they be separate or the same? Include the sentence in the data item? For N2K each source has an id, which should be there.In the case of the same info coming from the same device at different rates like "Position Rapid Update" and "GNSS Position Data", they should all be the same data item.
(C) Longitude and latitude as different, unrelated values doesn't make any sense in electronic navigation, or can somebody name a relevant source that produces discrete values for these? I would prefer GeoJSON "coordinates": [125.6, 10.1] notation (optional elevation not really relevant I guess), crs is WGS84 unless specified as in GeoJSONI think they're always together, and if having them already in GeoJSON is useful for plotting, then I say go for it. However, I wouldn't discount elevation altogether, it exists as 'Altitude' in the NMEA sentences and PGNs which deal with position, so if we're putting coordinates in an array which has space for elevation/altitude we should put it in. That said, [longitude, latitude, elevation] and not [latitude, longitude, elevation], what were they thinking?
On Tue, Apr 8, 2014 at 1:08 PM, Teppo Kurki <t...@iki.fi> wrote:State (I assume you mean Status field from RMC) doesn't make any sense. Lots of 0183 messages have the validity fields. I think SignalK should ignore invalid messages. The only other option I see is that each RMC-derived value has validity flag, or if the default is that data is valid a flag indicating that the data is invalid.I agree, we shouldn't include validity flags in the model. However, SignalK conformant servers should log them somewhere and send an alarm message if some threshold is crossed (e.g. 15 invalid depth readings in a row or x number in the last minute or something). However, this is an implementation detail and not a data model issue. My vote is drop them from the model.
Other stuff:(A) I would like to see more info in the source. With multiple (0183) sources I want to know where the data is coming from, in my case for example /dev/plotter and /dev/vhf (USB adapters named by udev).I think that implies some sort of way to configure a "friendly" name in the server, no? I assume you'd rather see "Cockpit Plotter" or "Nav Station Plotter" as the source rather than /dev/plotter1 or /dev/plotter2?
(B) How do we deal with multiple concurrent values from multiple sources for the same piece of information in the tree? Example is Vessel Heading in N2K feed from Freya atOne option is that the leaf value is either {value:...} or [{value:...},{value:,,,}], but it makes things iffy.Do you want to be able to display both on the client? Or just one? If just one, Kees has mentioned some "mapping" that he has done to tell his server which sources' values should be transmitted. Personally, I don't want to see more than one instance of any value, it would be distracting. I would however like to be able to specify a precedence, e.g. for GPS coordinates: "1. GPS receiver on stern rail, 2. Autopilot GPS receiver, 3. GPS from masthead”.
Also the same information is coming in different 0183 sentences with possibly different update rates. Should they be separate or the same? Include the sentence in the data item? For N2K each source has an id, which should be there.In the case of the same info coming from the same device at different rates like "Position Rapid Update" and "GNSS Position Data", they should all be the same data item.
(C) Longitude and latitude as different, unrelated values doesn't make any sense in electronic navigation, or can somebody name a relevant source that produces discrete values for these? I would prefer GeoJSON "coordinates": [125.6, 10.1] notation (optional elevation not really relevant I guess), crs is WGS84 unless specified as in GeoJSONI think they're always together, and if having them already in GeoJSON is useful for plotting, then I say go for it. However, I wouldn't discount elevation altogether, it exists as 'Altitude' in the NMEA sentences and PGNs which deal with position, so if we're putting coordinates in an array which has space for elevation/altitude we should put it in. That said, [longitude, latitude, elevation] and not [latitude, longitude, elevation], what were they thinking?
I use GPX for tracks, Ive also looked at using the format, but it didnt seem to fit. However [ x,y,h] seems workable. I think we should keep h, it may prove useful for vehicles other than boats, eg subs, lakes, and other uses for the format - tracking buses etc.
Multiple data source - if you wanted one resultant vaue then its a averaging algorithm or something, if you want all, then we should consider a way to do that.
Rob
On Tuesday, April 8, 2014 11:38:53 AM UTC+12, Fabian Tollenaar wrote:I've written a basic parser module based of jamesp/node-nmea (that is, I've used his codecs and helper functions).The Parser interface is implemented as a Transform stream (http://nodejs.org/api/stream.html#stream_class_stream_transform),which makes it very easy to pipe in a file stream, or a TCP stream, or a serial stream, or any other type of stream for that matter.The parser comes with a binary executable allowing you to do something like cat gps.nmea | nmea-signalkATM I'm finishing up converting some of the original node-nmea codecs to output Signal K, and adding tests.As soon as that's done, I'll put the code on github.As with node-nmea, at the moment the number of NMEA 0183 sentences it can decode is relatively small, but it's very easy to add extra codecs.After initial release, I aim to improve the codec format, and clean up the code a bit more.I'll post updates in this thread.
(B) How do we deal with multiple concurrent values from multiple sources for the same piece of information in the tree? Example is Vessel Heading in N2K feed from Freya atOne option is that the leaf value is either {value:...} or [{value:...},{value:,,,}], but it makes things iffy.Do you want to be able to display both on the client? Or just one? If just one, Kees has mentioned some "mapping" that he has done to tell his server which sources' values should be transmitted. Personally, I don't want to see more than one instance of any value, it would be distracting. I would however like to be able to specify a precedence, e.g. for GPS coordinates: "1. GPS receiver on stern rail, 2. Autopilot GPS receiver, 3. GPS from masthead”.I’m no fan of putting values in arrays. Instead, I think this should be an executive decision made on the server based on rules/configuration. The precedence idea seems best to me. To stay with GPS: server receives signals from the stern-mounted GPS and a backup GPS mouse connected to the server. Server is configured to treat stern-mounted GPS as primary and the GPS mouse as backup. In case of a bad fix or no location data for more than N seconds, a location object from the GPS mouse is used - until the stern GPS is available again.
{
"courseOverGroundTrue”: {
"source":"self”,
"timestamp":"2014-05-03T09:13:42.000Z”,
"value”:269.52
},
"location”: {“source”:”self",“timestamp”:"2014-05-03T09:13:42.000Z”,
"latitude”:52.223141,
"longitude”:4.545838,“altitude”: 22.1
},
"speedOverGround”: {
"source":"self”,
"timestamp":"2014-05-03T09:13:42.000Z”,
"value”:0.47
}
}
“velocityThroughWater”: {
"source":"self”,
"timestamp":"2014-05-03T09:13:42.000Z”,
“horizontalSpeed”: 1.3“verticalSpeed”: 0.0}}
/*
0 1 2 3 4 5 6 7 8 9 10 11 12 13 | | | | | | | | | | | | | |$GPAPB,A,A,0.10,R,N,V,V,011,M,DEST,011,M,011,M*3C
where: APB Autopilot format B0 A Loran-C blink/SNR warning, general warning 1 A Loran-C cycle warning 2 0.10 cross-track error distance 3 R steer Right to correct (or L for Left) 4 N cross-track error units - nautical miles (K for kilometers) 5 V arrival alarm - circle 6 V arrival alarm - perpendicular 7,8 011,M magnetic bearing, origin to destination 9 DEST destination waypoint ID 10,11 011,M magnetic bearing, present position to destination 12,13 011,M magnetic heading to steer (bearings could True as 033,T) *3C Checksum*/Looking at it again we should add true and magnetic bearing variants.
Rob
That said, I’d like to set up a little “social boating” experiment. I’ll put my server implementation online as soon as it’s in a useable state. Let’s set up a different thread to talk about specifics (e.g., what things do we want to do with the data. Do we just want to see each other, or do we for instance also want to communicate?)
That said, I’d like to set up a little “social boating” experiment. I’ll put my server implementation online as soon as it’s in a useable state. Let’s set up a different thread to talk about specifics (e.g., what things do we want to do with the data. Do we just want to see each other, or do we for instance also want to communicate?)My main driver for interoperability is to have a common format for communicating navigation data between a 'server' and a 'client' using today's format.Main use case is that I could download a closed or open source application, fire it up on a device that is connected to my boat's wifi hotspot and data would start flowing to the application.
Today this is impossible, as all the different equipment and applications use a multitude of nmea 0183, n2k and proprietary formats. The only common format seems to be good old nmea 0183 over tcp. That is why I need to transcode my n2k wind data to 0183 to get it to display on iNavX and iRegatta.
- wow, you've put quite a lot of effort into the whole infastructure- why Tape and not something more widely used like Mocha (maybe it's just my noobness, never heard of Tape before)
- node-nmea has some test cases, they could be adapted easily to SignalK output (https://github.com/jamesp/node-nmea/tree/master/test)
- I prefer double-space indenting, but it's your call
- is Lodash really needed? not that it is a huge deal here
- why the modes?
My next steps connected to this are- rewrite Navgauge UI to use SignalK messages- use the new parser for Cassiopeia (my boat) nmea input for the coming season
Fabian,
Good work. The concept is also quite similar to Kimmo's java marineapi (https://github.com/ktuukkan ) Its a good pattern, easily extendable and efficient. If you have a look at his code you will also see meta-interfaces (PositionSentence, HeadingSentence, etc) so when he parses a given sentence it can fire position or heading, etc events. Then I can just listen for position events and get all sources. Not sure if interfaces are possible for javascript the same way.
Rob
On Wednesday, April 16, 2014 8:34:59 AM UTC+12, Fabian Tollenaar wrote:Since the first release of the parser, I found a nasty bug when a sentence isn't in one chunk of (stream) data. This has been fixed!I'm eager to hear your feedback!
Op dinsdag 8 april 2014 01:38:53 UTC+2 schreef Fabian Tollenaar:I've written a basic parser module based of jamesp/node-nmea (that is, I've used his codecs and helper functions).The Parser interface is implemented as a Transform stream (http://nodejs.org/api/stream.html#stream_class_stream_transform),which makes it very easy to pipe in a file stream, or a TCP stream, or a serial stream, or any other type of stream for that matter.The parser comes with a binary executable allowing you to do something like cat gps.nmea | nmea-signalkATM I'm finishing up converting some of the original node-nmea codecs to output Signal K, and adding tests.As soon as that's done, I'll put the code on github.As with node-nmea, at the moment the number of NMEA 0183 sentences it can decode is relatively small, but it's very easy to add extra codecs.After initial release, I aim to improve the codec format, and clean up the code a bit more.I'll post updates in this thread.
Fabian,
Re emitting events, I think you have two things here that should be separate.
1. The parsing of NMEA into signal K, its 'area of concern' is to receive, parse, transform. It should emit events relating to the process, not the content.
2. The updating of the local signal K model, which should emit events based on new/changed/deleted keys. I have been thinking about this too, not sure how best to implement it in java script (easy in java!). Data consumers will be listening for the signal k data, not the nmea data (events). So ideally any change to the local model should emit an a signal k snippet to all consumers
Sent from my iPhoneThat is roughly how the parser works; a stream of NMEA sentences is piped into the parser (which is a Transform stream). The transform process of the parser consist of aggregating data until a full sentence is buffered, validating the sentence, parsing the sentence, encoding the values into a signal k child object. That child object is subsequently merged into an internal signal k object. Every time a merge changes the object, an event is emitted.Fabian,
Re emitting events, I think you have two things here that should be separate.
1. The parsing of NMEA into signal K, its 'area of concern' is to receive, parse, transform. It should emit events relating to the process, not the content.Events, in the context of a node.js stream, have the sole purpose of transferring data to anyone listening to these events without blocking the stream. Since events are the primary way to read data of a stream, they are inevitably about both content (e.g the "data" event) and about process (e.g the "error" event).Currently, the data event emits a full signal k object whenever any of it's child objects changes. I can see a use case where it might be useful to listen to changes in certain child objects - so an event for every child object that is fired when changed would make sense.That is an easy one when using node.js streams: pipe the parser directly into the server implementation, and broadcast a new version on the websocket connection whenever an update is coming from down the line.2. The updating of the local signal K model, which should emit events based on new/changed/deleted keys. I have been thinking about this too, not sure how best to implement it in java script (easy in java!). Data consumers will be listening for the signal k data, not the nmea data (events). So ideally any change to the local model should emit an a signal k snippet to all consumers
Hi,So finally do we have in the Signalk model the distance and bearing of the boat to the next waypoint ? Which I understand can be found in RMB ?
ThanksJeanLe mardi 6 mai 2014 à 18:05:57 UTC+2, Fabian Tollenaar a écrit :Just pushed an update to the NMEA0183 parser, the parser is now usable. Although, extra codecs do need to be written..
Op dinsdag 8 april 2014 01:38:53 UTC+2 schreef Fabian Tollenaar:I've written a basic parser module based of jamesp/node-nmea (that is, I've used his codecs and helper functions).The Parser interface is implemented as a Transform stream (http://nodejs.org/api/stream.html#stream_class_stream_transform),which makes it very easy to pipe in a file stream, or a TCP stream, or a serial stream, or any other type of stream for that matter.The parser comes with a binary executable allowing you to do something like cat gps.nmea | nmea-signalkATM I'm finishing up converting some of the original node-nmea codecs to output Signal K, and adding tests.As soon as that's done, I'll put the code on github.As with node-nmea, at the moment the number of NMEA 0183 sentences it can decode is relatively small, but it's very easy to add extra codecs.After initial release, I aim to improve the codec format, and clean up the code a bit more.I'll post updates in this thread.
--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/signalk/5d26693c-b7ac-44eb-bcc2-b2f7acaf241en%40googlegroups.com.