-
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
implement XDR codec #53
Conversation
I have started on an XDR conversion myself on my xdr branch. I think we should start with the compliant tuples of four and address the exceptions after. With such a mess of different inerpretations, the code quickly becomes messy. |
I'm not sure I understand the code, but you can't treat XDR like any other NMEA0183 sentence. You must include the sender ID (i.e. the characters before XDR) in you decision to decide what it means. At the very least I'd expect some comments that explain what a WI, YXX or OS is. |
I agree. As I said, i have started. Not easy to write code on an iPad. I forgot my power supply... |
I am happy to step down if you are working on XDR at the moment. My thought was to check for every place where there "should" be an id, and match to the known mappings and units. The non compliant sentences would be an exception to this main rule. That's about as far as I came |
The WI,YX and OS are examples from an openplotter discussion on cruisersforum This code should work for openplotter, if there are sentences generated by some manufacturers that don't comply and can't be processed by this module can we cross that bridge when we come to it ? |
Sure. Keep up the good work |
Can you clarify your comment
Does Openplotter expect Signal K deltas with paths like |
Open plotter provides NMEA 0183 input stream to signalk using kplex It is my display app that is expecting paths like sensors.1W0.sensorData This implementation is agnostic about the instrument names, open plotter is We definitely need to add transformations to ensure temperature is in On Tuesday, 23 February 2016, Teppo Kurki notifications@github.com wrote:
|
I see on https://github.com/sailoog/openplotter/blob/master/i2c.py that sensors like heel and pitch are mapped in a more standard way and these actually have a mapping in sk. |
Yes there is definitely a duplication for some things. The i2c things are I suggest following along with the cruisers forum open plotter thread to On Tuesday, 23 February 2016, joabakk notifications@github.com wrote:
|
The basic idea of Signal K is that we have well defined, source agnostic paths for data and standard unit. For example if a sensor provides air temperature it is available as What you are proposing goes against this - instead of a standard path based what the data actually is the data would be available based solely on the specific source. So instead of a generic passthrough with cryptic names we should create a mapping from vendor specific XDRs to standarg SK paths & values - in essence extend the current nmea0183 SK parser with another level of logic. Currently the conversion is driven by just the sentence - for XDR it will need another level where the vendor prefix is also taken into account. A great step forward would now be to gather XDR sentences to one place and then create a generic solution with specific configs for the known kinds. Can we continue here: #54 |
Although I agree with all of this, there is a use case where a generic pass Consider the user who adds temperature sensors to various places on both So I believe there are some cases where a generic pass through may be more On Tuesday, 23 February 2016, Teppo Kurki notifications@github.com wrote:
|
Yep, there is a need for generic measurements, but I would like to throw in the option to map these temperature values to proper Signal K paths and if all else fails pass them along as generic sensor values. For example is WIXDR is typically produced by outside temperature sensors (my assumption, may be wrong) why not have that mapping available? I am really not sure what if any value Signal K provides here. Would it be more straightforward to provide the original sentences unmodified, wrapped in JSON? Or does it make the messages inherently easier to handle by converting the XDR to quadruplets in JSON? Then again having everything preparsed and all data in the same, uniform stream makes writing clients easier. |
Yes I agree mapping known values to proper signalk paths first and falling I think signalk does add a lot of value to this case and yes it makes it On Tuesday, 23 February 2016, Teppo Kurki notifications@github.com wrote:
|
I am strongly not in favor of Signal K doing any passthrough. The entire theory of passing data through to a client that is suddenly magically able to make sense of the data seems flawed to me. Much better to put this intelligence in the converter from XYZ to SK so that all clients are able to understand the data. |
While this thread has been hanging in the air we did a bit of work on the temperatures. The temperatures available in the N2K data model have now mappings in the Signal K data model. The easiest way to see all the temperatures is in the updated This however does not take care of arbitrary values, but I think that we should extend the Signal K data model and not just push out sensor values with random id's. For a consumer to act meaningfully to the data it needs to know the unit that it is send in and a semantic meaning to it, possibly in some commonly known grouping that makes sense to the user so that the values are not in random order. Continuing with your proverbial jacuzzi example: I would send that out as |
Closing the issue here, as I think the discussion should continue under |
implements the XDR codec - no conversion is made of the sensor data value - it is simply copied from the source as is until we know what conversions we are going to do for each sensor type
Handles the following input lines
$WIXDR,C,022.0,C,,_52 - (no sensor name - C0 is assumed)
$YXXDR,C,7,C_54 - (no sensor name C0 is assumed)
$OSXDR,C,9.5,C,1W0,C,9.0,C,1W1*56 - (multiple named sensor values)