diff --git a/c/include/libsbp/solution_meta.h b/c/include/libsbp/solution_meta.h index a4ffe8dfc1..229347e0f9 100644 --- a/c/include/libsbp/solution_meta.h +++ b/c/include/libsbp/solution_meta.h @@ -93,7 +93,7 @@ typedef struct SBP_ATTR_PACKED { u16 hdop; /**< Horizontal Dilution of Precision, as per last available DOPS from Starling GNSS engine [0.01] */ u16 vdop; /**< Vertical Dilution of Precision, as per last available DOPS from Starling GNSS engine [0.01] */ u16 age_corrections; /**< Age of the corrections (0xFFFF indicates invalid), as per last available AGE_CORRECTIONS from Starling GNSS engine [deciseconds] */ - u16 age_gnss; /**< Age of the last received valid GNSS solution (0xFFFF indicates invalid) [ms] */ + u32 age_gnss; /**< Age of the last received valid GNSS solution [ms] */ solution_input_type_t sol_in[0]; /**< Array of Metadata describing the sensors potentially involved in the solution. Each element in the array represents a single sensor type and consists of flags containing (meta)data pertaining to that specific single sensor. Refer to each (XX)InputType descriptor in the present doc. */ } msg_soln_meta_t; diff --git a/docs/sbp.pdf b/docs/sbp.pdf index 9ed75475a3..66d6b0270a 100644 Binary files a/docs/sbp.pdf and b/docs/sbp.pdf differ diff --git a/haskell/src/SwiftNav/SBP/SolutionMeta.hs b/haskell/src/SwiftNav/SBP/SolutionMeta.hs index d1b5fdaa7f..c79e6502f0 100644 --- a/haskell/src/SwiftNav/SBP/SolutionMeta.hs +++ b/haskell/src/SwiftNav/SBP/SolutionMeta.hs @@ -153,8 +153,8 @@ data MsgSolnMeta = MsgSolnMeta , _msgSolnMeta_age_corrections :: !Word16 -- ^ Age of the corrections (0xFFFF indicates invalid), as per last available -- AGE_CORRECTIONS from Starling GNSS engine - , _msgSolnMeta_age_gnss :: !Word16 - -- ^ Age of the last received valid GNSS solution (0xFFFF indicates invalid) + , _msgSolnMeta_age_gnss :: !Word32 + -- ^ Age of the last received valid GNSS solution , _msgSolnMeta_sol_in :: ![SolutionInputType] -- ^ Array of Metadata describing the sensors potentially involved in the -- solution. Each element in the array represents a single sensor type and @@ -170,7 +170,7 @@ instance Binary MsgSolnMeta where _msgSolnMeta_hdop <- getWord16le _msgSolnMeta_vdop <- getWord16le _msgSolnMeta_age_corrections <- getWord16le - _msgSolnMeta_age_gnss <- getWord16le + _msgSolnMeta_age_gnss <- getWord32le _msgSolnMeta_sol_in <- whileM (not <$> isEmpty) get pure MsgSolnMeta {..} @@ -180,7 +180,7 @@ instance Binary MsgSolnMeta where putWord16le _msgSolnMeta_hdop putWord16le _msgSolnMeta_vdop putWord16le _msgSolnMeta_age_corrections - putWord16le _msgSolnMeta_age_gnss + putWord32le _msgSolnMeta_age_gnss mapM_ put _msgSolnMeta_sol_in $(makeSBP 'msgSolnMeta ''MsgSolnMeta) diff --git a/java/src/com/swiftnav/sbp/solution_meta/MsgSolnMeta.java b/java/src/com/swiftnav/sbp/solution_meta/MsgSolnMeta.java index 27bd00e076..104d4fbd2e 100644 --- a/java/src/com/swiftnav/sbp/solution_meta/MsgSolnMeta.java +++ b/java/src/com/swiftnav/sbp/solution_meta/MsgSolnMeta.java @@ -50,8 +50,8 @@ public class MsgSolnMeta extends SBPMessage { /** Age of the corrections (0xFFFF indicates invalid), as per last available AGE_CORRECTIONS from Starling GNSS engine */ public int age_corrections; - /** Age of the last received valid GNSS solution (0xFFFF indicates invalid) */ - public int age_gnss; + /** Age of the last received valid GNSS solution */ + public long age_gnss; /** Array of Metadata describing the sensors potentially involved in the solution. Each element in the array represents a single sensor type and consists of flags containing (meta)data pertaining to that specific single sensor. Refer to each (XX)InputType descriptor in the present doc. */ public SolutionInputType[] sol_in; @@ -72,7 +72,7 @@ protected void parse(Parser parser) throws SBPBinaryException { hdop = parser.getU16(); vdop = parser.getU16(); age_corrections = parser.getU16(); - age_gnss = parser.getU16(); + age_gnss = parser.getU32(); sol_in = parser.getArray(SolutionInputType.class); } @@ -83,7 +83,7 @@ protected void build(Builder builder) { builder.putU16(hdop); builder.putU16(vdop); builder.putU16(age_corrections); - builder.putU16(age_gnss); + builder.putU32(age_gnss); builder.putArray(sol_in); } diff --git a/javascript/sbp/solution_meta.js b/javascript/sbp/solution_meta.js index 67435004ee..d1937386ac 100644 --- a/javascript/sbp/solution_meta.js +++ b/javascript/sbp/solution_meta.js @@ -134,7 +134,7 @@ MsgSolnMetaDepA.prototype.fieldSpec.push(['sol_in', 'array', SolutionInputType.p * engine * @field age_corrections number (unsigned 16-bit int, 2 bytes) Age of the corrections (0xFFFF indicates invalid), as per last available * AGE_CORRECTIONS from Starling GNSS engine - * @field age_gnss number (unsigned 16-bit int, 2 bytes) Age of the last received valid GNSS solution (0xFFFF indicates invalid) + * @field age_gnss number (unsigned 32-bit int, 4 bytes) Age of the last received valid GNSS solution * @field sol_in array Array of Metadata describing the sensors potentially involved in the solution. * Each element in the array represents a single sensor type and consists of flags * containing (meta)data pertaining to that specific single sensor. Refer to each @@ -160,7 +160,7 @@ MsgSolnMeta.prototype.parser = new Parser() .uint16('hdop') .uint16('vdop') .uint16('age_corrections') - .uint16('age_gnss') + .uint32('age_gnss') .array('sol_in', { type: SolutionInputType.prototype.parser, readUntil: 'eof' }); MsgSolnMeta.prototype.fieldSpec = []; MsgSolnMeta.prototype.fieldSpec.push(['tow', 'writeUInt32LE', 4]); @@ -168,7 +168,7 @@ MsgSolnMeta.prototype.fieldSpec.push(['pdop', 'writeUInt16LE', 2]); MsgSolnMeta.prototype.fieldSpec.push(['hdop', 'writeUInt16LE', 2]); MsgSolnMeta.prototype.fieldSpec.push(['vdop', 'writeUInt16LE', 2]); MsgSolnMeta.prototype.fieldSpec.push(['age_corrections', 'writeUInt16LE', 2]); -MsgSolnMeta.prototype.fieldSpec.push(['age_gnss', 'writeUInt16LE', 2]); +MsgSolnMeta.prototype.fieldSpec.push(['age_gnss', 'writeUInt32LE', 4]); MsgSolnMeta.prototype.fieldSpec.push(['sol_in', 'array', SolutionInputType.prototype.fieldSpec, function () { return this.fields.array.length; }, null]); /** diff --git a/python/sbp/jit/solution_meta.py b/python/sbp/jit/solution_meta.py index d7691e1015..d800f03702 100644 --- a/python/sbp/jit/solution_meta.py +++ b/python/sbp/jit/solution_meta.py @@ -163,7 +163,7 @@ def parse_members(cls, buf, offset, length): ret['vdop'] = __vdop (__age_corrections, offset, length) = get_u16(buf, offset, length) ret['age_corrections'] = __age_corrections - (__age_gnss, offset, length) = get_u16(buf, offset, length) + (__age_gnss, offset, length) = get_u32(buf, offset, length) ret['age_gnss'] = __age_gnss (__sol_in, offset, length) = get_array(SolutionInputType.parse_members)(buf, offset, length) ret['sol_in'] = __sol_in diff --git a/python/sbp/solution_meta.py b/python/sbp/solution_meta.py index d3d199de8f..0baba22db0 100644 --- a/python/sbp/solution_meta.py +++ b/python/sbp/solution_meta.py @@ -341,7 +341,7 @@ class MsgSolnMeta(SBP): age_corrections : int Age of the corrections (0xFFFF indicates invalid), as per last available AGE_CORRECTIONS from Starling GNSS engine age_gnss : int - Age of the last received valid GNSS solution (0xFFFF indicates invalid) + Age of the last received valid GNSS solution sol_in : array Array of Metadata describing the sensors potentially involved in the solution. Each element in the array represents a single sensor type and consists of flags containing (meta)data pertaining to that specific single sensor. Refer to each (XX)InputType descriptor in the present doc. sender : int @@ -354,7 +354,7 @@ class MsgSolnMeta(SBP): 'hdop' / construct.Int16ul, 'vdop' / construct.Int16ul, 'age_corrections' / construct.Int16ul, - 'age_gnss' / construct.Int16ul, + 'age_gnss' / construct.Int32ul, construct.GreedyRange('sol_in' / construct.Struct(SolutionInputType._parser)),) __slots__ = [ 'tow', diff --git a/rust/sbp/src/messages/solution_meta.rs b/rust/sbp/src/messages/solution_meta.rs index 81bc112118..df79380e77 100644 --- a/rust/sbp/src/messages/solution_meta.rs +++ b/rust/sbp/src/messages/solution_meta.rs @@ -150,8 +150,8 @@ pub struct MsgSolnMeta { /// Age of the corrections (0xFFFF indicates invalid), as per last available /// AGE_CORRECTIONS from Starling GNSS engine pub age_corrections: u16, - /// Age of the last received valid GNSS solution (0xFFFF indicates invalid) - pub age_gnss: u16, + /// Age of the last received valid GNSS solution + pub age_gnss: u32, /// Array of Metadata describing the sensors potentially involved in the /// solution. Each element in the array represents a single sensor type and /// consists of flags containing (meta)data pertaining to that specific @@ -170,7 +170,7 @@ impl MsgSolnMeta { hdop: _buf.read_u16::()?, vdop: _buf.read_u16::()?, age_corrections: _buf.read_u16::()?, - age_gnss: _buf.read_u16::()?, + age_gnss: _buf.read_u32::()?, sol_in: SolutionInputType::parse_array(_buf)?, } ) } diff --git a/spec/yaml/swiftnav/sbp/solution_meta.yaml b/spec/yaml/swiftnav/sbp/solution_meta.yaml index dfd1c314d7..9eb35acbcb 100644 --- a/spec/yaml/swiftnav/sbp/solution_meta.yaml +++ b/spec/yaml/swiftnav/sbp/solution_meta.yaml @@ -145,9 +145,9 @@ definitions: units: deciseconds desc: Age of the corrections (0xFFFF indicates invalid), as per last available AGE_CORRECTIONS from Starling GNSS engine - age_gnss: - type: u16 + type: u32 units: ms - desc: Age of the last received valid GNSS solution (0xFFFF indicates invalid) + desc: Age of the last received valid GNSS solution - sol_in: type: array fill: SolutionInputType