First of all, amazing library! Very useful and well designed!
By using it, I found myself stuck with an error while parsing parameters for XDR sentences and, by comparing your code with the official NMEA 0183 specifications, I found that this one states that XDR sentences can contain data for a dynamic amount of transducers (so an unpredictable amount of parameters/sentence length).
--- XDR specification (from NMEA 0183) ---
--- Format ---
$--XDR,a,x.x,a,c--c,..................a,x.x,a,c--c*hh<CR><LF>
--- Parameters (in order) ---
- a - Transducer type, Transducer #1
- x.x - Measurement data, Transducer #1
- a - Units of measure, Transducer #1
- c--c - Transducer #1 ID
- .................. - Data for variable # of transducers
- a - Transducer type, Transducer #n
- x.x - Measurement data, Transducer #n
- a - Units of measure, Transducer #n
- c--c - Transducer #n ID
As you can see, the .................. parameter is just a placeholder for an undefined amount of other transducers data (so the a,x.x,a,c--c set of parameters), but in your code the placeholder considers only a fixed amount of 2 transducers.
--- Library XDR format code ---
a,x.x,a,c--c,a,x.x,a,c--c
Is this a well-known limitation or is there a way to work with these kind of dynamic sentences?
First of all, amazing library! Very useful and well designed!
By using it, I found myself stuck with an error while parsing parameters for XDR sentences and, by comparing your code with the official NMEA 0183 specifications, I found that this one states that XDR sentences can contain data for a dynamic amount of transducers (so an unpredictable amount of parameters/sentence length).
As you can see, the
..................parameter is just a placeholder for an undefined amount of other transducers data (so thea,x.x,a,c--cset of parameters), but in your code the placeholder considers only a fixed amount of 2 transducers.Is this a well-known limitation or is there a way to work with these kind of dynamic sentences?