Knio / pynmea2

Python library for parsing the NMEA 0183 protocol (GPS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XDR sentence transducer name field problem

skoroneos opened this issue · comments

Have stumbled into several XDR sentences where the transducer name contains <space(s)>
i.e
$ERXDR,G,0,,SHD CANCEL*57
decoding this returns

{'units': '', 'type': 'G', 'id': 'SHD', 'value': '0'}

while the correct id should have been "SHD CANCEL"
The standard does not seem to specify (as far as i can see) if the space is an allowed character in the transducer name

XDR - Transducer Measurements

Measurement data from transducers that measure physical quantities such as temperature, force, pressure, frequency, angular or linear displacement, etc. Data from a variable number transducers measuring the same or different quantities can be mixed in the same sentence. This sentence is designed for use by integrated systems as well as transducers that may be connected in a 'chain' where each transducer receives the sentence as an input and adds its own data fields on before retransmitting the sentence.

$--XDR,a,x.x,a,c--c,...…………...a,x.x,a,c--c*hh

Transducer 'n'1 Data for variable # of transducers

Transducer #1 ID

Units of measure, Transducer #12

Measurement data, Transducer #1 Transducer type, Transducer #12

Notes:

  1. Sets of the four fields 'Type-Data-Units-ID' are allowed for an undefined number of transducers.

Up to 'n' transducers may be included within the limits of allowed sentence length, null fields are not required except where portions of the 'Type-Data-Units-ID' combination are not available.

  1. Allowed transducer types and their units of measure are:

Transducer Type Field Units Field Comments temperature C C = degrees Celsius angular displacement A D = degrees "-" = anti-clockwise linear displacement D M = meters "-" = compression frequency F H = Hertz force N N = Newton "-" = compression pressure P B = Bars, P = Pascal "-" = vacuum flow rate R l = liters/second tachometer T R = RPM humidity H P = Percent volume V M = cubic meters generic G none (null) x.x = variable data current I A = Amperes voltage U V = Volts switch or valve S none (null) 1 = ON/ CLOSED, 0 = OFF/ OPEN salinity L S = ppt ppt = parts per thousand