packages feed

sbp 4.6.0 → 4.7.0

raw patch · 4 files changed

+81/−37 lines, 4 files

Files

sbp.cabal view
@@ -1,5 +1,5 @@ name:                  sbp-version:               4.6.0+version:               4.7.0 synopsis:              SwiftNav's SBP Library homepage:              https://github.com/swift-nav/libsbp license:               MIT
src/SwiftNav/SBP/Integrity.hs view
@@ -79,6 +79,33 @@ msgSsrFlagHighLevel :: Word16 msgSsrFlagHighLevel = 0x0BB9 +-- | SBP class for message MSG_SSR_FLAG_HIGH_LEVEL (0x0BB9).+--+-- Integrity monitoring flags for multiple aggregated elements. An element+-- could be a satellite, SSR grid point, or SSR tile. A group of aggregated+-- elements being monitored for integrity could refer to:+--+-- - Satellites in a particular {GPS, GAL, BDS} constellation.+--+-- - Satellites in the line-of-sight of a particular SSR tile.+--+-- - Satellites in the line-of-sight of a particular SSR grid point.+--+-- The integrity usage for a group of aggregated elements varies according to+-- the integrity flag of the satellites comprising that group.+--+-- SSR_INTEGRITY_USAGE_NOMINAL: All satellites received passed the integrity+-- check and have flag INTEGRITY_FLAG_OK.+--+-- SSR_INTEGRITY_USAGE_WARNING: A limited number of elements in the group+-- failed the integrity check. Refer to more granular integrity messages for+-- details on the specific failing elements.+--+-- SSR_INTEGRITY_USAGE_ALERT: Most elements in the group failed the integrity+-- check, do not use for positioning.+--+-- SSR_INTEGRITY_USAGE_NOT_MONITORED: Unable to verify the integrity flag of+-- elements in the group. data MsgSsrFlagHighLevel = MsgSsrFlagHighLevel   { _msgSsrFlagHighLevel_obs_time                  :: !GpsTimeSec     -- ^ GNSS reference time of the observation used to generate the flag.
src/SwiftNav/SBP/Navigation.hs view
@@ -2309,52 +2309,49 @@  -- | SBP class for message MSG_UTC_LEAP_SECOND (0x023A). ----- Emulates the GPS CNAV message, reserving bytes for future broadcast of the--- drift model parameters.+-- UTC-GPST leap seconds before and after the most recent (past, or future,+-- for announced insertions) UTC leap second insertion. data MsgUtcLeapSecond = MsgUtcLeapSecond-  { _msgUtcLeapSecond_bias_coeff     :: !Int16-    -- ^ Reserved. Bias coefficient of GPS time scale with respect to UTC drift-    -- model.-  , _msgUtcLeapSecond_drift_coeff    :: !Int16-    -- ^ Reserved. Drift coefficient of GPS time scale with respect to UTC drift-    -- model.-  , _msgUtcLeapSecond_drift_rate_coeff :: !Int8-    -- ^ Reserved. Drift rate correction coefficient of GPS time scale with-    -- respect to UTC drift model.-  , _msgUtcLeapSecond_count_before   :: !Int8+  { _msgUtcLeapSecond_reserved_0 :: !Int16+    -- ^ Reserved.+  , _msgUtcLeapSecond_reserved_1 :: !Int16+    -- ^ Reserved.+  , _msgUtcLeapSecond_reserved_2 :: !Int8+    -- ^ Reserved.+  , _msgUtcLeapSecond_count_before :: !Int8     -- ^ Leap second count before insertion.-  , _msgUtcLeapSecond_tow_s          :: !Word16-    -- ^ Reserved. Drift model reference week second.-  , _msgUtcLeapSecond_wn             :: !Word16-    -- ^ Reserved. Drift model reference week number.-  , _msgUtcLeapSecond_ref_wn         :: !Word16-    -- ^ Leap second reference week number.-  , _msgUtcLeapSecond_ref_dn         :: !Word8+  , _msgUtcLeapSecond_reserved_3 :: !Word16+    -- ^ Reserved.+  , _msgUtcLeapSecond_reserved_4 :: !Word16+    -- ^ Reserved.+  , _msgUtcLeapSecond_ref_wn     :: !Word16+    -- ^ Leap second reference GPS week number.+  , _msgUtcLeapSecond_ref_dn     :: !Word8     -- ^ Leap second reference day number.-  , _msgUtcLeapSecond_count_after    :: !Int8+  , _msgUtcLeapSecond_count_after :: !Int8     -- ^ Leap second count after insertion.   } deriving ( Show, Read, Eq )  instance Binary MsgUtcLeapSecond where   get = do-    _msgUtcLeapSecond_bias_coeff <- (fromIntegral <$> getWord16le)-    _msgUtcLeapSecond_drift_coeff <- (fromIntegral <$> getWord16le)-    _msgUtcLeapSecond_drift_rate_coeff <- (fromIntegral <$> getWord8)+    _msgUtcLeapSecond_reserved_0 <- (fromIntegral <$> getWord16le)+    _msgUtcLeapSecond_reserved_1 <- (fromIntegral <$> getWord16le)+    _msgUtcLeapSecond_reserved_2 <- (fromIntegral <$> getWord8)     _msgUtcLeapSecond_count_before <- (fromIntegral <$> getWord8)-    _msgUtcLeapSecond_tow_s <- getWord16le-    _msgUtcLeapSecond_wn <- getWord16le+    _msgUtcLeapSecond_reserved_3 <- getWord16le+    _msgUtcLeapSecond_reserved_4 <- getWord16le     _msgUtcLeapSecond_ref_wn <- getWord16le     _msgUtcLeapSecond_ref_dn <- getWord8     _msgUtcLeapSecond_count_after <- (fromIntegral <$> getWord8)     pure MsgUtcLeapSecond {..}    put MsgUtcLeapSecond {..} = do-    (putWord16le . fromIntegral) _msgUtcLeapSecond_bias_coeff-    (putWord16le . fromIntegral) _msgUtcLeapSecond_drift_coeff-    (putWord8 . fromIntegral) _msgUtcLeapSecond_drift_rate_coeff+    (putWord16le . fromIntegral) _msgUtcLeapSecond_reserved_0+    (putWord16le . fromIntegral) _msgUtcLeapSecond_reserved_1+    (putWord8 . fromIntegral) _msgUtcLeapSecond_reserved_2     (putWord8 . fromIntegral) _msgUtcLeapSecond_count_before-    putWord16le _msgUtcLeapSecond_tow_s-    putWord16le _msgUtcLeapSecond_wn+    putWord16le _msgUtcLeapSecond_reserved_3+    putWord16le _msgUtcLeapSecond_reserved_4     putWord16le _msgUtcLeapSecond_ref_wn     putWord8 _msgUtcLeapSecond_ref_dn     (putWord8 . fromIntegral) _msgUtcLeapSecond_count_after
src/SwiftNav/SBP/Signing.hs view
@@ -40,16 +40,25 @@ msgEd25519Signature = 0x0C01  data MsgEd25519Signature = MsgEd25519Signature-  { _msgEd25519Signature_stub :: ![Word8]+  { _msgEd25519Signature_signature     :: ![Word8]+    -- ^ ED25519 signature for messages.+  , _msgEd25519Signature_fingerprint   :: ![Word8]+    -- ^ SHA-1 fingerprint of the associated certificate.+  , _msgEd25519Signature_signed_messages :: ![Word32]+    -- ^ CRCs of signed messages.   } deriving ( Show, Read, Eq )  instance Binary MsgEd25519Signature where   get = do-    _msgEd25519Signature_stub <- whileM (not <$> isEmpty) getWord8+    _msgEd25519Signature_signature <- replicateM 64 getWord8+    _msgEd25519Signature_fingerprint <- replicateM 20 getWord8+    _msgEd25519Signature_signed_messages <- whileM (not <$> isEmpty) getWord32le     pure MsgEd25519Signature {..}    put MsgEd25519Signature {..} = do-    mapM_ putWord8 _msgEd25519Signature_stub+    mapM_ putWord8 _msgEd25519Signature_signature+    mapM_ putWord8 _msgEd25519Signature_fingerprint+    mapM_ putWord32le _msgEd25519Signature_signed_messages  $(makeSBP 'msgEd25519Signature ''MsgEd25519Signature) $(makeJSON "_msgEd25519Signature_" ''MsgEd25519Signature)@@ -59,16 +68,27 @@ msgEd25519Certificate = 0x0C02  data MsgEd25519Certificate = MsgEd25519Certificate-  { _msgEd25519Certificate_stub :: ![Word8]+  { _msgEd25519Certificate_n_msg           :: !Word8+    -- ^ Total number messages that make up the certificate. First nibble is the+    -- size of the sequence (n), second nibble is the zero-indexed counter+    -- (ith packet of n)+  , _msgEd25519Certificate_fingerprint     :: ![Word8]+    -- ^ SHA-1 fingerprint of the associated certificate.+  , _msgEd25519Certificate_certificate_bytes :: ![Word8]+    -- ^ ED25519 certificate bytes.   } deriving ( Show, Read, Eq )  instance Binary MsgEd25519Certificate where   get = do-    _msgEd25519Certificate_stub <- whileM (not <$> isEmpty) getWord8+    _msgEd25519Certificate_n_msg <- getWord8+    _msgEd25519Certificate_fingerprint <- replicateM 20 getWord8+    _msgEd25519Certificate_certificate_bytes <- whileM (not <$> isEmpty) getWord8     pure MsgEd25519Certificate {..}    put MsgEd25519Certificate {..} = do-    mapM_ putWord8 _msgEd25519Certificate_stub+    putWord8 _msgEd25519Certificate_n_msg+    mapM_ putWord8 _msgEd25519Certificate_fingerprint+    mapM_ putWord8 _msgEd25519Certificate_certificate_bytes  $(makeSBP 'msgEd25519Certificate ''MsgEd25519Certificate) $(makeJSON "_msgEd25519Certificate_" ''MsgEd25519Certificate)