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

XDR support #54

Open
tkurki opened this issue Feb 22, 2016 · 19 comments
Open

XDR support #54

tkurki opened this issue Feb 22, 2016 · 19 comments

Comments

@tkurki
Copy link
Member

tkurki commented Feb 22, 2016

To get proper support for XDR we could first document some of the sentences out there and then create a solution that works well for them and can be easily extended to cover other sentences.

In practice this is probably another mapping level not unlike the one we have for codecs.

@joabakk
Copy link
Contributor

joabakk commented Feb 22, 2016

References:
/1/ Nexus, from http://www.nexusmarine.se/wp-content/uploads/2011/11/NMEA-HPC-Compas.pdf
/2/ Airmar, from http://www.airmartechnology.com/uploads/installguide/GCR200UserManual.pdf

[["PTCH","deg","navigation.attitude_pitch"],
["PIT","deg","navigation.attitude_pitch"],// ref /1/
["ROLL","deg","navigation.attitude_roll"],
["ROL","deg","navigation.attitude_roll"]];// ref /1/

["WCHR","deg",""],//relative wind chill, ref /2/
["WCHT","deg",""]];*///theoretical wind chill, ref /2/

@tkurki
Copy link
Member Author

tkurki commented Feb 22, 2016

From http://www.cruisersforum.com/forums/f13/openplotter-project-152754-31.html

$YXXDR,C,7,C*54 - also from the nasa, outside temperature

$OPXDR,C,17.4,C,ENGT_55
$OPXDR,P,1.0004,B,AIRP,C,17.1,C,AIRT_45

Temperatures
$WIXDR,C,022.0,C,,_52
$YXXDR,C,20,C_61

Airmar device at http://www.airmartechnology.com/uploads/installguide/PB100TechnicalManual_rev1.007.pdf offers a format for their WIXDR sentence like this:

$WIXDR,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,<11>,<12>,<13>,<14>,<15>,<16>*hh

@tkurki
Copy link
Member Author

tkurki commented Feb 22, 2016

// Cruzpro YXXDR sentence
//from Cruzpro - The fields in the YXXDR sentence are always from the same "critical" functions, in order:
//RPM
//Battery #1 Volts
//Depth
//Oil Pressure
//Engine Temperature

@tkurki
Copy link
Member Author

tkurki commented Feb 22, 2016

I started work on this in my own fork of the repo: tkurki@0162913

In case anybody wants to help I can add you as collaborator, like I already added @joabakk and @fabdrol in case they can pitch in.

@joabakk
Copy link
Contributor

joabakk commented Feb 22, 2016

The "official" sources for nmea 0183 sentences tend to repeat what Airmar notes in their manual. If you add a "compliant" example, I can help populate. I think it's valid to reference as many of these as possible, because there is bound to be conflicts over XDR

@joabakk
Copy link
Contributor

joabakk commented Feb 25, 2016

@tkurki
Copy link
Member Author

tkurki commented May 20, 2016

See #58

@joabakk
Copy link
Contributor

joabakk commented Jan 31, 2017

How about a user configurable XDR translation controlled from a plugin? I have some old date from a self made compass, and for sure I won't use that format any more. But I'd like to get that data into use.
For some special cases where XDR is output, it may be easier to configure than to have a plethora of sensor codes in the parser.
Not even sure it is possible to control the parser that way, but an idea at least

@tkurki
Copy link
Member Author

tkurki commented Jan 31, 2017

Writing a new XDR mapping in javascript is not too many lines of code.

Trying to make the same thing via a universal, configurable engine would take a lot more effort, with maybe very little gain.

I would rather create a system where you can add XDR mappings as javascript files added to a directory.

@joabakk
Copy link
Contributor

joabakk commented Jan 31, 2017

I follow you @tkurki. I'm just such a fan of the plugin mechanism, so I think of that for every purpose. I'll tweak your code to suit my one time need and we can keep it alive until someone takes up the ball.

@rob42
Copy link

rob42 commented Feb 1, 2017

I wrote an XDR handler for the java server. Its not simple, and the whole XDR format is basically "I'll send what suits me and you work it out". Some awful stuff in there. It was never meant to be shared, just a way to send proprietary data over an existing protocol.
I did mine using external mappings, but each new XDR was just as much work as adding custom code, so I favour @tkurki - just write a convertor for each XDR. That allows for all the weirdness you will find in that rabbit hole.

@joabakk
Copy link
Contributor

joabakk commented May 22, 2017

Funny thing @rob42 I just discovered I was trying to decode your NMEA XDR from FreeIMU... I wondered where I got that reference

@rob42
Copy link

rob42 commented May 22, 2017

:-) The FreeIMU XDR was an attempt to send the roll, pitch,yaw data in NMEA!
https://github.com/rob42/FreeIMU-20121106_1323/blob/master/FreeBoardIMU/FreeBoardIMU.ino
Much simpler in the new SignalkIMU https://github.com/SignalK/signalk-imu which just sends the signalk data directly!

@rob42
Copy link

rob42 commented May 22, 2017

The FreeIMU code predates signalk

@Hakansv
Copy link
Contributor

Hakansv commented Jan 30, 2020

Any efforts to add XDR will in future be most appreciated by OCPN users.
Comments about its use here: https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences
Please scroll down to find XDR and used Transducer Name.
The Transducer Name opaqueness may be solved if SignaKl only let it pass and let the user sort accordingly. Transducer type "C" can for example use several names for different sensors.
What may be handy is a flag for numbers of passed quadruples?

@tkurki
Copy link
Member Author

tkurki commented Jan 30, 2020

Have you tried the plugin https://www.npmjs.com/package/xdr-parser-plugin, available in the server's Appstore?

One option is to create a "OCPN XDR Plugin" that would parse the same XDRs that O already understands. Or preconfiguration for xdr-parser-plugin for O's sentences.

@Hakansv
Copy link
Contributor

Hakansv commented Jan 30, 2020

No, but I'll check.
It may not be a common solution to be distributed together with OCPN. For OpenPlotter it may do though?

@Hakansv
Copy link
Contributor

Hakansv commented Feb 1, 2020

@tkurki
I've tried the xdr-parser-plugin and it works rather good. Thanks. The shot shows the result when using both MDA and XDR for the same sensor.
So I look forward to a common SignalK implementation using similar methods as the plugin.

bild

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

4 participants