SignalK / signalk-to-nmea0183

Signal K Node server plugin to convert Signal K to NMEA 0183
Apache License 2.0
12 stars 28 forks source link

Convert propulsion and fluid levels to XDR #99

Open tkurki opened 10 months ago

TwoCanPlugIn commented 9 months ago

I think you wanted me to add something about the NMEA 183 XDR sentences.

This is the NMEA 183 v4.11 standard XDR Transducer naming.

Measurement Transducer Type Measurement Unit Transducer Name
Engine RPM T R (RPM) ENGINE#0, ENGINE#1
Oil pressure P P (Pascals) ENGINEOIL#0, ENGINEOIL#1
Water Temperature C C (Celsius) ENGINE#0, ENGINE#1
Alternator Voltage U V (Volts) ALTERNATOR#0, ALTERNATOR#1
Engine Hours1 G null ENGINE#0, ENGINE#1
Fluid Levels V P (Percent) FUEL#0, FRESHWATER#0, OIL#0, LIVEWELLWATER#0, WASTEWATER#0, BLACKWATER#0
Fluid Levels E P (Percent) FUEL#0, FRESHWATER#0, OIL#0, LIVEWELLWATER#0, WASTEWATER#0, BLACKWATER#0
Battery Voltage U V (Volts) BATTERY#0, BATTERY#1
Battery Current I A (Amps) BATTERY#0, BATTERY#1

1This is what I use for the OpenCPN Engine Dashboard, and it is important to note that it interprets the "Generic" transducer Type "G" as Engine Hours. The actual NMEA 183 standard does not define any particular measurement for transducer type "G".

These are some sample NMEA 183 XDR sentences. $ERXDR,P,300000,P,ENGINEOIL#0,C,89.5,C,ENGINE#0,U,13.4,V,ALTERNATOR#0,G,250,,Engine#047 $ERXDR,T,920,R,ENGINE#079 $ERXDR,E,15,P,Fuel#0,E,80,P,FRESHWATER#0#0,E,50,P,FRESHWATER#1,E,75,P,FRESHWATER#2*67

I guess it is just a mapping of the SignalK data model to the appropriate NMEA 183 sentence elements.

Eg. vessel/propulsion/port/coolantTemperature generating something like C,89.5,C,ENGINE#2 and performing the appropriate conversion from SI units.

Important to note also the NMEA 183 engine numbering, Eg. For the RPM sentence, 0 refers to single or mid engine, odd numbers refer to starboard and even refers to port whereas I don't believe any engine numbering standards are defined. for XRR sentences. Might be best to follow the same numbering as defined by the RPM sentence.

Just to confuse things, I don't believe any similar standard exists for NMEA 2000 engine instance numbering,. The SignalK specification, for NMEA 2000, the namespace is something like vessel/propulsion/engine_1/coolantTemperature but nothing really implies that engine_1 is a mid, port or starboard engine.