sbp 2.4.7 → 2.6.3
raw patch · 18 files changed
+1229/−238 lines, 18 filesdep +aeson-prettydep +cmdargsdep ~basenew-component:exe:sbp2prettyjson
Dependencies added: aeson-pretty, cmdargs
Dependency ranges changed: base
Files
- main/SBP2PRETTYJSON.hs +55/−0
- sbp.cabal +18/−1
- src/SwiftNav/SBP/Acquisition.hs +6/−6
- src/SwiftNav/SBP/ExtEvents.hs +1/−1
- src/SwiftNav/SBP/FileIo.hs +62/−0
- src/SwiftNav/SBP/Gnss.hs +26/−2
- src/SwiftNav/SBP/Imu.hs +7/−7
- src/SwiftNav/SBP/Logging.hs +0/−23
- src/SwiftNav/SBP/Mag.hs +3/−3
- src/SwiftNav/SBP/Msg.hs +95/−29
- src/SwiftNav/SBP/Navigation.hs +35/−35
- src/SwiftNav/SBP/Observation.hs +387/−17
- src/SwiftNav/SBP/Orientation.hs +10/−10
- src/SwiftNav/SBP/Piksi.hs +59/−29
- src/SwiftNav/SBP/Settings.hs +32/−0
- src/SwiftNav/SBP/Ssr.hs +340/−37
- src/SwiftNav/SBP/Tracking.hs +92/−37
- src/SwiftNav/SBP/Vehicle.hs +1/−1
+ main/SBP2PRETTYJSON.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# OPTIONS_GHC -fno-cse #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++-- |+-- Module: SBP2PRETTYJSON+-- Copyright: Copyright (C) 2019 Swift Navigation, Inc.+-- License: LGPL-3+-- Maintainer: Pasi Miettinen <dev@swiftnav.com>+-- Stability: experimental+-- Portability: portable+--+-- SBP to JSON tool - reads SBP binary from stdin and sends SBP JSON+-- to stdout.++import BasicPrelude hiding (map, print)+import Control.Monad.Trans.Resource+import Data.Aeson.Encode.Pretty+import Data.ByteString.Lazy hiding (ByteString, map)+import Data.Conduit+import Data.Conduit.Binary+import Data.Conduit.List+import Data.Conduit.Serialization.Binary+import SwiftNav.SBP+import System.Console.CmdArgs+import System.IO++data Cfg = Cfg { skiporder :: Bool+ , spaces :: Int+ , skipfilter :: Bool }+ deriving (Show, Data, Typeable)++defaultCfg :: Cfg+defaultCfg = Cfg { skiporder = False+ , spaces = 0+ , skipfilter = False }++-- | Encode a SBPMsg to a line of JSON.+encodeLine :: Cfg -> SBPMsg -> ByteString+encodeLine c (SBPMsgBadCrc _v) | not (skipfilter c) = mempty+encodeLine c (SBPMsgUnknown _v) | not (skipfilter c) = mempty+encodeLine c v = toStrict $ encodePretty' (defConfig+ { confIndent = Spaces (spaces c)+ , confCompare = if (skiporder c) then mempty else compare+ }) v <> "\n"++main :: IO ()+main = do+ cfg <- cmdArgs defaultCfg+ runResourceT $+ sourceHandle stdin+ =$= conduitDecode+ =$= map (encodeLine cfg)+ $$ sinkHandle stdout
sbp.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.22 name: sbp-version: 2.4.7+version: 2.6.3 license: LGPL-3 copyright: Copyright (C) 2015-2018 Swift Navigation, Inc. maintainer: Swift Navigation <dev@swiftnav.com>@@ -82,6 +82,23 @@ basic-prelude >=0.7.0, binary-conduit >=1.2.5, bytestring >=0.10.8.2,+ conduit >=1.2.13.1,+ conduit-extra >=1.2.3.2,+ resourcet >=1.1.11,+ sbp -any++executable sbp2prettyjson+ main-is: SBP2PRETTYJSON.hs+ hs-source-dirs: main+ default-language: Haskell2010+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall+ build-depends:+ aeson-pretty >=0.8.5,+ base >=4.10.1.0,+ basic-prelude >=0.7.0,+ binary-conduit >=1.2.5,+ bytestring >=0.10.8.2,+ cmdargs >=0.10.20, conduit >=1.2.13.1, conduit-extra >=1.2.3.2, resourcet >=1.1.11,
@@ -239,9 +239,9 @@ putWord16le _acqSvProfile_bin_width putWord32le _acqSvProfile_timestamp putWord32le _acqSvProfile_time_spent- putWord32le $ fromIntegral _acqSvProfile_cf_min- putWord32le $ fromIntegral _acqSvProfile_cf_max- putWord32le $ fromIntegral _acqSvProfile_cf+ (putWord32le . fromIntegral) _acqSvProfile_cf_min+ (putWord32le . fromIntegral) _acqSvProfile_cf_max+ (putWord32le . fromIntegral) _acqSvProfile_cf putWord32le _acqSvProfile_cp $(makeJSON "_acqSvProfile_" ''AcqSvProfile)@@ -302,9 +302,9 @@ putWord16le _acqSvProfileDep_bin_width putWord32le _acqSvProfileDep_timestamp putWord32le _acqSvProfileDep_time_spent- putWord32le $ fromIntegral _acqSvProfileDep_cf_min- putWord32le $ fromIntegral _acqSvProfileDep_cf_max- putWord32le $ fromIntegral _acqSvProfileDep_cf+ (putWord32le . fromIntegral) _acqSvProfileDep_cf_min+ (putWord32le . fromIntegral) _acqSvProfileDep_cf_max+ (putWord32le . fromIntegral) _acqSvProfileDep_cf putWord32le _acqSvProfileDep_cp $(makeJSON "_acqSvProfileDep_" ''AcqSvProfileDep)
@@ -69,7 +69,7 @@ put MsgExtEvent {..} = do putWord16le _msgExtEvent_wn putWord32le _msgExtEvent_tow- putWord32le $ fromIntegral _msgExtEvent_ns_residual+ (putWord32le . fromIntegral) _msgExtEvent_ns_residual putWord8 _msgExtEvent_flags putWord8 _msgExtEvent_pin
@@ -272,3 +272,65 @@ $(makeSBP 'msgFileioWriteResp ''MsgFileioWriteResp) $(makeJSON "_msgFileioWriteResp_" ''MsgFileioWriteResp) $(makeLenses ''MsgFileioWriteResp)++msgFileioConfigReq :: Word16+msgFileioConfigReq = 0x1001++-- | SBP class for message MSG_FILEIO_CONFIG_REQ (0x1001).+--+-- Requests advice on the optimal configuration for a FileIO transfer. Newer+-- version of FileIO can support greater throughput by supporting a large+-- window of FileIO data that can be in-flight during read or write operations.+data MsgFileioConfigReq = MsgFileioConfigReq+ { _msgFileioConfigReq_sequence :: !Word32+ -- ^ Advice sequence number+ } deriving ( Show, Read, Eq )++instance Binary MsgFileioConfigReq where+ get = do+ _msgFileioConfigReq_sequence <- getWord32le+ pure MsgFileioConfigReq {..}++ put MsgFileioConfigReq {..} = do+ putWord32le _msgFileioConfigReq_sequence++$(makeSBP 'msgFileioConfigReq ''MsgFileioConfigReq)+$(makeJSON "_msgFileioConfigReq_" ''MsgFileioConfigReq)+$(makeLenses ''MsgFileioConfigReq)++msgFileioConfigResp :: Word16+msgFileioConfigResp = 0x1002++-- | SBP class for message MSG_FILEIO_CONFIG_RESP (0x1002).+--+-- The advice on the optimal configuration for a FileIO transfer. Newer+-- version of FileIO can support greater throughput by supporting a large+-- window of FileIO data that can be in-flight during read or write operations.+data MsgFileioConfigResp = MsgFileioConfigResp+ { _msgFileioConfigResp_sequence :: !Word32+ -- ^ Advice sequence number+ , _msgFileioConfigResp_window_size :: !Word32+ -- ^ The number of SBP packets in the data in-flight window+ , _msgFileioConfigResp_batch_size :: !Word32+ -- ^ The number of SBP packets sent in one PDU+ , _msgFileioConfigResp_fileio_version :: !Word32+ -- ^ The version of FileIO that is supported+ } deriving ( Show, Read, Eq )++instance Binary MsgFileioConfigResp where+ get = do+ _msgFileioConfigResp_sequence <- getWord32le+ _msgFileioConfigResp_window_size <- getWord32le+ _msgFileioConfigResp_batch_size <- getWord32le+ _msgFileioConfigResp_fileio_version <- getWord32le+ pure MsgFileioConfigResp {..}++ put MsgFileioConfigResp {..} = do+ putWord32le _msgFileioConfigResp_sequence+ putWord32le _msgFileioConfigResp_window_size+ putWord32le _msgFileioConfigResp_batch_size+ putWord32le _msgFileioConfigResp_fileio_version++$(makeSBP 'msgFileioConfigResp ''MsgFileioConfigResp)+$(makeJSON "_msgFileioConfigResp_" ''MsgFileioConfigResp)+$(makeLenses ''MsgFileioConfigResp)
@@ -59,6 +59,30 @@ $(makeJSON "_gnssSignal_" ''GnssSignal) $(makeLenses ''GnssSignal) +-- | SvId.+--+-- A (Constellation ID, satellite ID) tuple that uniquely identifies a space+-- vehicle+data SvId = SvId+ { _svId_satId :: !Word8+ -- ^ ID of the space vehicle within its constellation+ , _svId_constellation :: !Word8+ -- ^ Constellation ID to which the SV belongs+ } deriving ( Show, Read, Eq )++instance Binary SvId where+ get = do+ _svId_satId <- getWord8+ _svId_constellation <- getWord8+ pure SvId {..}++ put SvId {..} = do+ putWord8 _svId_satId+ putWord8 _svId_constellation++$(makeJSON "_svId_" ''SvId)+$(makeLenses ''SvId)+ -- | GnssSignalDep. -- -- Deprecated.@@ -160,7 +184,7 @@ put GpsTime {..} = do putWord32le _gpsTime_tow- putWord32le $ fromIntegral _gpsTime_ns_residual+ (putWord32le . fromIntegral) _gpsTime_ns_residual putWord16le _gpsTime_wn $(makeJSON "_gpsTime_" ''GpsTime)@@ -185,7 +209,7 @@ pure CarrierPhase {..} put CarrierPhase {..} = do- putWord32le $ fromIntegral _carrierPhase_i+ (putWord32le . fromIntegral) _carrierPhase_i putWord8 _carrierPhase_f $(makeJSON "_carrierPhase_" ''CarrierPhase)
@@ -80,12 +80,12 @@ put MsgImuRaw {..} = do putWord32le _msgImuRaw_tow putWord8 _msgImuRaw_tow_f- putWord16le $ fromIntegral _msgImuRaw_acc_x- putWord16le $ fromIntegral _msgImuRaw_acc_y- putWord16le $ fromIntegral _msgImuRaw_acc_z- putWord16le $ fromIntegral _msgImuRaw_gyr_x- putWord16le $ fromIntegral _msgImuRaw_gyr_y- putWord16le $ fromIntegral _msgImuRaw_gyr_z+ (putWord16le . fromIntegral) _msgImuRaw_acc_x+ (putWord16le . fromIntegral) _msgImuRaw_acc_y+ (putWord16le . fromIntegral) _msgImuRaw_acc_z+ (putWord16le . fromIntegral) _msgImuRaw_gyr_x+ (putWord16le . fromIntegral) _msgImuRaw_gyr_y+ (putWord16le . fromIntegral) _msgImuRaw_gyr_z $(makeSBP 'msgImuRaw ''MsgImuRaw) $(makeJSON "_msgImuRaw_" ''MsgImuRaw)@@ -117,7 +117,7 @@ put MsgImuAux {..} = do putWord8 _msgImuAux_imu_type- putWord16le $ fromIntegral _msgImuAux_temp+ (putWord16le . fromIntegral) _msgImuAux_temp putWord8 _msgImuAux_imu_conf $(makeSBP 'msgImuAux ''MsgImuAux)
@@ -101,29 +101,6 @@ $(makeJSON "_msgFwd_" ''MsgFwd) $(makeLenses ''MsgFwd) -msgTweet :: Word16-msgTweet = 0x0012---- | SBP class for message MSG_TWEET (0x0012).------ All the news fit to tweet.-data MsgTweet = MsgTweet- { _msgTweet_tweet :: !Text- -- ^ Human-readable string- } deriving ( Show, Read, Eq )--instance Binary MsgTweet where- get = do- _msgTweet_tweet <- decodeUtf8 <$> getByteString 140- pure MsgTweet {..}-- put MsgTweet {..} = do- putByteString $ encodeUtf8 _msgTweet_tweet--$(makeSBP 'msgTweet ''MsgTweet)-$(makeJSON "_msgTweet_" ''MsgTweet)-$(makeLenses ''MsgTweet)- msgPrintDep :: Word16 msgPrintDep = 0x0010
@@ -67,9 +67,9 @@ put MsgMagRaw {..} = do putWord32le _msgMagRaw_tow putWord8 _msgMagRaw_tow_f- putWord16le $ fromIntegral _msgMagRaw_mag_x- putWord16le $ fromIntegral _msgMagRaw_mag_y- putWord16le $ fromIntegral _msgMagRaw_mag_z+ (putWord16le . fromIntegral) _msgMagRaw_mag_x+ (putWord16le . fromIntegral) _msgMagRaw_mag_y+ (putWord16le . fromIntegral) _msgMagRaw_mag_z $(makeSBP 'msgMagRaw ''MsgMagRaw) $(makeJSON "_msgMagRaw_" ''MsgMagRaw)
@@ -97,6 +97,7 @@ | SBPMsgEphemerisDepC MsgEphemerisDepC Msg | SBPMsgEphemerisDepD MsgEphemerisDepD Msg | SBPMsgEphemerisGal MsgEphemerisGal Msg+ | SBPMsgEphemerisGalDepA MsgEphemerisGalDepA Msg | SBPMsgEphemerisGlo MsgEphemerisGlo Msg | SBPMsgEphemerisGloDepA MsgEphemerisGloDepA Msg | SBPMsgEphemerisGloDepB MsgEphemerisGloDepB Msg@@ -105,10 +106,13 @@ | SBPMsgEphemerisGps MsgEphemerisGps Msg | SBPMsgEphemerisGpsDepE MsgEphemerisGpsDepE Msg | SBPMsgEphemerisGpsDepF MsgEphemerisGpsDepF Msg+ | SBPMsgEphemerisQzss MsgEphemerisQzss Msg | SBPMsgEphemerisSbas MsgEphemerisSbas Msg | SBPMsgEphemerisSbasDepA MsgEphemerisSbasDepA Msg | SBPMsgEphemerisSbasDepB MsgEphemerisSbasDepB Msg | SBPMsgExtEvent MsgExtEvent Msg+ | SBPMsgFileioConfigReq MsgFileioConfigReq Msg+ | SBPMsgFileioConfigResp MsgFileioConfigResp Msg | SBPMsgFileioReadDirReq MsgFileioReadDirReq Msg | SBPMsgFileioReadDirResp MsgFileioReadDirResp Msg | SBPMsgFileioReadReq MsgFileioReadReq Msg@@ -121,6 +125,7 @@ | SBPMsgFlashProgram MsgFlashProgram Msg | SBPMsgFlashReadReq MsgFlashReadReq Msg | SBPMsgFlashReadResp MsgFlashReadResp Msg+ | SBPMsgFrontEndGain MsgFrontEndGain Msg | SBPMsgFwd MsgFwd Msg | SBPMsgGloBiases MsgGloBiases Msg | SBPMsgGnssCapb MsgGnssCapb Msg@@ -133,7 +138,7 @@ | SBPMsgIarState MsgIarState Msg | SBPMsgImuAux MsgImuAux Msg | SBPMsgImuRaw MsgImuRaw Msg- | SBPMsgInitBase MsgInitBase Msg+ | SBPMsgInitBaseDep MsgInitBaseDep Msg | SBPMsgInsStatus MsgInsStatus Msg | SBPMsgIono MsgIono Msg | SBPMsgLinuxCpuState MsgLinuxCpuState Msg@@ -163,6 +168,7 @@ | SBPMsgOdometry MsgOdometry Msg | SBPMsgOrientEuler MsgOrientEuler Msg | SBPMsgOrientQuat MsgOrientQuat Msg+ | SBPMsgOsr MsgOsr Msg | SBPMsgPosEcef MsgPosEcef Msg | SBPMsgPosEcefCov MsgPosEcefCov Msg | SBPMsgPosEcefDepA MsgPosEcefDepA Msg@@ -181,30 +187,35 @@ | SBPMsgSettingsReadReq MsgSettingsReadReq Msg | SBPMsgSettingsReadResp MsgSettingsReadResp Msg | SBPMsgSettingsRegister MsgSettingsRegister Msg+ | SBPMsgSettingsRegisterResp MsgSettingsRegisterResp Msg | SBPMsgSettingsSave MsgSettingsSave Msg | SBPMsgSettingsWrite MsgSettingsWrite Msg | SBPMsgSettingsWriteResp MsgSettingsWriteResp Msg | SBPMsgSpecan MsgSpecan Msg | SBPMsgSpecanDep MsgSpecanDep Msg | SBPMsgSsrCodeBiases MsgSsrCodeBiases Msg+ | SBPMsgSsrGridDefinition MsgSsrGridDefinition Msg+ | SBPMsgSsrGriddedCorrection MsgSsrGriddedCorrection Msg | SBPMsgSsrOrbitClock MsgSsrOrbitClock Msg | SBPMsgSsrOrbitClockDepA MsgSsrOrbitClockDepA Msg | SBPMsgSsrPhaseBiases MsgSsrPhaseBiases Msg+ | SBPMsgSsrStecCorrection MsgSsrStecCorrection Msg | SBPMsgStartup MsgStartup Msg | SBPMsgStmFlashLockSector MsgStmFlashLockSector Msg | SBPMsgStmFlashUnlockSector MsgStmFlashUnlockSector Msg | SBPMsgStmUniqueIdReq MsgStmUniqueIdReq Msg | SBPMsgStmUniqueIdResp MsgStmUniqueIdResp Msg+ | SBPMsgSvAzEl MsgSvAzEl Msg | SBPMsgSvConfigurationGpsDep MsgSvConfigurationGpsDep Msg | SBPMsgThreadState MsgThreadState Msg | SBPMsgTrackingIq MsgTrackingIq Msg- | SBPMsgTrackingIqDep MsgTrackingIqDep Msg+ | SBPMsgTrackingIqDepA MsgTrackingIqDepA Msg+ | SBPMsgTrackingIqDepB MsgTrackingIqDepB Msg | SBPMsgTrackingState MsgTrackingState Msg | SBPMsgTrackingStateDepA MsgTrackingStateDepA Msg | SBPMsgTrackingStateDepB MsgTrackingStateDepB Msg | SBPMsgTrackingStateDetailedDep MsgTrackingStateDetailedDep Msg | SBPMsgTrackingStateDetailedDepA MsgTrackingStateDetailedDepA Msg- | SBPMsgTweet MsgTweet Msg | SBPMsgUartState MsgUartState Msg | SBPMsgUartStateDepa MsgUartStateDepa Msg | SBPMsgUserData MsgUserData Msg@@ -272,6 +283,7 @@ | _msgSBPType == msgEphemerisDepC = SBPMsgEphemerisDepC (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisDepD = SBPMsgEphemerisDepD (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGal = SBPMsgEphemerisGal (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgEphemerisGalDepA = SBPMsgEphemerisGalDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGlo = SBPMsgEphemerisGlo (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGloDepA = SBPMsgEphemerisGloDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGloDepB = SBPMsgEphemerisGloDepB (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -280,10 +292,13 @@ | _msgSBPType == msgEphemerisGps = SBPMsgEphemerisGps (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGpsDepE = SBPMsgEphemerisGpsDepE (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGpsDepF = SBPMsgEphemerisGpsDepF (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgEphemerisQzss = SBPMsgEphemerisQzss (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisSbas = SBPMsgEphemerisSbas (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisSbasDepA = SBPMsgEphemerisSbasDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisSbasDepB = SBPMsgEphemerisSbasDepB (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgExtEvent = SBPMsgExtEvent (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgFileioConfigReq = SBPMsgFileioConfigReq (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgFileioConfigResp = SBPMsgFileioConfigResp (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFileioReadDirReq = SBPMsgFileioReadDirReq (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFileioReadDirResp = SBPMsgFileioReadDirResp (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFileioReadReq = SBPMsgFileioReadReq (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -296,6 +311,7 @@ | _msgSBPType == msgFlashProgram = SBPMsgFlashProgram (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFlashReadReq = SBPMsgFlashReadReq (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFlashReadResp = SBPMsgFlashReadResp (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgFrontEndGain = SBPMsgFrontEndGain (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFwd = SBPMsgFwd (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgGloBiases = SBPMsgGloBiases (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgGnssCapb = SBPMsgGnssCapb (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -308,7 +324,7 @@ | _msgSBPType == msgIarState = SBPMsgIarState (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgImuAux = SBPMsgImuAux (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgImuRaw = SBPMsgImuRaw (decode (fromStrict (unBytes _msgSBPPayload))) m- | _msgSBPType == msgInitBase = SBPMsgInitBase (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgInitBaseDep = SBPMsgInitBaseDep (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgInsStatus = SBPMsgInsStatus (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgIono = SBPMsgIono (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgLinuxCpuState = SBPMsgLinuxCpuState (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -338,6 +354,7 @@ | _msgSBPType == msgOdometry = SBPMsgOdometry (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgOrientEuler = SBPMsgOrientEuler (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgOrientQuat = SBPMsgOrientQuat (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgOsr = SBPMsgOsr (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgPosEcef = SBPMsgPosEcef (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgPosEcefCov = SBPMsgPosEcefCov (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgPosEcefDepA = SBPMsgPosEcefDepA (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -356,30 +373,35 @@ | _msgSBPType == msgSettingsReadReq = SBPMsgSettingsReadReq (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSettingsReadResp = SBPMsgSettingsReadResp (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSettingsRegister = SBPMsgSettingsRegister (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgSettingsRegisterResp = SBPMsgSettingsRegisterResp (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSettingsSave = SBPMsgSettingsSave (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSettingsWrite = SBPMsgSettingsWrite (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSettingsWriteResp = SBPMsgSettingsWriteResp (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSpecan = SBPMsgSpecan (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSpecanDep = SBPMsgSpecanDep (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSsrCodeBiases = SBPMsgSsrCodeBiases (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgSsrGridDefinition = SBPMsgSsrGridDefinition (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgSsrGriddedCorrection = SBPMsgSsrGriddedCorrection (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSsrOrbitClock = SBPMsgSsrOrbitClock (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSsrOrbitClockDepA = SBPMsgSsrOrbitClockDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSsrPhaseBiases = SBPMsgSsrPhaseBiases (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgSsrStecCorrection = SBPMsgSsrStecCorrection (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgStartup = SBPMsgStartup (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgStmFlashLockSector = SBPMsgStmFlashLockSector (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgStmFlashUnlockSector = SBPMsgStmFlashUnlockSector (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgStmUniqueIdReq = SBPMsgStmUniqueIdReq (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgStmUniqueIdResp = SBPMsgStmUniqueIdResp (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgSvAzEl = SBPMsgSvAzEl (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgSvConfigurationGpsDep = SBPMsgSvConfigurationGpsDep (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgThreadState = SBPMsgThreadState (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgTrackingIq = SBPMsgTrackingIq (decode (fromStrict (unBytes _msgSBPPayload))) m- | _msgSBPType == msgTrackingIqDep = SBPMsgTrackingIqDep (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgTrackingIqDepA = SBPMsgTrackingIqDepA (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgTrackingIqDepB = SBPMsgTrackingIqDepB (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgTrackingState = SBPMsgTrackingState (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgTrackingStateDepA = SBPMsgTrackingStateDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgTrackingStateDepB = SBPMsgTrackingStateDepB (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgTrackingStateDetailedDep = SBPMsgTrackingStateDetailedDep (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgTrackingStateDetailedDepA = SBPMsgTrackingStateDetailedDepA (decode (fromStrict (unBytes _msgSBPPayload))) m- | _msgSBPType == msgTweet = SBPMsgTweet (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgUartState = SBPMsgUartState (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgUartStateDepa = SBPMsgUartStateDepa (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgUserData = SBPMsgUserData (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -439,6 +461,7 @@ encoder (SBPMsgEphemerisDepC _ m) = put m encoder (SBPMsgEphemerisDepD _ m) = put m encoder (SBPMsgEphemerisGal _ m) = put m+ encoder (SBPMsgEphemerisGalDepA _ m) = put m encoder (SBPMsgEphemerisGlo _ m) = put m encoder (SBPMsgEphemerisGloDepA _ m) = put m encoder (SBPMsgEphemerisGloDepB _ m) = put m@@ -447,10 +470,13 @@ encoder (SBPMsgEphemerisGps _ m) = put m encoder (SBPMsgEphemerisGpsDepE _ m) = put m encoder (SBPMsgEphemerisGpsDepF _ m) = put m+ encoder (SBPMsgEphemerisQzss _ m) = put m encoder (SBPMsgEphemerisSbas _ m) = put m encoder (SBPMsgEphemerisSbasDepA _ m) = put m encoder (SBPMsgEphemerisSbasDepB _ m) = put m encoder (SBPMsgExtEvent _ m) = put m+ encoder (SBPMsgFileioConfigReq _ m) = put m+ encoder (SBPMsgFileioConfigResp _ m) = put m encoder (SBPMsgFileioReadDirReq _ m) = put m encoder (SBPMsgFileioReadDirResp _ m) = put m encoder (SBPMsgFileioReadReq _ m) = put m@@ -463,6 +489,7 @@ encoder (SBPMsgFlashProgram _ m) = put m encoder (SBPMsgFlashReadReq _ m) = put m encoder (SBPMsgFlashReadResp _ m) = put m+ encoder (SBPMsgFrontEndGain _ m) = put m encoder (SBPMsgFwd _ m) = put m encoder (SBPMsgGloBiases _ m) = put m encoder (SBPMsgGnssCapb _ m) = put m@@ -475,7 +502,7 @@ encoder (SBPMsgIarState _ m) = put m encoder (SBPMsgImuAux _ m) = put m encoder (SBPMsgImuRaw _ m) = put m- encoder (SBPMsgInitBase _ m) = put m+ encoder (SBPMsgInitBaseDep _ m) = put m encoder (SBPMsgInsStatus _ m) = put m encoder (SBPMsgIono _ m) = put m encoder (SBPMsgLinuxCpuState _ m) = put m@@ -505,6 +532,7 @@ encoder (SBPMsgOdometry _ m) = put m encoder (SBPMsgOrientEuler _ m) = put m encoder (SBPMsgOrientQuat _ m) = put m+ encoder (SBPMsgOsr _ m) = put m encoder (SBPMsgPosEcef _ m) = put m encoder (SBPMsgPosEcefCov _ m) = put m encoder (SBPMsgPosEcefDepA _ m) = put m@@ -523,30 +551,35 @@ encoder (SBPMsgSettingsReadReq _ m) = put m encoder (SBPMsgSettingsReadResp _ m) = put m encoder (SBPMsgSettingsRegister _ m) = put m+ encoder (SBPMsgSettingsRegisterResp _ m) = put m encoder (SBPMsgSettingsSave _ m) = put m encoder (SBPMsgSettingsWrite _ m) = put m encoder (SBPMsgSettingsWriteResp _ m) = put m encoder (SBPMsgSpecan _ m) = put m encoder (SBPMsgSpecanDep _ m) = put m encoder (SBPMsgSsrCodeBiases _ m) = put m+ encoder (SBPMsgSsrGridDefinition _ m) = put m+ encoder (SBPMsgSsrGriddedCorrection _ m) = put m encoder (SBPMsgSsrOrbitClock _ m) = put m encoder (SBPMsgSsrOrbitClockDepA _ m) = put m encoder (SBPMsgSsrPhaseBiases _ m) = put m+ encoder (SBPMsgSsrStecCorrection _ m) = put m encoder (SBPMsgStartup _ m) = put m encoder (SBPMsgStmFlashLockSector _ m) = put m encoder (SBPMsgStmFlashUnlockSector _ m) = put m encoder (SBPMsgStmUniqueIdReq _ m) = put m encoder (SBPMsgStmUniqueIdResp _ m) = put m+ encoder (SBPMsgSvAzEl _ m) = put m encoder (SBPMsgSvConfigurationGpsDep _ m) = put m encoder (SBPMsgThreadState _ m) = put m encoder (SBPMsgTrackingIq _ m) = put m- encoder (SBPMsgTrackingIqDep _ m) = put m+ encoder (SBPMsgTrackingIqDepA _ m) = put m+ encoder (SBPMsgTrackingIqDepB _ m) = put m encoder (SBPMsgTrackingState _ m) = put m encoder (SBPMsgTrackingStateDepA _ m) = put m encoder (SBPMsgTrackingStateDepB _ m) = put m encoder (SBPMsgTrackingStateDetailedDep _ m) = put m encoder (SBPMsgTrackingStateDetailedDepA _ m) = put m- encoder (SBPMsgTweet _ m) = put m encoder (SBPMsgUartState _ m) = put m encoder (SBPMsgUartStateDepa _ m) = put m encoder (SBPMsgUserData _ m) = put m@@ -610,6 +643,7 @@ | msgType == msgEphemerisDepC = SBPMsgEphemerisDepC <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisDepD = SBPMsgEphemerisDepD <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisGal = SBPMsgEphemerisGal <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgEphemerisGalDepA = SBPMsgEphemerisGalDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisGlo = SBPMsgEphemerisGlo <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisGloDepA = SBPMsgEphemerisGloDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisGloDepB = SBPMsgEphemerisGloDepB <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -618,10 +652,13 @@ | msgType == msgEphemerisGps = SBPMsgEphemerisGps <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisGpsDepE = SBPMsgEphemerisGpsDepE <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisGpsDepF = SBPMsgEphemerisGpsDepF <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgEphemerisQzss = SBPMsgEphemerisQzss <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisSbas = SBPMsgEphemerisSbas <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisSbasDepA = SBPMsgEphemerisSbasDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisSbasDepB = SBPMsgEphemerisSbasDepB <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgExtEvent = SBPMsgExtEvent <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgFileioConfigReq = SBPMsgFileioConfigReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgFileioConfigResp = SBPMsgFileioConfigResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFileioReadDirReq = SBPMsgFileioReadDirReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFileioReadDirResp = SBPMsgFileioReadDirResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFileioReadReq = SBPMsgFileioReadReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -634,6 +671,7 @@ | msgType == msgFlashProgram = SBPMsgFlashProgram <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFlashReadReq = SBPMsgFlashReadReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFlashReadResp = SBPMsgFlashReadResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgFrontEndGain = SBPMsgFrontEndGain <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFwd = SBPMsgFwd <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgGloBiases = SBPMsgGloBiases <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgGnssCapb = SBPMsgGnssCapb <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -646,7 +684,7 @@ | msgType == msgIarState = SBPMsgIarState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgImuAux = SBPMsgImuAux <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgImuRaw = SBPMsgImuRaw <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj- | msgType == msgInitBase = SBPMsgInitBase <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgInitBaseDep = SBPMsgInitBaseDep <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgInsStatus = SBPMsgInsStatus <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgIono = SBPMsgIono <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgLinuxCpuState = SBPMsgLinuxCpuState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -676,6 +714,7 @@ | msgType == msgOdometry = SBPMsgOdometry <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgOrientEuler = SBPMsgOrientEuler <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgOrientQuat = SBPMsgOrientQuat <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgOsr = SBPMsgOsr <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgPosEcef = SBPMsgPosEcef <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgPosEcefCov = SBPMsgPosEcefCov <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgPosEcefDepA = SBPMsgPosEcefDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -694,30 +733,35 @@ | msgType == msgSettingsReadReq = SBPMsgSettingsReadReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSettingsReadResp = SBPMsgSettingsReadResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSettingsRegister = SBPMsgSettingsRegister <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgSettingsRegisterResp = SBPMsgSettingsRegisterResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSettingsSave = SBPMsgSettingsSave <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSettingsWrite = SBPMsgSettingsWrite <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSettingsWriteResp = SBPMsgSettingsWriteResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSpecan = SBPMsgSpecan <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSpecanDep = SBPMsgSpecanDep <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSsrCodeBiases = SBPMsgSsrCodeBiases <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgSsrGridDefinition = SBPMsgSsrGridDefinition <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgSsrGriddedCorrection = SBPMsgSsrGriddedCorrection <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSsrOrbitClock = SBPMsgSsrOrbitClock <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSsrOrbitClockDepA = SBPMsgSsrOrbitClockDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSsrPhaseBiases = SBPMsgSsrPhaseBiases <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgSsrStecCorrection = SBPMsgSsrStecCorrection <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgStartup = SBPMsgStartup <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgStmFlashLockSector = SBPMsgStmFlashLockSector <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgStmFlashUnlockSector = SBPMsgStmFlashUnlockSector <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgStmUniqueIdReq = SBPMsgStmUniqueIdReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgStmUniqueIdResp = SBPMsgStmUniqueIdResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgSvAzEl = SBPMsgSvAzEl <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgSvConfigurationGpsDep = SBPMsgSvConfigurationGpsDep <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgThreadState = SBPMsgThreadState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgTrackingIq = SBPMsgTrackingIq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj- | msgType == msgTrackingIqDep = SBPMsgTrackingIqDep <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgTrackingIqDepA = SBPMsgTrackingIqDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgTrackingIqDepB = SBPMsgTrackingIqDepB <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgTrackingState = SBPMsgTrackingState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgTrackingStateDepA = SBPMsgTrackingStateDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgTrackingStateDepB = SBPMsgTrackingStateDepB <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgTrackingStateDetailedDep = SBPMsgTrackingStateDetailedDep <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgTrackingStateDetailedDepA = SBPMsgTrackingStateDetailedDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj- | msgType == msgTweet = SBPMsgTweet <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgUartState = SBPMsgUartState <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgUartStateDepa = SBPMsgUartStateDepa <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgUserData = SBPMsgUserData <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -746,7 +790,7 @@ toJSON (SBPMsgAcqSvProfile n m) = toJSON n <<>> toJSON m toJSON (SBPMsgAcqSvProfileDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgAgeCorrections n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgAlmanac n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgAlmanac _ m) = toJSON m toJSON (SBPMsgAlmanacGlo n m) = toJSON n <<>> toJSON m toJSON (SBPMsgAlmanacGloDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgAlmanacGps n m) = toJSON n <<>> toJSON m@@ -761,7 +805,7 @@ toJSON (SBPMsgBaselineNed n m) = toJSON n <<>> toJSON m toJSON (SBPMsgBaselineNedDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgBootloaderHandshakeDepA n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgBootloaderHandshakeReq n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgBootloaderHandshakeReq _ m) = toJSON m toJSON (SBPMsgBootloaderHandshakeResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgBootloaderJumpToApp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgCellModemStatus n m) = toJSON n <<>> toJSON m@@ -770,8 +814,8 @@ toJSON (SBPMsgCommandResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgCsacTelemetry n m) = toJSON n <<>> toJSON m toJSON (SBPMsgCsacTelemetryLabels n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgCwResults n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgCwStart n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgCwResults _ m) = toJSON m+ toJSON (SBPMsgCwStart _ m) = toJSON m toJSON (SBPMsgDeviceMonitor n m) = toJSON n <<>> toJSON m toJSON (SBPMsgDgnssStatus n m) = toJSON n <<>> toJSON m toJSON (SBPMsgDops n m) = toJSON n <<>> toJSON m@@ -782,6 +826,7 @@ toJSON (SBPMsgEphemerisDepC n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisDepD n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGal n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgEphemerisGalDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGlo n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGloDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGloDepB n m) = toJSON n <<>> toJSON m@@ -790,10 +835,13 @@ toJSON (SBPMsgEphemerisGps n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGpsDepE n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGpsDepF n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgEphemerisQzss n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisSbas n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisSbasDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisSbasDepB n m) = toJSON n <<>> toJSON m toJSON (SBPMsgExtEvent n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgFileioConfigReq n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgFileioConfigResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFileioReadDirReq n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFileioReadDirResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFileioReadReq n m) = toJSON n <<>> toJSON m@@ -806,6 +854,7 @@ toJSON (SBPMsgFlashProgram n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFlashReadReq n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFlashReadResp n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgFrontEndGain n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFwd n m) = toJSON n <<>> toJSON m toJSON (SBPMsgGloBiases n m) = toJSON n <<>> toJSON m toJSON (SBPMsgGnssCapb n m) = toJSON n <<>> toJSON m@@ -818,7 +867,7 @@ toJSON (SBPMsgIarState n m) = toJSON n <<>> toJSON m toJSON (SBPMsgImuAux n m) = toJSON n <<>> toJSON m toJSON (SBPMsgImuRaw n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgInitBase n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgInitBaseDep _ m) = toJSON m toJSON (SBPMsgInsStatus n m) = toJSON n <<>> toJSON m toJSON (SBPMsgIono n m) = toJSON n <<>> toJSON m toJSON (SBPMsgLinuxCpuState n m) = toJSON n <<>> toJSON m@@ -835,11 +884,11 @@ toJSON (SBPMsgMaskSatellite n m) = toJSON n <<>> toJSON m toJSON (SBPMsgMaskSatelliteDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgMeasurementState n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgNapDeviceDnaReq n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgNapDeviceDnaReq _ m) = toJSON m toJSON (SBPMsgNapDeviceDnaResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgNdbEvent n m) = toJSON n <<>> toJSON m toJSON (SBPMsgNetworkBandwidthUsage n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgNetworkStateReq n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgNetworkStateReq _ m) = toJSON m toJSON (SBPMsgNetworkStateResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgObs n m) = toJSON n <<>> toJSON m toJSON (SBPMsgObsDepA n m) = toJSON n <<>> toJSON m@@ -848,6 +897,7 @@ toJSON (SBPMsgOdometry n m) = toJSON n <<>> toJSON m toJSON (SBPMsgOrientEuler n m) = toJSON n <<>> toJSON m toJSON (SBPMsgOrientQuat n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgOsr n m) = toJSON n <<>> toJSON m toJSON (SBPMsgPosEcef n m) = toJSON n <<>> toJSON m toJSON (SBPMsgPosEcefCov n m) = toJSON n <<>> toJSON m toJSON (SBPMsgPosEcefDepA n m) = toJSON n <<>> toJSON m@@ -856,40 +906,45 @@ toJSON (SBPMsgPosLlhDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgPrintDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgReset n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgResetDep n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgResetDep _ m) = toJSON m toJSON (SBPMsgResetFilters n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSbasRaw n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgSetTime n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgSettingsReadByIndexDone n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSetTime _ m) = toJSON m+ toJSON (SBPMsgSettingsReadByIndexDone _ m) = toJSON m toJSON (SBPMsgSettingsReadByIndexReq n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSettingsReadByIndexResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSettingsReadReq n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSettingsReadResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSettingsRegister n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgSettingsSave n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSettingsRegisterResp n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSettingsSave _ m) = toJSON m toJSON (SBPMsgSettingsWrite n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSettingsWriteResp n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSpecan n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSpecanDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSsrCodeBiases n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSsrGridDefinition n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSsrGriddedCorrection n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSsrOrbitClock n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSsrOrbitClockDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSsrPhaseBiases n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSsrStecCorrection n m) = toJSON n <<>> toJSON m toJSON (SBPMsgStartup n m) = toJSON n <<>> toJSON m toJSON (SBPMsgStmFlashLockSector n m) = toJSON n <<>> toJSON m toJSON (SBPMsgStmFlashUnlockSector n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgStmUniqueIdReq n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgStmUniqueIdReq _ m) = toJSON m toJSON (SBPMsgStmUniqueIdResp n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgSvAzEl n m) = toJSON n <<>> toJSON m toJSON (SBPMsgSvConfigurationGpsDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgThreadState n m) = toJSON n <<>> toJSON m toJSON (SBPMsgTrackingIq n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgTrackingIqDep n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgTrackingIqDepA n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgTrackingIqDepB n m) = toJSON n <<>> toJSON m toJSON (SBPMsgTrackingState n m) = toJSON n <<>> toJSON m toJSON (SBPMsgTrackingStateDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgTrackingStateDepB n m) = toJSON n <<>> toJSON m toJSON (SBPMsgTrackingStateDetailedDep n m) = toJSON n <<>> toJSON m toJSON (SBPMsgTrackingStateDetailedDepA n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgTweet n m) = toJSON n <<>> toJSON m toJSON (SBPMsgUartState n m) = toJSON n <<>> toJSON m toJSON (SBPMsgUartStateDepa n m) = toJSON n <<>> toJSON m toJSON (SBPMsgUserData n m) = toJSON n <<>> toJSON m@@ -948,6 +1003,7 @@ msg f (SBPMsgEphemerisDepC n m) = SBPMsgEphemerisDepC n <$> f m msg f (SBPMsgEphemerisDepD n m) = SBPMsgEphemerisDepD n <$> f m msg f (SBPMsgEphemerisGal n m) = SBPMsgEphemerisGal n <$> f m+ msg f (SBPMsgEphemerisGalDepA n m) = SBPMsgEphemerisGalDepA n <$> f m msg f (SBPMsgEphemerisGlo n m) = SBPMsgEphemerisGlo n <$> f m msg f (SBPMsgEphemerisGloDepA n m) = SBPMsgEphemerisGloDepA n <$> f m msg f (SBPMsgEphemerisGloDepB n m) = SBPMsgEphemerisGloDepB n <$> f m@@ -956,10 +1012,13 @@ msg f (SBPMsgEphemerisGps n m) = SBPMsgEphemerisGps n <$> f m msg f (SBPMsgEphemerisGpsDepE n m) = SBPMsgEphemerisGpsDepE n <$> f m msg f (SBPMsgEphemerisGpsDepF n m) = SBPMsgEphemerisGpsDepF n <$> f m+ msg f (SBPMsgEphemerisQzss n m) = SBPMsgEphemerisQzss n <$> f m msg f (SBPMsgEphemerisSbas n m) = SBPMsgEphemerisSbas n <$> f m msg f (SBPMsgEphemerisSbasDepA n m) = SBPMsgEphemerisSbasDepA n <$> f m msg f (SBPMsgEphemerisSbasDepB n m) = SBPMsgEphemerisSbasDepB n <$> f m msg f (SBPMsgExtEvent n m) = SBPMsgExtEvent n <$> f m+ msg f (SBPMsgFileioConfigReq n m) = SBPMsgFileioConfigReq n <$> f m+ msg f (SBPMsgFileioConfigResp n m) = SBPMsgFileioConfigResp n <$> f m msg f (SBPMsgFileioReadDirReq n m) = SBPMsgFileioReadDirReq n <$> f m msg f (SBPMsgFileioReadDirResp n m) = SBPMsgFileioReadDirResp n <$> f m msg f (SBPMsgFileioReadReq n m) = SBPMsgFileioReadReq n <$> f m@@ -972,6 +1031,7 @@ msg f (SBPMsgFlashProgram n m) = SBPMsgFlashProgram n <$> f m msg f (SBPMsgFlashReadReq n m) = SBPMsgFlashReadReq n <$> f m msg f (SBPMsgFlashReadResp n m) = SBPMsgFlashReadResp n <$> f m+ msg f (SBPMsgFrontEndGain n m) = SBPMsgFrontEndGain n <$> f m msg f (SBPMsgFwd n m) = SBPMsgFwd n <$> f m msg f (SBPMsgGloBiases n m) = SBPMsgGloBiases n <$> f m msg f (SBPMsgGnssCapb n m) = SBPMsgGnssCapb n <$> f m@@ -984,7 +1044,7 @@ msg f (SBPMsgIarState n m) = SBPMsgIarState n <$> f m msg f (SBPMsgImuAux n m) = SBPMsgImuAux n <$> f m msg f (SBPMsgImuRaw n m) = SBPMsgImuRaw n <$> f m- msg f (SBPMsgInitBase n m) = SBPMsgInitBase n <$> f m+ msg f (SBPMsgInitBaseDep n m) = SBPMsgInitBaseDep n <$> f m msg f (SBPMsgInsStatus n m) = SBPMsgInsStatus n <$> f m msg f (SBPMsgIono n m) = SBPMsgIono n <$> f m msg f (SBPMsgLinuxCpuState n m) = SBPMsgLinuxCpuState n <$> f m@@ -1014,6 +1074,7 @@ msg f (SBPMsgOdometry n m) = SBPMsgOdometry n <$> f m msg f (SBPMsgOrientEuler n m) = SBPMsgOrientEuler n <$> f m msg f (SBPMsgOrientQuat n m) = SBPMsgOrientQuat n <$> f m+ msg f (SBPMsgOsr n m) = SBPMsgOsr n <$> f m msg f (SBPMsgPosEcef n m) = SBPMsgPosEcef n <$> f m msg f (SBPMsgPosEcefCov n m) = SBPMsgPosEcefCov n <$> f m msg f (SBPMsgPosEcefDepA n m) = SBPMsgPosEcefDepA n <$> f m@@ -1032,30 +1093,35 @@ msg f (SBPMsgSettingsReadReq n m) = SBPMsgSettingsReadReq n <$> f m msg f (SBPMsgSettingsReadResp n m) = SBPMsgSettingsReadResp n <$> f m msg f (SBPMsgSettingsRegister n m) = SBPMsgSettingsRegister n <$> f m+ msg f (SBPMsgSettingsRegisterResp n m) = SBPMsgSettingsRegisterResp n <$> f m msg f (SBPMsgSettingsSave n m) = SBPMsgSettingsSave n <$> f m msg f (SBPMsgSettingsWrite n m) = SBPMsgSettingsWrite n <$> f m msg f (SBPMsgSettingsWriteResp n m) = SBPMsgSettingsWriteResp n <$> f m msg f (SBPMsgSpecan n m) = SBPMsgSpecan n <$> f m msg f (SBPMsgSpecanDep n m) = SBPMsgSpecanDep n <$> f m msg f (SBPMsgSsrCodeBiases n m) = SBPMsgSsrCodeBiases n <$> f m+ msg f (SBPMsgSsrGridDefinition n m) = SBPMsgSsrGridDefinition n <$> f m+ msg f (SBPMsgSsrGriddedCorrection n m) = SBPMsgSsrGriddedCorrection n <$> f m msg f (SBPMsgSsrOrbitClock n m) = SBPMsgSsrOrbitClock n <$> f m msg f (SBPMsgSsrOrbitClockDepA n m) = SBPMsgSsrOrbitClockDepA n <$> f m msg f (SBPMsgSsrPhaseBiases n m) = SBPMsgSsrPhaseBiases n <$> f m+ msg f (SBPMsgSsrStecCorrection n m) = SBPMsgSsrStecCorrection n <$> f m msg f (SBPMsgStartup n m) = SBPMsgStartup n <$> f m msg f (SBPMsgStmFlashLockSector n m) = SBPMsgStmFlashLockSector n <$> f m msg f (SBPMsgStmFlashUnlockSector n m) = SBPMsgStmFlashUnlockSector n <$> f m msg f (SBPMsgStmUniqueIdReq n m) = SBPMsgStmUniqueIdReq n <$> f m msg f (SBPMsgStmUniqueIdResp n m) = SBPMsgStmUniqueIdResp n <$> f m+ msg f (SBPMsgSvAzEl n m) = SBPMsgSvAzEl n <$> f m msg f (SBPMsgSvConfigurationGpsDep n m) = SBPMsgSvConfigurationGpsDep n <$> f m msg f (SBPMsgThreadState n m) = SBPMsgThreadState n <$> f m msg f (SBPMsgTrackingIq n m) = SBPMsgTrackingIq n <$> f m- msg f (SBPMsgTrackingIqDep n m) = SBPMsgTrackingIqDep n <$> f m+ msg f (SBPMsgTrackingIqDepA n m) = SBPMsgTrackingIqDepA n <$> f m+ msg f (SBPMsgTrackingIqDepB n m) = SBPMsgTrackingIqDepB n <$> f m msg f (SBPMsgTrackingState n m) = SBPMsgTrackingState n <$> f m msg f (SBPMsgTrackingStateDepA n m) = SBPMsgTrackingStateDepA n <$> f m msg f (SBPMsgTrackingStateDepB n m) = SBPMsgTrackingStateDepB n <$> f m msg f (SBPMsgTrackingStateDetailedDep n m) = SBPMsgTrackingStateDetailedDep n <$> f m msg f (SBPMsgTrackingStateDetailedDepA n m) = SBPMsgTrackingStateDetailedDepA n <$> f m- msg f (SBPMsgTweet n m) = SBPMsgTweet n <$> f m msg f (SBPMsgUartState n m) = SBPMsgUartState n <$> f m msg f (SBPMsgUartStateDepa n m) = SBPMsgUartStateDepa n <$> f m msg f (SBPMsgUserData n m) = SBPMsgUserData n <$> f m
@@ -85,7 +85,7 @@ put MsgGpsTime {..} = do putWord16le _msgGpsTime_wn putWord32le _msgGpsTime_tow- putWord32le $ fromIntegral _msgGpsTime_ns_residual+ (putWord32le . fromIntegral) _msgGpsTime_ns_residual putWord8 _msgGpsTime_flags $(makeSBP 'msgGpsTime ''MsgGpsTime)@@ -496,9 +496,9 @@ put MsgBaselineEcef {..} = do putWord32le _msgBaselineEcef_tow- putWord32le $ fromIntegral _msgBaselineEcef_x- putWord32le $ fromIntegral _msgBaselineEcef_y- putWord32le $ fromIntegral _msgBaselineEcef_z+ (putWord32le . fromIntegral) _msgBaselineEcef_x+ (putWord32le . fromIntegral) _msgBaselineEcef_y+ (putWord32le . fromIntegral) _msgBaselineEcef_z putWord16le _msgBaselineEcef_accuracy putWord8 _msgBaselineEcef_n_sats putWord8 _msgBaselineEcef_flags@@ -551,9 +551,9 @@ put MsgBaselineNed {..} = do putWord32le _msgBaselineNed_tow- putWord32le $ fromIntegral _msgBaselineNed_n- putWord32le $ fromIntegral _msgBaselineNed_e- putWord32le $ fromIntegral _msgBaselineNed_d+ (putWord32le . fromIntegral) _msgBaselineNed_n+ (putWord32le . fromIntegral) _msgBaselineNed_e+ (putWord32le . fromIntegral) _msgBaselineNed_d putWord16le _msgBaselineNed_h_accuracy putWord16le _msgBaselineNed_v_accuracy putWord8 _msgBaselineNed_n_sats@@ -601,9 +601,9 @@ put MsgVelEcef {..} = do putWord32le _msgVelEcef_tow- putWord32le $ fromIntegral _msgVelEcef_x- putWord32le $ fromIntegral _msgVelEcef_y- putWord32le $ fromIntegral _msgVelEcef_z+ (putWord32le . fromIntegral) _msgVelEcef_x+ (putWord32le . fromIntegral) _msgVelEcef_y+ (putWord32le . fromIntegral) _msgVelEcef_z putWord16le _msgVelEcef_accuracy putWord8 _msgVelEcef_n_sats putWord8 _msgVelEcef_flags@@ -665,9 +665,9 @@ put MsgVelEcefCov {..} = do putWord32le _msgVelEcefCov_tow- putWord32le $ fromIntegral _msgVelEcefCov_x- putWord32le $ fromIntegral _msgVelEcefCov_y- putWord32le $ fromIntegral _msgVelEcefCov_z+ (putWord32le . fromIntegral) _msgVelEcefCov_x+ (putWord32le . fromIntegral) _msgVelEcefCov_y+ (putWord32le . fromIntegral) _msgVelEcefCov_z putFloat32le _msgVelEcefCov_cov_x_x putFloat32le _msgVelEcefCov_cov_x_y putFloat32le _msgVelEcefCov_cov_x_z@@ -723,9 +723,9 @@ put MsgVelNed {..} = do putWord32le _msgVelNed_tow- putWord32le $ fromIntegral _msgVelNed_n- putWord32le $ fromIntegral _msgVelNed_e- putWord32le $ fromIntegral _msgVelNed_d+ (putWord32le . fromIntegral) _msgVelNed_n+ (putWord32le . fromIntegral) _msgVelNed_e+ (putWord32le . fromIntegral) _msgVelNed_d putWord16le _msgVelNed_h_accuracy putWord16le _msgVelNed_v_accuracy putWord8 _msgVelNed_n_sats@@ -791,9 +791,9 @@ put MsgVelNedCov {..} = do putWord32le _msgVelNedCov_tow- putWord32le $ fromIntegral _msgVelNedCov_n- putWord32le $ fromIntegral _msgVelNedCov_e- putWord32le $ fromIntegral _msgVelNedCov_d+ (putWord32le . fromIntegral) _msgVelNedCov_n+ (putWord32le . fromIntegral) _msgVelNedCov_e+ (putWord32le . fromIntegral) _msgVelNedCov_d putFloat32le _msgVelNedCov_cov_n_n putFloat32le _msgVelNedCov_cov_n_e putFloat32le _msgVelNedCov_cov_n_d@@ -866,9 +866,9 @@ put MsgVelBody {..} = do putWord32le _msgVelBody_tow- putWord32le $ fromIntegral _msgVelBody_x- putWord32le $ fromIntegral _msgVelBody_y- putWord32le $ fromIntegral _msgVelBody_z+ (putWord32le . fromIntegral) _msgVelBody_x+ (putWord32le . fromIntegral) _msgVelBody_y+ (putWord32le . fromIntegral) _msgVelBody_z putFloat32le _msgVelBody_cov_x_x putFloat32le _msgVelBody_cov_x_y putFloat32le _msgVelBody_cov_x_z@@ -947,7 +947,7 @@ put MsgGpsTimeDepA {..} = do putWord16le _msgGpsTimeDepA_wn putWord32le _msgGpsTimeDepA_tow- putWord32le $ fromIntegral _msgGpsTimeDepA_ns_residual+ (putWord32le . fromIntegral) _msgGpsTimeDepA_ns_residual putWord8 _msgGpsTimeDepA_flags $(makeSBP 'msgGpsTimeDepA ''MsgGpsTimeDepA)@@ -1147,9 +1147,9 @@ put MsgBaselineEcefDepA {..} = do putWord32le _msgBaselineEcefDepA_tow- putWord32le $ fromIntegral _msgBaselineEcefDepA_x- putWord32le $ fromIntegral _msgBaselineEcefDepA_y- putWord32le $ fromIntegral _msgBaselineEcefDepA_z+ (putWord32le . fromIntegral) _msgBaselineEcefDepA_x+ (putWord32le . fromIntegral) _msgBaselineEcefDepA_y+ (putWord32le . fromIntegral) _msgBaselineEcefDepA_z putWord16le _msgBaselineEcefDepA_accuracy putWord8 _msgBaselineEcefDepA_n_sats putWord8 _msgBaselineEcefDepA_flags@@ -1202,9 +1202,9 @@ put MsgBaselineNedDepA {..} = do putWord32le _msgBaselineNedDepA_tow- putWord32le $ fromIntegral _msgBaselineNedDepA_n- putWord32le $ fromIntegral _msgBaselineNedDepA_e- putWord32le $ fromIntegral _msgBaselineNedDepA_d+ (putWord32le . fromIntegral) _msgBaselineNedDepA_n+ (putWord32le . fromIntegral) _msgBaselineNedDepA_e+ (putWord32le . fromIntegral) _msgBaselineNedDepA_d putWord16le _msgBaselineNedDepA_h_accuracy putWord16le _msgBaselineNedDepA_v_accuracy putWord8 _msgBaselineNedDepA_n_sats@@ -1252,9 +1252,9 @@ put MsgVelEcefDepA {..} = do putWord32le _msgVelEcefDepA_tow- putWord32le $ fromIntegral _msgVelEcefDepA_x- putWord32le $ fromIntegral _msgVelEcefDepA_y- putWord32le $ fromIntegral _msgVelEcefDepA_z+ (putWord32le . fromIntegral) _msgVelEcefDepA_x+ (putWord32le . fromIntegral) _msgVelEcefDepA_y+ (putWord32le . fromIntegral) _msgVelEcefDepA_z putWord16le _msgVelEcefDepA_accuracy putWord8 _msgVelEcefDepA_n_sats putWord8 _msgVelEcefDepA_flags@@ -1305,9 +1305,9 @@ put MsgVelNedDepA {..} = do putWord32le _msgVelNedDepA_tow- putWord32le $ fromIntegral _msgVelNedDepA_n- putWord32le $ fromIntegral _msgVelNedDepA_e- putWord32le $ fromIntegral _msgVelNedDepA_d+ (putWord32le . fromIntegral) _msgVelNedDepA_n+ (putWord32le . fromIntegral) _msgVelNedDepA_e+ (putWord32le . fromIntegral) _msgVelNedDepA_d putWord16le _msgVelNedDepA_h_accuracy putWord16le _msgVelNedDepA_v_accuracy putWord8 _msgVelNedDepA_n_sats
@@ -79,7 +79,7 @@ pure Doppler {..} put Doppler {..} = do- putWord16le $ fromIntegral _doppler_i+ (putWord16le . fromIntegral) _doppler_i putWord8 _doppler_f $(makeJSON "_doppler_" ''Doppler)@@ -139,6 +139,58 @@ $(makeJSON "_packedObsContent_" ''PackedObsContent) $(makeLenses ''PackedObsContent) +-- | PackedOsrContent.+--+-- Pseudorange and carrier phase network corrections for a satellite signal.+data PackedOsrContent = PackedOsrContent+ { _packedOsrContent_P :: !Word32+ -- ^ Pseudorange observation+ , _packedOsrContent_L :: !CarrierPhase+ -- ^ Carrier phase observation with typical sign convention.+ , _packedOsrContent_lock :: !Word8+ -- ^ Lock timer. This value gives an indication of the time for which a+ -- signal has maintained continuous phase lock. Whenever a signal has lost+ -- and regained lock, this value is reset to zero. It is encoded according+ -- to DF402 from the RTCM 10403.2 Amendment 2 specification. Valid values+ -- range from 0 to 15 and the most significant nibble is reserved for+ -- future use.+ , _packedOsrContent_flags :: !Word8+ -- ^ Correction flags.+ , _packedOsrContent_sid :: !GnssSignal+ -- ^ GNSS signal identifier (16 bit)+ , _packedOsrContent_iono_std :: !Word16+ -- ^ Slant ionospheric correction standard deviation+ , _packedOsrContent_tropo_std :: !Word16+ -- ^ Slant tropospheric correction standard deviation+ , _packedOsrContent_range_std :: !Word16+ -- ^ Orbit/clock/bias correction projected on range standard deviation+ } deriving ( Show, Read, Eq )++instance Binary PackedOsrContent where+ get = do+ _packedOsrContent_P <- getWord32le+ _packedOsrContent_L <- get+ _packedOsrContent_lock <- getWord8+ _packedOsrContent_flags <- getWord8+ _packedOsrContent_sid <- get+ _packedOsrContent_iono_std <- getWord16le+ _packedOsrContent_tropo_std <- getWord16le+ _packedOsrContent_range_std <- getWord16le+ pure PackedOsrContent {..}++ put PackedOsrContent {..} = do+ putWord32le _packedOsrContent_P+ put _packedOsrContent_L+ putWord8 _packedOsrContent_lock+ putWord8 _packedOsrContent_flags+ put _packedOsrContent_sid+ putWord16le _packedOsrContent_iono_std+ putWord16le _packedOsrContent_tropo_std+ putWord16le _packedOsrContent_range_std++$(makeJSON "_packedOsrContent_" ''PackedOsrContent)+$(makeLenses ''PackedOsrContent)+ msgObs :: Word16 msgObs = 0x004A @@ -703,6 +755,122 @@ $(makeJSON "_msgEphemerisGps_" ''MsgEphemerisGps) $(makeLenses ''MsgEphemerisGps) +msgEphemerisQzss :: Word16+msgEphemerisQzss = 0x008E++-- | SBP class for message MSG_EPHEMERIS_QZSS (0x008E).+--+-- The ephemeris message returns a set of satellite orbit parameters that is+-- used to calculate QZSS satellite position, velocity, and clock offset.+data MsgEphemerisQzss = MsgEphemerisQzss+ { _msgEphemerisQzss_common :: !EphemerisCommonContent+ -- ^ Values common for all ephemeris types+ , _msgEphemerisQzss_tgd :: !Float+ -- ^ Group delay differential between L1 and L2+ , _msgEphemerisQzss_c_rs :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the orbit radius+ , _msgEphemerisQzss_c_rc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the orbit radius+ , _msgEphemerisQzss_c_uc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisQzss_c_us :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisQzss_c_ic :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisQzss_c_is :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisQzss_dn :: !Double+ -- ^ Mean motion difference+ , _msgEphemerisQzss_m0 :: !Double+ -- ^ Mean anomaly at reference time+ , _msgEphemerisQzss_ecc :: !Double+ -- ^ Eccentricity of satellite orbit+ , _msgEphemerisQzss_sqrta :: !Double+ -- ^ Square root of the semi-major axis of orbit+ , _msgEphemerisQzss_omega0 :: !Double+ -- ^ Longitude of ascending node of orbit plane at weekly epoch+ , _msgEphemerisQzss_omegadot :: !Double+ -- ^ Rate of right ascension+ , _msgEphemerisQzss_w :: !Double+ -- ^ Argument of perigee+ , _msgEphemerisQzss_inc :: !Double+ -- ^ Inclination+ , _msgEphemerisQzss_inc_dot :: !Double+ -- ^ Inclination first derivative+ , _msgEphemerisQzss_af0 :: !Float+ -- ^ Polynomial clock correction coefficient (clock bias)+ , _msgEphemerisQzss_af1 :: !Float+ -- ^ Polynomial clock correction coefficient (clock drift)+ , _msgEphemerisQzss_af2 :: !Float+ -- ^ Polynomial clock correction coefficient (rate of clock drift)+ , _msgEphemerisQzss_toc :: !GpsTimeSec+ -- ^ Clock reference+ , _msgEphemerisQzss_iode :: !Word8+ -- ^ Issue of ephemeris data+ , _msgEphemerisQzss_iodc :: !Word16+ -- ^ Issue of clock data+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisQzss where+ get = do+ _msgEphemerisQzss_common <- get+ _msgEphemerisQzss_tgd <- getFloat32le+ _msgEphemerisQzss_c_rs <- getFloat32le+ _msgEphemerisQzss_c_rc <- getFloat32le+ _msgEphemerisQzss_c_uc <- getFloat32le+ _msgEphemerisQzss_c_us <- getFloat32le+ _msgEphemerisQzss_c_ic <- getFloat32le+ _msgEphemerisQzss_c_is <- getFloat32le+ _msgEphemerisQzss_dn <- getFloat64le+ _msgEphemerisQzss_m0 <- getFloat64le+ _msgEphemerisQzss_ecc <- getFloat64le+ _msgEphemerisQzss_sqrta <- getFloat64le+ _msgEphemerisQzss_omega0 <- getFloat64le+ _msgEphemerisQzss_omegadot <- getFloat64le+ _msgEphemerisQzss_w <- getFloat64le+ _msgEphemerisQzss_inc <- getFloat64le+ _msgEphemerisQzss_inc_dot <- getFloat64le+ _msgEphemerisQzss_af0 <- getFloat32le+ _msgEphemerisQzss_af1 <- getFloat32le+ _msgEphemerisQzss_af2 <- getFloat32le+ _msgEphemerisQzss_toc <- get+ _msgEphemerisQzss_iode <- getWord8+ _msgEphemerisQzss_iodc <- getWord16le+ pure MsgEphemerisQzss {..}++ put MsgEphemerisQzss {..} = do+ put _msgEphemerisQzss_common+ putFloat32le _msgEphemerisQzss_tgd+ putFloat32le _msgEphemerisQzss_c_rs+ putFloat32le _msgEphemerisQzss_c_rc+ putFloat32le _msgEphemerisQzss_c_uc+ putFloat32le _msgEphemerisQzss_c_us+ putFloat32le _msgEphemerisQzss_c_ic+ putFloat32le _msgEphemerisQzss_c_is+ putFloat64le _msgEphemerisQzss_dn+ putFloat64le _msgEphemerisQzss_m0+ putFloat64le _msgEphemerisQzss_ecc+ putFloat64le _msgEphemerisQzss_sqrta+ putFloat64le _msgEphemerisQzss_omega0+ putFloat64le _msgEphemerisQzss_omegadot+ putFloat64le _msgEphemerisQzss_w+ putFloat64le _msgEphemerisQzss_inc+ putFloat64le _msgEphemerisQzss_inc_dot+ putFloat32le _msgEphemerisQzss_af0+ putFloat32le _msgEphemerisQzss_af1+ putFloat32le _msgEphemerisQzss_af2+ put _msgEphemerisQzss_toc+ putWord8 _msgEphemerisQzss_iode+ putWord16le _msgEphemerisQzss_iodc++$(makeSBP 'msgEphemerisQzss ''MsgEphemerisQzss)+$(makeJSON "_msgEphemerisQzss_" ''MsgEphemerisQzss)+$(makeLenses ''MsgEphemerisQzss)+ msgEphemerisBds :: Word16 msgEphemerisBds = 0x0089 @@ -825,10 +993,130 @@ $(makeJSON "_msgEphemerisBds_" ''MsgEphemerisBds) $(makeLenses ''MsgEphemerisBds) +msgEphemerisGalDepA :: Word16+msgEphemerisGalDepA = 0x0095++-- | SBP class for message MSG_EPHEMERIS_GAL_DEP_A (0x0095).+--+-- This observation message has been deprecated in favor of an ephemeris+-- message with explicit source of NAV data.+data MsgEphemerisGalDepA = MsgEphemerisGalDepA+ { _msgEphemerisGalDepA_common :: !EphemerisCommonContent+ -- ^ Values common for all ephemeris types+ , _msgEphemerisGalDepA_bgd_e1e5a :: !Float+ -- ^ E1-E5a Broadcast Group Delay+ , _msgEphemerisGalDepA_bgd_e1e5b :: !Float+ -- ^ E1-E5b Broadcast Group Delay+ , _msgEphemerisGalDepA_c_rs :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the orbit radius+ , _msgEphemerisGalDepA_c_rc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the orbit radius+ , _msgEphemerisGalDepA_c_uc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisGalDepA_c_us :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisGalDepA_c_ic :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisGalDepA_c_is :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisGalDepA_dn :: !Double+ -- ^ Mean motion difference+ , _msgEphemerisGalDepA_m0 :: !Double+ -- ^ Mean anomaly at reference time+ , _msgEphemerisGalDepA_ecc :: !Double+ -- ^ Eccentricity of satellite orbit+ , _msgEphemerisGalDepA_sqrta :: !Double+ -- ^ Square root of the semi-major axis of orbit+ , _msgEphemerisGalDepA_omega0 :: !Double+ -- ^ Longitude of ascending node of orbit plane at weekly epoch+ , _msgEphemerisGalDepA_omegadot :: !Double+ -- ^ Rate of right ascension+ , _msgEphemerisGalDepA_w :: !Double+ -- ^ Argument of perigee+ , _msgEphemerisGalDepA_inc :: !Double+ -- ^ Inclination+ , _msgEphemerisGalDepA_inc_dot :: !Double+ -- ^ Inclination first derivative+ , _msgEphemerisGalDepA_af0 :: !Double+ -- ^ Polynomial clock correction coefficient (clock bias)+ , _msgEphemerisGalDepA_af1 :: !Double+ -- ^ Polynomial clock correction coefficient (clock drift)+ , _msgEphemerisGalDepA_af2 :: !Float+ -- ^ Polynomial clock correction coefficient (rate of clock drift)+ , _msgEphemerisGalDepA_toc :: !GpsTimeSec+ -- ^ Clock reference+ , _msgEphemerisGalDepA_iode :: !Word16+ -- ^ Issue of ephemeris data+ , _msgEphemerisGalDepA_iodc :: !Word16+ -- ^ Issue of clock data+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisGalDepA where+ get = do+ _msgEphemerisGalDepA_common <- get+ _msgEphemerisGalDepA_bgd_e1e5a <- getFloat32le+ _msgEphemerisGalDepA_bgd_e1e5b <- getFloat32le+ _msgEphemerisGalDepA_c_rs <- getFloat32le+ _msgEphemerisGalDepA_c_rc <- getFloat32le+ _msgEphemerisGalDepA_c_uc <- getFloat32le+ _msgEphemerisGalDepA_c_us <- getFloat32le+ _msgEphemerisGalDepA_c_ic <- getFloat32le+ _msgEphemerisGalDepA_c_is <- getFloat32le+ _msgEphemerisGalDepA_dn <- getFloat64le+ _msgEphemerisGalDepA_m0 <- getFloat64le+ _msgEphemerisGalDepA_ecc <- getFloat64le+ _msgEphemerisGalDepA_sqrta <- getFloat64le+ _msgEphemerisGalDepA_omega0 <- getFloat64le+ _msgEphemerisGalDepA_omegadot <- getFloat64le+ _msgEphemerisGalDepA_w <- getFloat64le+ _msgEphemerisGalDepA_inc <- getFloat64le+ _msgEphemerisGalDepA_inc_dot <- getFloat64le+ _msgEphemerisGalDepA_af0 <- getFloat64le+ _msgEphemerisGalDepA_af1 <- getFloat64le+ _msgEphemerisGalDepA_af2 <- getFloat32le+ _msgEphemerisGalDepA_toc <- get+ _msgEphemerisGalDepA_iode <- getWord16le+ _msgEphemerisGalDepA_iodc <- getWord16le+ pure MsgEphemerisGalDepA {..}++ put MsgEphemerisGalDepA {..} = do+ put _msgEphemerisGalDepA_common+ putFloat32le _msgEphemerisGalDepA_bgd_e1e5a+ putFloat32le _msgEphemerisGalDepA_bgd_e1e5b+ putFloat32le _msgEphemerisGalDepA_c_rs+ putFloat32le _msgEphemerisGalDepA_c_rc+ putFloat32le _msgEphemerisGalDepA_c_uc+ putFloat32le _msgEphemerisGalDepA_c_us+ putFloat32le _msgEphemerisGalDepA_c_ic+ putFloat32le _msgEphemerisGalDepA_c_is+ putFloat64le _msgEphemerisGalDepA_dn+ putFloat64le _msgEphemerisGalDepA_m0+ putFloat64le _msgEphemerisGalDepA_ecc+ putFloat64le _msgEphemerisGalDepA_sqrta+ putFloat64le _msgEphemerisGalDepA_omega0+ putFloat64le _msgEphemerisGalDepA_omegadot+ putFloat64le _msgEphemerisGalDepA_w+ putFloat64le _msgEphemerisGalDepA_inc+ putFloat64le _msgEphemerisGalDepA_inc_dot+ putFloat64le _msgEphemerisGalDepA_af0+ putFloat64le _msgEphemerisGalDepA_af1+ putFloat32le _msgEphemerisGalDepA_af2+ put _msgEphemerisGalDepA_toc+ putWord16le _msgEphemerisGalDepA_iode+ putWord16le _msgEphemerisGalDepA_iodc++$(makeSBP 'msgEphemerisGalDepA ''MsgEphemerisGalDepA)+$(makeJSON "_msgEphemerisGalDepA_" ''MsgEphemerisGalDepA)+$(makeLenses ''MsgEphemerisGalDepA)+ msgEphemerisGal :: Word16-msgEphemerisGal = 0x0095+msgEphemerisGal = 0x008D --- | SBP class for message MSG_EPHEMERIS_GAL (0x0095).+-- | SBP class for message MSG_EPHEMERIS_GAL (0x008D). -- -- The ephemeris message returns a set of satellite orbit parameters that is -- used to calculate Galileo satellite position, velocity, and clock offset.@@ -887,6 +1175,8 @@ -- ^ Issue of ephemeris data , _msgEphemerisGal_iodc :: !Word16 -- ^ Issue of clock data+ , _msgEphemerisGal_source :: !Word8+ -- ^ 0=I/NAV, 1=F/NAV, ... } deriving ( Show, Read, Eq ) instance Binary MsgEphemerisGal where@@ -915,6 +1205,7 @@ _msgEphemerisGal_toc <- get _msgEphemerisGal_iode <- getWord16le _msgEphemerisGal_iodc <- getWord16le+ _msgEphemerisGal_source <- getWord8 pure MsgEphemerisGal {..} put MsgEphemerisGal {..} = do@@ -942,6 +1233,7 @@ put _msgEphemerisGal_toc putWord16le _msgEphemerisGal_iode putWord16le _msgEphemerisGal_iodc+ putWord8 _msgEphemerisGal_source $(makeSBP 'msgEphemerisGal ''MsgEphemerisGal) $(makeJSON "_msgEphemerisGal_" ''MsgEphemerisGal)@@ -1917,7 +2209,7 @@ pure CarrierPhaseDepA {..} put CarrierPhaseDepA {..} = do- putWord32le $ fromIntegral _carrierPhaseDepA_i+ (putWord32le . fromIntegral) _carrierPhaseDepA_i putWord8 _carrierPhaseDepA_f $(makeJSON "_carrierPhaseDepA_" ''CarrierPhaseDepA)@@ -2333,9 +2625,9 @@ put _msgGroupDelayDepA_t_op putWord8 _msgGroupDelayDepA_prn putWord8 _msgGroupDelayDepA_valid- putWord16le $ fromIntegral _msgGroupDelayDepA_tgd- putWord16le $ fromIntegral _msgGroupDelayDepA_isc_l1ca- putWord16le $ fromIntegral _msgGroupDelayDepA_isc_l2c+ (putWord16le . fromIntegral) _msgGroupDelayDepA_tgd+ (putWord16le . fromIntegral) _msgGroupDelayDepA_isc_l1ca+ (putWord16le . fromIntegral) _msgGroupDelayDepA_isc_l2c $(makeSBP 'msgGroupDelayDepA ''MsgGroupDelayDepA) $(makeJSON "_msgGroupDelayDepA_" ''MsgGroupDelayDepA)@@ -2374,9 +2666,9 @@ put _msgGroupDelayDepB_t_op put _msgGroupDelayDepB_sid putWord8 _msgGroupDelayDepB_valid- putWord16le $ fromIntegral _msgGroupDelayDepB_tgd- putWord16le $ fromIntegral _msgGroupDelayDepB_isc_l1ca- putWord16le $ fromIntegral _msgGroupDelayDepB_isc_l2c+ (putWord16le . fromIntegral) _msgGroupDelayDepB_tgd+ (putWord16le . fromIntegral) _msgGroupDelayDepB_isc_l1ca+ (putWord16le . fromIntegral) _msgGroupDelayDepB_isc_l2c $(makeSBP 'msgGroupDelayDepB ''MsgGroupDelayDepB) $(makeJSON "_msgGroupDelayDepB_" ''MsgGroupDelayDepB)@@ -2415,9 +2707,9 @@ put _msgGroupDelay_t_op put _msgGroupDelay_sid putWord8 _msgGroupDelay_valid- putWord16le $ fromIntegral _msgGroupDelay_tgd- putWord16le $ fromIntegral _msgGroupDelay_isc_l1ca- putWord16le $ fromIntegral _msgGroupDelay_isc_l2c+ (putWord16le . fromIntegral) _msgGroupDelay_tgd+ (putWord16le . fromIntegral) _msgGroupDelay_isc_l1ca+ (putWord16le . fromIntegral) _msgGroupDelay_isc_l2c $(makeSBP 'msgGroupDelay ''MsgGroupDelay) $(makeJSON "_msgGroupDelay_" ''MsgGroupDelay)@@ -2779,11 +3071,89 @@ put MsgGloBiases {..} = do putWord8 _msgGloBiases_mask- putWord16le $ fromIntegral _msgGloBiases_l1ca_bias- putWord16le $ fromIntegral _msgGloBiases_l1p_bias- putWord16le $ fromIntegral _msgGloBiases_l2ca_bias- putWord16le $ fromIntegral _msgGloBiases_l2p_bias+ (putWord16le . fromIntegral) _msgGloBiases_l1ca_bias+ (putWord16le . fromIntegral) _msgGloBiases_l1p_bias+ (putWord16le . fromIntegral) _msgGloBiases_l2ca_bias+ (putWord16le . fromIntegral) _msgGloBiases_l2p_bias $(makeSBP 'msgGloBiases ''MsgGloBiases) $(makeJSON "_msgGloBiases_" ''MsgGloBiases) $(makeLenses ''MsgGloBiases)++-- | SvAzEl.+--+-- Satellite azimuth and elevation.+data SvAzEl = SvAzEl+ { _svAzEl_sid :: !GnssSignal+ -- ^ GNSS signal identifier+ , _svAzEl_az :: !Word8+ -- ^ Azimuth angle (range 0..179)+ , _svAzEl_el :: !Int8+ -- ^ Elevation angle (range -90..90)+ } deriving ( Show, Read, Eq )++instance Binary SvAzEl where+ get = do+ _svAzEl_sid <- get+ _svAzEl_az <- getWord8+ _svAzEl_el <- fromIntegral <$> getWord8+ pure SvAzEl {..}++ put SvAzEl {..} = do+ put _svAzEl_sid+ putWord8 _svAzEl_az+ (putWord8 . fromIntegral) _svAzEl_el++$(makeJSON "_svAzEl_" ''SvAzEl)+$(makeLenses ''SvAzEl)++msgSvAzEl :: Word16+msgSvAzEl = 0x0097++-- | SBP class for message MSG_SV_AZ_EL (0x0097).+--+-- Azimuth and elevation angles of all the visible satellites that the device+-- does have ephemeris or almanac for.+data MsgSvAzEl = MsgSvAzEl+ { _msgSvAzEl_azel :: ![SvAzEl]+ -- ^ Azimuth and elevation per satellite+ } deriving ( Show, Read, Eq )++instance Binary MsgSvAzEl where+ get = do+ _msgSvAzEl_azel <- whileM (not <$> isEmpty) get+ pure MsgSvAzEl {..}++ put MsgSvAzEl {..} = do+ mapM_ put _msgSvAzEl_azel++$(makeSBP 'msgSvAzEl ''MsgSvAzEl)+$(makeJSON "_msgSvAzEl_" ''MsgSvAzEl)+$(makeLenses ''MsgSvAzEl)++msgOsr :: Word16+msgOsr = 0x0640++-- | SBP class for message MSG_OSR (0x0640).+--+-- The OSR message contains network corrections in an observation-like format+data MsgOsr = MsgOsr+ { _msgOsr_header :: !ObservationHeader+ -- ^ Header of a GPS observation message+ , _msgOsr_obs :: ![PackedOsrContent]+ -- ^ Network correction for a satellite signal.+ } deriving ( Show, Read, Eq )++instance Binary MsgOsr where+ get = do+ _msgOsr_header <- get+ _msgOsr_obs <- whileM (not <$> isEmpty) get+ pure MsgOsr {..}++ put MsgOsr {..} = do+ put _msgOsr_header+ mapM_ put _msgOsr_obs++$(makeSBP 'msgOsr ''MsgOsr)+$(makeJSON "_msgOsr_" ''MsgOsr)+$(makeLenses ''MsgOsr)
@@ -121,10 +121,10 @@ put MsgOrientQuat {..} = do putWord32le _msgOrientQuat_tow- putWord32le $ fromIntegral _msgOrientQuat_w- putWord32le $ fromIntegral _msgOrientQuat_x- putWord32le $ fromIntegral _msgOrientQuat_y- putWord32le $ fromIntegral _msgOrientQuat_z+ (putWord32le . fromIntegral) _msgOrientQuat_w+ (putWord32le . fromIntegral) _msgOrientQuat_x+ (putWord32le . fromIntegral) _msgOrientQuat_y+ (putWord32le . fromIntegral) _msgOrientQuat_z putFloat32le _msgOrientQuat_w_accuracy putFloat32le _msgOrientQuat_x_accuracy putFloat32le _msgOrientQuat_y_accuracy@@ -179,9 +179,9 @@ put MsgOrientEuler {..} = do putWord32le _msgOrientEuler_tow- putWord32le $ fromIntegral _msgOrientEuler_roll- putWord32le $ fromIntegral _msgOrientEuler_pitch- putWord32le $ fromIntegral _msgOrientEuler_yaw+ (putWord32le . fromIntegral) _msgOrientEuler_roll+ (putWord32le . fromIntegral) _msgOrientEuler_pitch+ (putWord32le . fromIntegral) _msgOrientEuler_yaw putFloat32le _msgOrientEuler_roll_accuracy putFloat32le _msgOrientEuler_pitch_accuracy putFloat32le _msgOrientEuler_yaw_accuracy@@ -229,9 +229,9 @@ put MsgAngularRate {..} = do putWord32le _msgAngularRate_tow- putWord32le $ fromIntegral _msgAngularRate_x- putWord32le $ fromIntegral _msgAngularRate_y- putWord32le $ fromIntegral _msgAngularRate_z+ (putWord32le . fromIntegral) _msgAngularRate_x+ (putWord32le . fromIntegral) _msgAngularRate_y+ (putWord32le . fromIntegral) _msgAngularRate_z putWord8 _msgAngularRate_flags $(makeSBP 'msgAngularRate ''MsgAngularRate)
@@ -186,27 +186,24 @@ $(makeJSON "_msgResetFilters_" ''MsgResetFilters) $(makeLenses ''MsgResetFilters) -msgInitBase :: Word16-msgInitBase = 0x0023+msgInitBaseDep :: Word16+msgInitBaseDep = 0x0023 --- | SBP class for message MSG_INIT_BASE (0x0023).+-- | SBP class for message MSG_INIT_BASE_DEP (0x0023). ----- This message initializes the integer ambiguity resolution (IAR) process on--- the Piksi to use an assumed baseline position between the base station and--- rover receivers. Warns via MSG_PRINT if there aren't a shared minimum number--- (4) of satellite observations between the two.-data MsgInitBase = MsgInitBase+-- Deprecated+data MsgInitBaseDep = MsgInitBaseDep deriving ( Show, Read, Eq ) -instance Binary MsgInitBase where+instance Binary MsgInitBaseDep where get =- pure MsgInitBase+ pure MsgInitBaseDep - put MsgInitBase =+ put MsgInitBaseDep = pure ()-$(makeSBP 'msgInitBase ''MsgInitBase)-$(makeJSON "_msgInitBase_" ''MsgInitBase)-$(makeLenses ''MsgInitBase)+$(makeSBP 'msgInitBaseDep ''MsgInitBaseDep)+$(makeJSON "_msgInitBaseDep_" ''MsgInitBaseDep)+$(makeLenses ''MsgInitBaseDep) msgThreadState :: Word16 msgThreadState = 0x0017@@ -309,10 +306,10 @@ pure Period {..} put Period {..} = do- putWord32le $ fromIntegral _period_avg- putWord32le $ fromIntegral _period_pmin- putWord32le $ fromIntegral _period_pmax- putWord32le $ fromIntegral _period_current+ (putWord32le . fromIntegral) _period_avg+ (putWord32le . fromIntegral) _period_pmin+ (putWord32le . fromIntegral) _period_pmax+ (putWord32le . fromIntegral) _period_current $(makeJSON "_period_" ''Period) $(makeLenses ''Period)@@ -343,10 +340,10 @@ pure Latency {..} put Latency {..} = do- putWord32le $ fromIntegral _latency_avg- putWord32le $ fromIntegral _latency_lmin- putWord32le $ fromIntegral _latency_lmax- putWord32le $ fromIntegral _latency_current+ (putWord32le . fromIntegral) _latency_avg+ (putWord32le . fromIntegral) _latency_lmin+ (putWord32le . fromIntegral) _latency_lmax+ (putWord32le . fromIntegral) _latency_current $(makeJSON "_latency_" ''Latency) $(makeLenses ''Latency)@@ -543,11 +540,11 @@ pure MsgDeviceMonitor {..} put MsgDeviceMonitor {..} = do- putWord16le $ fromIntegral _msgDeviceMonitor_dev_vin- putWord16le $ fromIntegral _msgDeviceMonitor_cpu_vint- putWord16le $ fromIntegral _msgDeviceMonitor_cpu_vaux- putWord16le $ fromIntegral _msgDeviceMonitor_cpu_temperature- putWord16le $ fromIntegral _msgDeviceMonitor_fe_temperature+ (putWord16le . fromIntegral) _msgDeviceMonitor_dev_vin+ (putWord16le . fromIntegral) _msgDeviceMonitor_cpu_vint+ (putWord16le . fromIntegral) _msgDeviceMonitor_cpu_vaux+ (putWord16le . fromIntegral) _msgDeviceMonitor_cpu_temperature+ (putWord16le . fromIntegral) _msgDeviceMonitor_fe_temperature $(makeSBP 'msgDeviceMonitor ''MsgDeviceMonitor) $(makeJSON "_msgDeviceMonitor_" ''MsgDeviceMonitor)@@ -603,7 +600,7 @@ put MsgCommandResp {..} = do putWord32le _msgCommandResp_sequence- putWord32le $ fromIntegral _msgCommandResp_code+ (putWord32le . fromIntegral) _msgCommandResp_code $(makeSBP 'msgCommandResp ''MsgCommandResp) $(makeJSON "_msgCommandResp_" ''MsgCommandResp)@@ -797,7 +794,7 @@ pure MsgCellModemStatus {..} put MsgCellModemStatus {..} = do- putWord8 $ fromIntegral _msgCellModemStatus_signal_strength+ (putWord8 . fromIntegral) _msgCellModemStatus_signal_strength putFloat32le _msgCellModemStatus_signal_error_rate mapM_ putWord8 _msgCellModemStatus_reserved @@ -898,3 +895,36 @@ $(makeSBP 'msgSpecan ''MsgSpecan) $(makeJSON "_msgSpecan_" ''MsgSpecan) $(makeLenses ''MsgSpecan)++msgFrontEndGain :: Word16+msgFrontEndGain = 0x00BF++-- | SBP class for message MSG_FRONT_END_GAIN (0x00BF).+--+-- This message describes the gain of each channel in the receiver frontend.+-- Each gain is encoded as a non-dimensional percentage relative to the+-- maximum range possible for the gain stage of the frontend. By convention,+-- each gain array has 8 entries and the index of the array corresponding to+-- the index of the rf channel in the frontend. A gain of 127 percent encodes+-- that rf channel is not present in the hardware. A negative value implies an+-- error for the particular gain stage as reported by the frontend.+data MsgFrontEndGain = MsgFrontEndGain+ { _msgFrontEndGain_rf_gain :: ![Int8]+ -- ^ RF gain for each frontend channel+ , _msgFrontEndGain_if_gain :: ![Int8]+ -- ^ Intermediate frequency gain for each frontend channel+ } deriving ( Show, Read, Eq )++instance Binary MsgFrontEndGain where+ get = do+ _msgFrontEndGain_rf_gain <- replicateM 8 fromIntegral <$> getWord8+ _msgFrontEndGain_if_gain <- replicateM 8 fromIntegral <$> getWord8+ pure MsgFrontEndGain {..}++ put MsgFrontEndGain {..} = do+ mapM_ (putWord8 . fromIntegral) _msgFrontEndGain_rf_gain+ mapM_ (putWord8 . fromIntegral) _msgFrontEndGain_if_gain++$(makeSBP 'msgFrontEndGain ''MsgFrontEndGain)+$(makeJSON "_msgFrontEndGain_" ''MsgFrontEndGain)+$(makeLenses ''MsgFrontEndGain)
@@ -303,3 +303,35 @@ $(makeSBP 'msgSettingsRegister ''MsgSettingsRegister) $(makeJSON "_msgSettingsRegister_" ''MsgSettingsRegister) $(makeLenses ''MsgSettingsRegister)++msgSettingsRegisterResp :: Word16+msgSettingsRegisterResp = 0x01AF++-- | SBP class for message MSG_SETTINGS_REGISTER_RESP (0x01AF).+--+-- This message responds to setting registration with the effective value. The+-- effective value shall differ from the given default value if setting was+-- already registered or is available in the permanent setting storage and had+-- a different value.+data MsgSettingsRegisterResp = MsgSettingsRegisterResp+ { _msgSettingsRegisterResp_status :: !Word8+ -- ^ Register status+ , _msgSettingsRegisterResp_setting :: !Text+ -- ^ A NULL-terminated and delimited string with contents+ -- "SECTION_SETTING\0SETTING\0VALUE". The meaning of value is defined+ -- according to the status field.+ } deriving ( Show, Read, Eq )++instance Binary MsgSettingsRegisterResp where+ get = do+ _msgSettingsRegisterResp_status <- getWord8+ _msgSettingsRegisterResp_setting <- decodeUtf8 . toStrict <$> getRemainingLazyByteString+ pure MsgSettingsRegisterResp {..}++ put MsgSettingsRegisterResp {..} = do+ putWord8 _msgSettingsRegisterResp_status+ putByteString $ encodeUtf8 _msgSettingsRegisterResp_setting++$(makeSBP 'msgSettingsRegisterResp ''MsgSettingsRegisterResp)+$(makeJSON "_msgSettingsRegisterResp_" ''MsgSettingsRegisterResp)+$(makeLenses ''MsgSettingsRegisterResp)
@@ -55,7 +55,7 @@ put CodeBiasesContent {..} = do putWord8 _codeBiasesContent_code- putWord16le $ fromIntegral _codeBiasesContent_value+ (putWord16le . fromIntegral) _codeBiasesContent_value $(makeJSON "_codeBiasesContent_" ''CodeBiasesContent) $(makeLenses ''CodeBiasesContent)@@ -72,8 +72,8 @@ , _phaseBiasesContent_widelane_integer_indicator :: !Word8 -- ^ Indicator for two groups of Wide-Lane(s) integer property , _phaseBiasesContent_discontinuity_counter :: !Word8- -- ^ Signal phase discontinuity counter. Increased for every discontinuity- -- in phase.+ -- ^ Signal phase discontinuity counter. Increased for every discontinuity in+ -- phase. , _phaseBiasesContent_bias :: !Int32 -- ^ Phase bias for specified signal } deriving ( Show, Read, Eq )@@ -92,19 +92,236 @@ putWord8 _phaseBiasesContent_integer_indicator putWord8 _phaseBiasesContent_widelane_integer_indicator putWord8 _phaseBiasesContent_discontinuity_counter- putWord32le $ fromIntegral _phaseBiasesContent_bias+ (putWord32le . fromIntegral) _phaseBiasesContent_bias $(makeJSON "_phaseBiasesContent_" ''PhaseBiasesContent) $(makeLenses ''PhaseBiasesContent) +-- | STECHeader.+--+-- A full set of STEC information will likely span multiple SBP messages, since+-- SBP message a limited to 255 bytes. The header is used to tie multiple SBP+-- messages into a sequence.+data STECHeader = STECHeader+ { _sTECHeader_time :: !GpsTime+ -- ^ GNSS time of the STEC data+ , _sTECHeader_num_msgs :: !Word8+ -- ^ Number of messages in the dataset+ , _sTECHeader_seq_num :: !Word8+ -- ^ Position of this message in the dataset+ , _sTECHeader_ssr_update_interval :: !Word16+ -- ^ update interval in seconds+ , _sTECHeader_iod_ssr :: !Word8+ -- ^ range 0 - 15+ } deriving ( Show, Read, Eq )++instance Binary STECHeader where+ get = do+ _sTECHeader_time <- get+ _sTECHeader_num_msgs <- getWord8+ _sTECHeader_seq_num <- getWord8+ _sTECHeader_ssr_update_interval <- getWord16le+ _sTECHeader_iod_ssr <- getWord8+ pure STECHeader {..}++ put STECHeader {..} = do+ put _sTECHeader_time+ putWord8 _sTECHeader_num_msgs+ putWord8 _sTECHeader_seq_num+ putWord16le _sTECHeader_ssr_update_interval+ putWord8 _sTECHeader_iod_ssr++$(makeJSON "_sTECHeader_" ''STECHeader)+$(makeLenses ''STECHeader)++-- | GriddedCorrectionHeader.+--+-- The 3GPP message contains nested variable length arrays which are not+-- suppported in SBP, so each grid point will be identified by the index.+data GriddedCorrectionHeader = GriddedCorrectionHeader+ { _griddedCorrectionHeader_time :: !GpsTime+ -- ^ GNSS time of the STEC data+ , _griddedCorrectionHeader_num_msgs :: !Word16+ -- ^ Number of messages in the dataset+ , _griddedCorrectionHeader_seq_num :: !Word16+ -- ^ Position of this message in the dataset+ , _griddedCorrectionHeader_ssr_update_interval :: !Word16+ -- ^ update interval in seconds+ , _griddedCorrectionHeader_iod_ssr :: !Word8+ -- ^ range 0 - 15+ , _griddedCorrectionHeader_tropo_quality :: !Word8+ -- ^ troposphere quality indicator+ } deriving ( Show, Read, Eq )++instance Binary GriddedCorrectionHeader where+ get = do+ _griddedCorrectionHeader_time <- get+ _griddedCorrectionHeader_num_msgs <- getWord16le+ _griddedCorrectionHeader_seq_num <- getWord16le+ _griddedCorrectionHeader_ssr_update_interval <- getWord16le+ _griddedCorrectionHeader_iod_ssr <- getWord8+ _griddedCorrectionHeader_tropo_quality <- getWord8+ pure GriddedCorrectionHeader {..}++ put GriddedCorrectionHeader {..} = do+ put _griddedCorrectionHeader_time+ putWord16le _griddedCorrectionHeader_num_msgs+ putWord16le _griddedCorrectionHeader_seq_num+ putWord16le _griddedCorrectionHeader_ssr_update_interval+ putWord8 _griddedCorrectionHeader_iod_ssr+ putWord8 _griddedCorrectionHeader_tropo_quality++$(makeJSON "_griddedCorrectionHeader_" ''GriddedCorrectionHeader)+$(makeLenses ''GriddedCorrectionHeader)++-- | STECSatElement.+--+-- STEC for the given satellite.+data STECSatElement = STECSatElement+ { _sTECSatElement_sv_id :: !SvId+ -- ^ Unique space vehicle identifier+ , _sTECSatElement_stec_quality_indicator :: !Word8+ -- ^ quality of STEC data+ , _sTECSatElement_stec_coeff :: ![Int16]+ -- ^ coefficents of the STEC polynomial+ } deriving ( Show, Read, Eq )++instance Binary STECSatElement where+ get = do+ _sTECSatElement_sv_id <- get+ _sTECSatElement_stec_quality_indicator <- getWord8+ _sTECSatElement_stec_coeff <- replicateM 4 fromIntegral <$> getWord16le+ pure STECSatElement {..}++ put STECSatElement {..} = do+ put _sTECSatElement_sv_id+ putWord8 _sTECSatElement_stec_quality_indicator+ mapM_ (putWord16le . fromIntegral) _sTECSatElement_stec_coeff++$(makeJSON "_sTECSatElement_" ''STECSatElement)+$(makeLenses ''STECSatElement)++-- | TroposphericDelayCorrection.+--+-- Contains wet vertical and hydrostatic vertical delay+data TroposphericDelayCorrection = TroposphericDelayCorrection+ { _troposphericDelayCorrection_hydro :: !Int16+ -- ^ hydrostatic vertical delay+ , _troposphericDelayCorrection_wet :: !Int8+ -- ^ wet vertical delay+ } deriving ( Show, Read, Eq )++instance Binary TroposphericDelayCorrection where+ get = do+ _troposphericDelayCorrection_hydro <- fromIntegral <$> getWord16le+ _troposphericDelayCorrection_wet <- fromIntegral <$> getWord8+ pure TroposphericDelayCorrection {..}++ put TroposphericDelayCorrection {..} = do+ (putWord16le . fromIntegral) _troposphericDelayCorrection_hydro+ (putWord8 . fromIntegral) _troposphericDelayCorrection_wet++$(makeJSON "_troposphericDelayCorrection_" ''TroposphericDelayCorrection)+$(makeLenses ''TroposphericDelayCorrection)++-- | STECResidual.+--+-- STEC residual+data STECResidual = STECResidual+ { _sTECResidual_sv_id :: !SvId+ -- ^ space vehicle identifier+ , _sTECResidual_residual :: !Int16+ -- ^ STEC residual+ } deriving ( Show, Read, Eq )++instance Binary STECResidual where+ get = do+ _sTECResidual_sv_id <- get+ _sTECResidual_residual <- fromIntegral <$> getWord16le+ pure STECResidual {..}++ put STECResidual {..} = do+ put _sTECResidual_sv_id+ (putWord16le . fromIntegral) _sTECResidual_residual++$(makeJSON "_sTECResidual_" ''STECResidual)+$(makeLenses ''STECResidual)++-- | GridElement.+--+-- Contains one tropo datum, plus STEC residuals for each space vehicle+data GridElement = GridElement+ { _gridElement_index :: !Word16+ -- ^ index of the grid point+ , _gridElement_tropo_delay_correction :: !TroposphericDelayCorrection+ -- ^ Wet and Hydrostatic Vertical Delay+ , _gridElement_STEC_residuals :: ![STECResidual]+ -- ^ STEC Residual for the given space vehicle+ } deriving ( Show, Read, Eq )++instance Binary GridElement where+ get = do+ _gridElement_index <- getWord16le+ _gridElement_tropo_delay_correction <- get+ _gridElement_STEC_residuals <- whileM (not <$> isEmpty) get+ pure GridElement {..}++ put GridElement {..} = do+ putWord16le _gridElement_index+ put _gridElement_tropo_delay_correction+ mapM_ put _gridElement_STEC_residuals++$(makeJSON "_gridElement_" ''GridElement)+$(makeLenses ''GridElement)++-- | GridDefinitionHeader.+--+-- Defines the grid for STEC and tropo grid messages. Also includes an RLE+-- encoded validity list.+data GridDefinitionHeader = GridDefinitionHeader+ { _gridDefinitionHeader_region_size_inverse :: !Word8+ -- ^ inverse of region size+ , _gridDefinitionHeader_area_width :: !Word16+ -- ^ area width; see spec for details+ , _gridDefinitionHeader_lat_nw_corner_enc :: !Word16+ -- ^ encoded latitude of the northwest corner of the grid+ , _gridDefinitionHeader_lon_nw_corner_enc :: !Word16+ -- ^ encoded longitude of the northwest corner of the grid+ , _gridDefinitionHeader_num_msgs :: !Word8+ -- ^ Number of messages in the dataset+ , _gridDefinitionHeader_seq_num :: !Word8+ -- ^ Postion of this message in the dataset+ } deriving ( Show, Read, Eq )++instance Binary GridDefinitionHeader where+ get = do+ _gridDefinitionHeader_region_size_inverse <- getWord8+ _gridDefinitionHeader_area_width <- getWord16le+ _gridDefinitionHeader_lat_nw_corner_enc <- getWord16le+ _gridDefinitionHeader_lon_nw_corner_enc <- getWord16le+ _gridDefinitionHeader_num_msgs <- getWord8+ _gridDefinitionHeader_seq_num <- getWord8+ pure GridDefinitionHeader {..}++ put GridDefinitionHeader {..} = do+ putWord8 _gridDefinitionHeader_region_size_inverse+ putWord16le _gridDefinitionHeader_area_width+ putWord16le _gridDefinitionHeader_lat_nw_corner_enc+ putWord16le _gridDefinitionHeader_lon_nw_corner_enc+ putWord8 _gridDefinitionHeader_num_msgs+ putWord8 _gridDefinitionHeader_seq_num++$(makeJSON "_gridDefinitionHeader_" ''GridDefinitionHeader)+$(makeLenses ''GridDefinitionHeader)+ msgSsrOrbitClock :: Word16 msgSsrOrbitClock = 0x05DD -- | SBP class for message MSG_SSR_ORBIT_CLOCK (0x05DD). ----- The precise orbit and clock correction message is to be applied as a delta--- correction to broadcast ephemeris and is typically an equivalent to the--- 1060 and 1066 RTCM message types+-- The precise orbit and clock correction message is to be applied as a delta+-- correction to broadcast ephemeris and is typically an equivalent to the 1060+-- and 1066 RTCM message types data MsgSsrOrbitClock = MsgSsrOrbitClock { _msgSsrOrbitClock_time :: !GpsTimeSec -- ^ GNSS reference time of the correction@@ -114,7 +331,7 @@ -- ^ Update interval between consecutive corrections , _msgSsrOrbitClock_iod_ssr :: !Word8 -- ^ IOD of the SSR correction. A change of Issue Of Data SSR is used to- -- indicate a change in the SSR generating configuration+ -- indicate a change in the SSR generating configuration , _msgSsrOrbitClock_iod :: !Word32 -- ^ Issue of broadcast ephemeris data or IODCRC (Beidou) , _msgSsrOrbitClock_radial :: !Int32@@ -161,15 +378,15 @@ putWord8 _msgSsrOrbitClock_update_interval putWord8 _msgSsrOrbitClock_iod_ssr putWord32le _msgSsrOrbitClock_iod- putWord32le $ fromIntegral _msgSsrOrbitClock_radial- putWord32le $ fromIntegral _msgSsrOrbitClock_along- putWord32le $ fromIntegral _msgSsrOrbitClock_cross- putWord32le $ fromIntegral _msgSsrOrbitClock_dot_radial- putWord32le $ fromIntegral _msgSsrOrbitClock_dot_along- putWord32le $ fromIntegral _msgSsrOrbitClock_dot_cross- putWord32le $ fromIntegral _msgSsrOrbitClock_c0- putWord32le $ fromIntegral _msgSsrOrbitClock_c1- putWord32le $ fromIntegral _msgSsrOrbitClock_c2+ (putWord32le . fromIntegral) _msgSsrOrbitClock_radial+ (putWord32le . fromIntegral) _msgSsrOrbitClock_along+ (putWord32le . fromIntegral) _msgSsrOrbitClock_cross+ (putWord32le . fromIntegral) _msgSsrOrbitClock_dot_radial+ (putWord32le . fromIntegral) _msgSsrOrbitClock_dot_along+ (putWord32le . fromIntegral) _msgSsrOrbitClock_dot_cross+ (putWord32le . fromIntegral) _msgSsrOrbitClock_c0+ (putWord32le . fromIntegral) _msgSsrOrbitClock_c1+ (putWord32le . fromIntegral) _msgSsrOrbitClock_c2 $(makeSBP 'msgSsrOrbitClock ''MsgSsrOrbitClock) $(makeJSON "_msgSsrOrbitClock_" ''MsgSsrOrbitClock)@@ -180,9 +397,9 @@ -- | SBP class for message MSG_SSR_ORBIT_CLOCK_DEP_A (0x05DC). ----- The precise orbit and clock correction message is to be applied as a delta--- correction to broadcast ephemeris and is typically an equivalent to the--- 1060 and 1066 RTCM message types+-- The precise orbit and clock correction message is to be applied as a delta+-- correction to broadcast ephemeris and is typically an equivalent to the 1060+-- and 1066 RTCM message types data MsgSsrOrbitClockDepA = MsgSsrOrbitClockDepA { _msgSsrOrbitClockDepA_time :: !GpsTimeSec -- ^ GNSS reference time of the correction@@ -192,7 +409,7 @@ -- ^ Update interval between consecutive corrections , _msgSsrOrbitClockDepA_iod_ssr :: !Word8 -- ^ IOD of the SSR correction. A change of Issue Of Data SSR is used to- -- indicate a change in the SSR generating configuration+ -- indicate a change in the SSR generating configuration , _msgSsrOrbitClockDepA_iod :: !Word8 -- ^ Issue of broadcast ephemeris data , _msgSsrOrbitClockDepA_radial :: !Int32@@ -239,15 +456,15 @@ putWord8 _msgSsrOrbitClockDepA_update_interval putWord8 _msgSsrOrbitClockDepA_iod_ssr putWord8 _msgSsrOrbitClockDepA_iod- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_radial- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_along- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_cross- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_dot_radial- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_dot_along- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_dot_cross- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_c0- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_c1- putWord32le $ fromIntegral _msgSsrOrbitClockDepA_c2+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_radial+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_along+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_cross+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_dot_radial+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_dot_along+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_dot_cross+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_c0+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_c1+ (putWord32le . fromIntegral) _msgSsrOrbitClockDepA_c2 $(makeSBP 'msgSsrOrbitClockDepA ''MsgSsrOrbitClockDepA) $(makeJSON "_msgSsrOrbitClockDepA_" ''MsgSsrOrbitClockDepA)@@ -259,7 +476,7 @@ -- | SBP class for message MSG_SSR_CODE_BIASES (0x05E1). -- -- The precise code biases message is to be added to the pseudorange of the--- corresponding signal to get corrected pseudorange. It is typically an+-- corresponding signal to get corrected pseudorange. It is typically an -- equivalent to the 1059 and 1065 RTCM message types data MsgSsrCodeBiases = MsgSsrCodeBiases { _msgSsrCodeBiases_time :: !GpsTimeSec@@ -270,7 +487,7 @@ -- ^ Update interval between consecutive corrections , _msgSsrCodeBiases_iod_ssr :: !Word8 -- ^ IOD of the SSR correction. A change of Issue Of Data SSR is used to- -- indicate a change in the SSR generating configuration+ -- indicate a change in the SSR generating configuration , _msgSsrCodeBiases_biases :: ![CodeBiasesContent] -- ^ Code biases for the different satellite signals } deriving ( Show, Read, Eq )@@ -302,9 +519,9 @@ -- -- The precise phase biases message contains the biases to be added to the -- carrier phase of the corresponding signal to get corrected carrier phase--- measurement, as well as the satellite yaw angle to be applied to compute--- the phase wind-up correction. It is typically an equivalent to the 1265--- RTCM message types+-- measurement, as well as the satellite yaw angle to be applied to compute the+-- phase wind-up correction. It is typically an equivalent to the 1265 RTCM+-- message types data MsgSsrPhaseBiases = MsgSsrPhaseBiases { _msgSsrPhaseBiases_time :: !GpsTimeSec -- ^ GNSS reference time of the correction@@ -314,7 +531,7 @@ -- ^ Update interval between consecutive corrections , _msgSsrPhaseBiases_iod_ssr :: !Word8 -- ^ IOD of the SSR correction. A change of Issue Of Data SSR is used to- -- indicate a change in the SSR generating configuration+ -- indicate a change in the SSR generating configuration , _msgSsrPhaseBiases_dispersive_bias :: !Word8 -- ^ Indicator for the dispersive phase biases property. , _msgSsrPhaseBiases_mw_consistency :: !Word8@@ -348,9 +565,95 @@ putWord8 _msgSsrPhaseBiases_dispersive_bias putWord8 _msgSsrPhaseBiases_mw_consistency putWord16le _msgSsrPhaseBiases_yaw- putWord8 $ fromIntegral _msgSsrPhaseBiases_yaw_rate+ (putWord8 . fromIntegral) _msgSsrPhaseBiases_yaw_rate mapM_ put _msgSsrPhaseBiases_biases $(makeSBP 'msgSsrPhaseBiases ''MsgSsrPhaseBiases) $(makeJSON "_msgSsrPhaseBiases_" ''MsgSsrPhaseBiases) $(makeLenses ''MsgSsrPhaseBiases)++msgSsrStecCorrection :: Word16+msgSsrStecCorrection = 0x05EB++-- | SBP class for message MSG_SSR_STEC_CORRECTION (0x05EB).+--+-- The STEC per space vehicle, given as polynomial approximation for a given+-- grid. This should be combined with SSR-GriddedCorrection message to get the+-- state space representation of the atmospheric delay.+data MsgSsrStecCorrection = MsgSsrStecCorrection+ { _msgSsrStecCorrection_header :: !STECHeader+ -- ^ Header of a STEC message+ , _msgSsrStecCorrection_stec_sat_list :: ![STECSatElement]+ -- ^ Array of STEC information for each space vehicle+ } deriving ( Show, Read, Eq )++instance Binary MsgSsrStecCorrection where+ get = do+ _msgSsrStecCorrection_header <- get+ _msgSsrStecCorrection_stec_sat_list <- whileM (not <$> isEmpty) get+ pure MsgSsrStecCorrection {..}++ put MsgSsrStecCorrection {..} = do+ put _msgSsrStecCorrection_header+ mapM_ put _msgSsrStecCorrection_stec_sat_list++$(makeSBP 'msgSsrStecCorrection ''MsgSsrStecCorrection)+$(makeJSON "_msgSsrStecCorrection_" ''MsgSsrStecCorrection)+$(makeLenses ''MsgSsrStecCorrection)++msgSsrGriddedCorrection :: Word16+msgSsrGriddedCorrection = 0x05F0++-- | SBP class for message MSG_SSR_GRIDDED_CORRECTION (0x05F0).+--+-- STEC residuals are per space vehicle, tropo is not.+data MsgSsrGriddedCorrection = MsgSsrGriddedCorrection+ { _msgSsrGriddedCorrection_header :: !GriddedCorrectionHeader+ -- ^ Header of a Gridded Correction message+ , _msgSsrGriddedCorrection_element :: !GridElement+ -- ^ Tropo and STEC residuals for the given grid point+ } deriving ( Show, Read, Eq )++instance Binary MsgSsrGriddedCorrection where+ get = do+ _msgSsrGriddedCorrection_header <- get+ _msgSsrGriddedCorrection_element <- get+ pure MsgSsrGriddedCorrection {..}++ put MsgSsrGriddedCorrection {..} = do+ put _msgSsrGriddedCorrection_header+ put _msgSsrGriddedCorrection_element++$(makeSBP 'msgSsrGriddedCorrection ''MsgSsrGriddedCorrection)+$(makeJSON "_msgSsrGriddedCorrection_" ''MsgSsrGriddedCorrection)+$(makeLenses ''MsgSsrGriddedCorrection)++msgSsrGridDefinition :: Word16+msgSsrGridDefinition = 0x05F5++-- | SBP class for message MSG_SSR_GRID_DEFINITION (0x05F5).+--+-- Definition of the grid for STEC and tropo messages+data MsgSsrGridDefinition = MsgSsrGridDefinition+ { _msgSsrGridDefinition_header :: !GridDefinitionHeader+ -- ^ Header of a Gridded Correction message+ , _msgSsrGridDefinition_rle_list :: ![Word8]+ -- ^ Run Length Encode list of quadrants that contain valid data. The spec+ -- describes the encoding scheme in detail, but essentially the index of+ -- the quadrants that contain transitions between valid and invalid (and+ -- vice versa) are encoded as u8 integers.+ } deriving ( Show, Read, Eq )++instance Binary MsgSsrGridDefinition where+ get = do+ _msgSsrGridDefinition_header <- get+ _msgSsrGridDefinition_rle_list <- whileM (not <$> isEmpty) getWord8+ pure MsgSsrGridDefinition {..}++ put MsgSsrGridDefinition {..} = do+ put _msgSsrGridDefinition_header+ mapM_ putWord8 _msgSsrGridDefinition_rle_list++$(makeSBP 'msgSsrGridDefinition ''MsgSsrGridDefinition)+$(makeJSON "_msgSsrGridDefinition_" ''MsgSsrGridDefinition)+$(makeLenses ''MsgSsrGridDefinition)
@@ -128,13 +128,13 @@ putWord8 _msgTrackingStateDetailedDepA_cn0 putWord16le _msgTrackingStateDetailedDepA_lock put _msgTrackingStateDetailedDepA_sid- putWord32le $ fromIntegral _msgTrackingStateDetailedDepA_doppler+ (putWord32le . fromIntegral) _msgTrackingStateDetailedDepA_doppler putWord16le _msgTrackingStateDetailedDepA_doppler_std putWord32le _msgTrackingStateDetailedDepA_uptime- putWord16le $ fromIntegral _msgTrackingStateDetailedDepA_clock_offset- putWord16le $ fromIntegral _msgTrackingStateDetailedDepA_clock_drift+ (putWord16le . fromIntegral) _msgTrackingStateDetailedDepA_clock_offset+ (putWord16le . fromIntegral) _msgTrackingStateDetailedDepA_clock_drift putWord16le _msgTrackingStateDetailedDepA_corr_spacing- putWord8 $ fromIntegral _msgTrackingStateDetailedDepA_acceleration+ (putWord8 . fromIntegral) _msgTrackingStateDetailedDepA_acceleration putWord8 _msgTrackingStateDetailedDepA_sync_flags putWord8 _msgTrackingStateDetailedDepA_tow_flags putWord8 _msgTrackingStateDetailedDepA_track_flags@@ -237,13 +237,13 @@ putWord8 _msgTrackingStateDetailedDep_cn0 putWord16le _msgTrackingStateDetailedDep_lock put _msgTrackingStateDetailedDep_sid- putWord32le $ fromIntegral _msgTrackingStateDetailedDep_doppler+ (putWord32le . fromIntegral) _msgTrackingStateDetailedDep_doppler putWord16le _msgTrackingStateDetailedDep_doppler_std putWord32le _msgTrackingStateDetailedDep_uptime- putWord16le $ fromIntegral _msgTrackingStateDetailedDep_clock_offset- putWord16le $ fromIntegral _msgTrackingStateDetailedDep_clock_drift+ (putWord16le . fromIntegral) _msgTrackingStateDetailedDep_clock_offset+ (putWord16le . fromIntegral) _msgTrackingStateDetailedDep_clock_drift putWord16le _msgTrackingStateDetailedDep_corr_spacing- putWord8 $ fromIntegral _msgTrackingStateDetailedDep_acceleration+ (putWord8 . fromIntegral) _msgTrackingStateDetailedDep_acceleration putWord8 _msgTrackingStateDetailedDep_sync_flags putWord8 _msgTrackingStateDetailedDep_tow_flags putWord8 _msgTrackingStateDetailedDep_track_flags@@ -311,8 +311,8 @@ -- | MeasurementState. -- -- Measurement Engine tracking channel state for a specific satellite signal--- and measured signal power. The mesid field for Glonass can either carry--- the FCN as 100 + FCN where FCN is in [-7, +6] or the Slot ID (from 1 to 28)+-- and measured signal power. The mesid field for Glonass can either carry the+-- FCN as 100 + FCN where FCN is in [-7, +6] or the Slot ID (from 1 to 28) data MeasurementState = MeasurementState { _measurementState_mesid :: !GnssSignal -- ^ Measurement Engine GNSS signal being tracked (carries either Glonass FCN@@ -363,29 +363,29 @@ -- -- Structure containing in-phase and quadrature correlation components. data TrackingChannelCorrelation = TrackingChannelCorrelation- { _trackingChannelCorrelation_I :: !Int32+ { _trackingChannelCorrelation_I :: !Int16 -- ^ In-phase correlation- , _trackingChannelCorrelation_Q :: !Int32+ , _trackingChannelCorrelation_Q :: !Int16 -- ^ Quadrature correlation } deriving ( Show, Read, Eq ) instance Binary TrackingChannelCorrelation where get = do- _trackingChannelCorrelation_I <- fromIntegral <$> getWord32le- _trackingChannelCorrelation_Q <- fromIntegral <$> getWord32le+ _trackingChannelCorrelation_I <- fromIntegral <$> getWord16le+ _trackingChannelCorrelation_Q <- fromIntegral <$> getWord16le pure TrackingChannelCorrelation {..} put TrackingChannelCorrelation {..} = do- putWord32le $ fromIntegral _trackingChannelCorrelation_I- putWord32le $ fromIntegral _trackingChannelCorrelation_Q+ (putWord16le . fromIntegral) _trackingChannelCorrelation_I+ (putWord16le . fromIntegral) _trackingChannelCorrelation_Q $(makeJSON "_trackingChannelCorrelation_" ''TrackingChannelCorrelation) $(makeLenses ''TrackingChannelCorrelation) msgTrackingIq :: Word16-msgTrackingIq = 0x002C+msgTrackingIq = 0x002D --- | SBP class for message MSG_TRACKING_IQ (0x002C).+-- | SBP class for message MSG_TRACKING_IQ (0x002D). -- -- When enabled, a tracking channel can output the correlations at each update -- interval.@@ -414,36 +414,91 @@ $(makeJSON "_msgTrackingIq_" ''MsgTrackingIq) $(makeLenses ''MsgTrackingIq) -msgTrackingIqDep :: Word16-msgTrackingIqDep = 0x001C+-- | TrackingChannelCorrelationDep.+--+-- Structure containing in-phase and quadrature correlation components.+data TrackingChannelCorrelationDep = TrackingChannelCorrelationDep+ { _trackingChannelCorrelationDep_I :: !Int32+ -- ^ In-phase correlation+ , _trackingChannelCorrelationDep_Q :: !Int32+ -- ^ Quadrature correlation+ } deriving ( Show, Read, Eq ) --- | SBP class for message MSG_TRACKING_IQ_DEP (0x001C).+instance Binary TrackingChannelCorrelationDep where+ get = do+ _trackingChannelCorrelationDep_I <- fromIntegral <$> getWord32le+ _trackingChannelCorrelationDep_Q <- fromIntegral <$> getWord32le+ pure TrackingChannelCorrelationDep {..}++ put TrackingChannelCorrelationDep {..} = do+ (putWord32le . fromIntegral) _trackingChannelCorrelationDep_I+ (putWord32le . fromIntegral) _trackingChannelCorrelationDep_Q++$(makeJSON "_trackingChannelCorrelationDep_" ''TrackingChannelCorrelationDep)+$(makeLenses ''TrackingChannelCorrelationDep)++msgTrackingIqDepB :: Word16+msgTrackingIqDepB = 0x002C++-- | SBP class for message MSG_TRACKING_IQ_DEP_B (0x002C). --+-- When enabled, a tracking channel can output the correlations at each update+-- interval.+data MsgTrackingIqDepB = MsgTrackingIqDepB+ { _msgTrackingIqDepB_channel :: !Word8+ -- ^ Tracking channel of origin+ , _msgTrackingIqDepB_sid :: !GnssSignal+ -- ^ GNSS signal identifier+ , _msgTrackingIqDepB_corrs :: ![TrackingChannelCorrelationDep]+ -- ^ Early, Prompt and Late correlations+ } deriving ( Show, Read, Eq )++instance Binary MsgTrackingIqDepB where+ get = do+ _msgTrackingIqDepB_channel <- getWord8+ _msgTrackingIqDepB_sid <- get+ _msgTrackingIqDepB_corrs <- replicateM 3 get+ pure MsgTrackingIqDepB {..}++ put MsgTrackingIqDepB {..} = do+ putWord8 _msgTrackingIqDepB_channel+ put _msgTrackingIqDepB_sid+ mapM_ put _msgTrackingIqDepB_corrs++$(makeSBP 'msgTrackingIqDepB ''MsgTrackingIqDepB)+$(makeJSON "_msgTrackingIqDepB_" ''MsgTrackingIqDepB)+$(makeLenses ''MsgTrackingIqDepB)++msgTrackingIqDepA :: Word16+msgTrackingIqDepA = 0x001C++-- | SBP class for message MSG_TRACKING_IQ_DEP_A (0x001C).+-- -- Deprecated.-data MsgTrackingIqDep = MsgTrackingIqDep- { _msgTrackingIqDep_channel :: !Word8+data MsgTrackingIqDepA = MsgTrackingIqDepA+ { _msgTrackingIqDepA_channel :: !Word8 -- ^ Tracking channel of origin- , _msgTrackingIqDep_sid :: !GnssSignalDep+ , _msgTrackingIqDepA_sid :: !GnssSignalDep -- ^ GNSS signal identifier- , _msgTrackingIqDep_corrs :: ![TrackingChannelCorrelation]+ , _msgTrackingIqDepA_corrs :: ![TrackingChannelCorrelationDep] -- ^ Early, Prompt and Late correlations } deriving ( Show, Read, Eq ) -instance Binary MsgTrackingIqDep where+instance Binary MsgTrackingIqDepA where get = do- _msgTrackingIqDep_channel <- getWord8- _msgTrackingIqDep_sid <- get- _msgTrackingIqDep_corrs <- replicateM 3 get- pure MsgTrackingIqDep {..}+ _msgTrackingIqDepA_channel <- getWord8+ _msgTrackingIqDepA_sid <- get+ _msgTrackingIqDepA_corrs <- replicateM 3 get+ pure MsgTrackingIqDepA {..} - put MsgTrackingIqDep {..} = do- putWord8 _msgTrackingIqDep_channel- put _msgTrackingIqDep_sid- mapM_ put _msgTrackingIqDep_corrs+ put MsgTrackingIqDepA {..} = do+ putWord8 _msgTrackingIqDepA_channel+ put _msgTrackingIqDepA_sid+ mapM_ put _msgTrackingIqDepA_corrs -$(makeSBP 'msgTrackingIqDep ''MsgTrackingIqDep)-$(makeJSON "_msgTrackingIqDep_" ''MsgTrackingIqDep)-$(makeLenses ''MsgTrackingIqDep)+$(makeSBP 'msgTrackingIqDepA ''MsgTrackingIqDepA)+$(makeJSON "_msgTrackingIqDepA_" ''MsgTrackingIqDepA)+$(makeLenses ''MsgTrackingIqDepA) -- | TrackingChannelStateDepA. --
@@ -65,7 +65,7 @@ put MsgOdometry {..} = do putWord32le _msgOdometry_tow- putWord32le $ fromIntegral _msgOdometry_velocity+ (putWord32le . fromIntegral) _msgOdometry_velocity putWord8 _msgOdometry_flags $(makeSBP 'msgOdometry ''MsgOdometry)