sbp 2.3.16 → 2.3.17
raw patch · 4 files changed
+719/−88 lines, 4 files
Files
- README.md +1/−1
- sbp.cabal +1/−1
- src/SwiftNav/SBP/Msg.hs +42/−6
- src/SwiftNav/SBP/Observation.hs +675/−80
README.md view
@@ -13,7 +13,7 @@ The library supports building against Stackage LTS-10. To install from Hackage using `stack`: - $ stack install --resolver lts-10.0 sbp # (LTS-10)+ $ stack install --resolver lts-10.10 sbp # (LTS-10) Note that we explicitly specify the resolvers to use, as installing `libsbp` may fail to build with more recent resolvers.
sbp.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.22 name: sbp-version: 2.3.16+version: 2.3.17 license: LGPL-3 copyright: Copyright (C) 2015-2018 Swift Navigation, Inc. maintainer: Swift Navigation <dev@swiftnav.com>
@@ -88,18 +88,23 @@ | SBPMsgDgnssStatus MsgDgnssStatus Msg | SBPMsgDops MsgDops Msg | SBPMsgDopsDepA MsgDopsDepA Msg+ | SBPMsgEphemerisBds MsgEphemerisBds Msg | SBPMsgEphemerisDepA MsgEphemerisDepA Msg | SBPMsgEphemerisDepB MsgEphemerisDepB Msg | SBPMsgEphemerisDepC MsgEphemerisDepC Msg | SBPMsgEphemerisDepD MsgEphemerisDepD Msg+ | SBPMsgEphemerisGal MsgEphemerisGal Msg | SBPMsgEphemerisGlo MsgEphemerisGlo Msg | SBPMsgEphemerisGloDepA MsgEphemerisGloDepA Msg | SBPMsgEphemerisGloDepB MsgEphemerisGloDepB Msg | SBPMsgEphemerisGloDepC MsgEphemerisGloDepC Msg+ | SBPMsgEphemerisGloDepD MsgEphemerisGloDepD Msg | SBPMsgEphemerisGps MsgEphemerisGps Msg | SBPMsgEphemerisGpsDepE MsgEphemerisGpsDepE Msg+ | SBPMsgEphemerisGpsDepF MsgEphemerisGpsDepF Msg | SBPMsgEphemerisSbas MsgEphemerisSbas Msg | SBPMsgEphemerisSbasDepA MsgEphemerisSbasDepA Msg+ | SBPMsgEphemerisSbasDepB MsgEphemerisSbasDepB Msg | SBPMsgExtEvent MsgExtEvent Msg | SBPMsgFileioReadDirReq MsgFileioReadDirReq Msg | SBPMsgFileioReadDirResp MsgFileioReadDirResp Msg@@ -115,6 +120,7 @@ | SBPMsgFlashReadResp MsgFlashReadResp Msg | SBPMsgFwd MsgFwd Msg | SBPMsgGloBiases MsgGloBiases Msg+ | SBPMsgGnssCapb MsgGnssCapb Msg | SBPMsgGpsTime MsgGpsTime Msg | SBPMsgGpsTimeDepA MsgGpsTimeDepA Msg | SBPMsgGroupDelay MsgGroupDelay Msg@@ -177,7 +183,7 @@ | SBPMsgStmFlashUnlockSector MsgStmFlashUnlockSector Msg | SBPMsgStmUniqueIdReq MsgStmUniqueIdReq Msg | SBPMsgStmUniqueIdResp MsgStmUniqueIdResp Msg- | SBPMsgSvConfigurationGps MsgSvConfigurationGps Msg+ | SBPMsgSvConfigurationGpsDep MsgSvConfigurationGpsDep Msg | SBPMsgThreadState MsgThreadState Msg | SBPMsgTrackingIq MsgTrackingIq Msg | SBPMsgTrackingIqDep MsgTrackingIqDep Msg@@ -246,18 +252,23 @@ | _msgSBPType == msgDgnssStatus = SBPMsgDgnssStatus (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgDops = SBPMsgDops (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgDopsDepA = SBPMsgDopsDepA (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgEphemerisBds = SBPMsgEphemerisBds (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisDepA = SBPMsgEphemerisDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisDepB = SBPMsgEphemerisDepB (decode (fromStrict (unBytes _msgSBPPayload))) m | _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 == msgEphemerisGlo = SBPMsgEphemerisGlo (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGloDepA = SBPMsgEphemerisGloDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGloDepB = SBPMsgEphemerisGloDepB (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgEphemerisGloDepC = SBPMsgEphemerisGloDepC (decode (fromStrict (unBytes _msgSBPPayload))) m+ | _msgSBPType == msgEphemerisGloDepD = SBPMsgEphemerisGloDepD (decode (fromStrict (unBytes _msgSBPPayload))) m | _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 == 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 == msgFileioReadDirReq = SBPMsgFileioReadDirReq (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgFileioReadDirResp = SBPMsgFileioReadDirResp (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -273,6 +284,7 @@ | _msgSBPType == msgFlashReadResp = SBPMsgFlashReadResp (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 | _msgSBPType == msgGpsTime = SBPMsgGpsTime (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgGpsTimeDepA = SBPMsgGpsTimeDepA (decode (fromStrict (unBytes _msgSBPPayload))) m | _msgSBPType == msgGroupDelay = SBPMsgGroupDelay (decode (fromStrict (unBytes _msgSBPPayload))) m@@ -335,7 +347,7 @@ | _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 == msgSvConfigurationGps = SBPMsgSvConfigurationGps (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@@ -396,18 +408,23 @@ encoder (SBPMsgDgnssStatus _ m) = put m encoder (SBPMsgDops _ m) = put m encoder (SBPMsgDopsDepA _ m) = put m+ encoder (SBPMsgEphemerisBds _ m) = put m encoder (SBPMsgEphemerisDepA _ m) = put m encoder (SBPMsgEphemerisDepB _ m) = put m encoder (SBPMsgEphemerisDepC _ m) = put m encoder (SBPMsgEphemerisDepD _ m) = put m+ encoder (SBPMsgEphemerisGal _ m) = put m encoder (SBPMsgEphemerisGlo _ m) = put m encoder (SBPMsgEphemerisGloDepA _ m) = put m encoder (SBPMsgEphemerisGloDepB _ m) = put m encoder (SBPMsgEphemerisGloDepC _ m) = put m+ encoder (SBPMsgEphemerisGloDepD _ m) = put m encoder (SBPMsgEphemerisGps _ m) = put m encoder (SBPMsgEphemerisGpsDepE _ m) = put m+ encoder (SBPMsgEphemerisGpsDepF _ m) = put m encoder (SBPMsgEphemerisSbas _ m) = put m encoder (SBPMsgEphemerisSbasDepA _ m) = put m+ encoder (SBPMsgEphemerisSbasDepB _ m) = put m encoder (SBPMsgExtEvent _ m) = put m encoder (SBPMsgFileioReadDirReq _ m) = put m encoder (SBPMsgFileioReadDirResp _ m) = put m@@ -423,6 +440,7 @@ encoder (SBPMsgFlashReadResp _ m) = put m encoder (SBPMsgFwd _ m) = put m encoder (SBPMsgGloBiases _ m) = put m+ encoder (SBPMsgGnssCapb _ m) = put m encoder (SBPMsgGpsTime _ m) = put m encoder (SBPMsgGpsTimeDepA _ m) = put m encoder (SBPMsgGroupDelay _ m) = put m@@ -485,7 +503,7 @@ encoder (SBPMsgStmFlashUnlockSector _ m) = put m encoder (SBPMsgStmUniqueIdReq _ m) = put m encoder (SBPMsgStmUniqueIdResp _ m) = put m- encoder (SBPMsgSvConfigurationGps _ m) = put m+ encoder (SBPMsgSvConfigurationGpsDep _ m) = put m encoder (SBPMsgThreadState _ m) = put m encoder (SBPMsgTrackingIq _ m) = put m encoder (SBPMsgTrackingIqDep _ m) = put m@@ -550,18 +568,23 @@ | msgType == msgDgnssStatus = SBPMsgDgnssStatus <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgDops = SBPMsgDops <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgDopsDepA = SBPMsgDopsDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgEphemerisBds = SBPMsgEphemerisBds <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisDepA = SBPMsgEphemerisDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgEphemerisDepB = SBPMsgEphemerisDepB <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | 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 == 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 | msgType == msgEphemerisGloDepC = SBPMsgEphemerisGloDepC <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj+ | msgType == msgEphemerisGloDepD = SBPMsgEphemerisGloDepD <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | 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 == 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 == msgFileioReadDirReq = SBPMsgFileioReadDirReq <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgFileioReadDirResp = SBPMsgFileioReadDirResp <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -577,6 +600,7 @@ | msgType == msgFlashReadResp = SBPMsgFlashReadResp <$> 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 | msgType == msgGpsTime = SBPMsgGpsTime <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgGpsTimeDepA = SBPMsgGpsTimeDepA <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj | msgType == msgGroupDelay = SBPMsgGroupDelay <$> pure (decode (fromStrict (unBytes payload))) <*> parseJSON obj@@ -639,7 +663,7 @@ | 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 == msgSvConfigurationGps = SBPMsgSvConfigurationGps <$> 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@@ -705,18 +729,23 @@ toJSON (SBPMsgDgnssStatus n m) = toJSON n <<>> toJSON m toJSON (SBPMsgDops n m) = toJSON n <<>> toJSON m toJSON (SBPMsgDopsDepA n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgEphemerisBds n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisDepB n m) = toJSON n <<>> toJSON m 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 (SBPMsgEphemerisGlo n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGloDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGloDepB n m) = toJSON n <<>> toJSON m toJSON (SBPMsgEphemerisGloDepC n m) = toJSON n <<>> toJSON m+ toJSON (SBPMsgEphemerisGloDepD n m) = toJSON n <<>> toJSON m 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 (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 (SBPMsgFileioReadDirReq n m) = toJSON n <<>> toJSON m toJSON (SBPMsgFileioReadDirResp n m) = toJSON n <<>> toJSON m@@ -732,6 +761,7 @@ toJSON (SBPMsgFlashReadResp 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 toJSON (SBPMsgGpsTime n m) = toJSON n <<>> toJSON m toJSON (SBPMsgGpsTimeDepA n m) = toJSON n <<>> toJSON m toJSON (SBPMsgGroupDelay n m) = toJSON n <<>> toJSON m@@ -794,7 +824,7 @@ toJSON (SBPMsgStmFlashUnlockSector n m) = toJSON n <<>> toJSON m toJSON (SBPMsgStmUniqueIdReq n m) = toJSON n <<>> toJSON m toJSON (SBPMsgStmUniqueIdResp n m) = toJSON n <<>> toJSON m- toJSON (SBPMsgSvConfigurationGps 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@@ -854,18 +884,23 @@ msg f (SBPMsgDgnssStatus n m) = SBPMsgDgnssStatus n <$> f m msg f (SBPMsgDops n m) = SBPMsgDops n <$> f m msg f (SBPMsgDopsDepA n m) = SBPMsgDopsDepA n <$> f m+ msg f (SBPMsgEphemerisBds n m) = SBPMsgEphemerisBds n <$> f m msg f (SBPMsgEphemerisDepA n m) = SBPMsgEphemerisDepA n <$> f m msg f (SBPMsgEphemerisDepB n m) = SBPMsgEphemerisDepB n <$> f m 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 (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 msg f (SBPMsgEphemerisGloDepC n m) = SBPMsgEphemerisGloDepC n <$> f m+ msg f (SBPMsgEphemerisGloDepD n m) = SBPMsgEphemerisGloDepD n <$> f m 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 (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 (SBPMsgFileioReadDirReq n m) = SBPMsgFileioReadDirReq n <$> f m msg f (SBPMsgFileioReadDirResp n m) = SBPMsgFileioReadDirResp n <$> f m@@ -881,6 +916,7 @@ msg f (SBPMsgFlashReadResp n m) = SBPMsgFlashReadResp 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 msg f (SBPMsgGpsTime n m) = SBPMsgGpsTime n <$> f m msg f (SBPMsgGpsTimeDepA n m) = SBPMsgGpsTimeDepA n <$> f m msg f (SBPMsgGroupDelay n m) = SBPMsgGroupDelay n <$> f m@@ -943,7 +979,7 @@ 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 (SBPMsgSvConfigurationGps n m) = SBPMsgSvConfigurationGps 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
@@ -243,7 +243,7 @@ -- ^ GNSS signal identifier (16 bit) , _ephemerisCommonContent_toe :: !GpsTimeSec -- ^ Time of Ephemerides- , _ephemerisCommonContent_ura :: !Double+ , _ephemerisCommonContent_ura :: !Float -- ^ User Range Accuracy , _ephemerisCommonContent_fit_interval :: !Word32 -- ^ Curve fit interval@@ -258,7 +258,7 @@ get = do _ephemerisCommonContent_sid <- get _ephemerisCommonContent_toe <- get- _ephemerisCommonContent_ura <- getFloat64le+ _ephemerisCommonContent_ura <- getFloat32le _ephemerisCommonContent_fit_interval <- getWord32le _ephemerisCommonContent_valid <- getWord8 _ephemerisCommonContent_health_bits <- getWord8@@ -267,7 +267,7 @@ put EphemerisCommonContent {..} = do put _ephemerisCommonContent_sid put _ephemerisCommonContent_toe- putFloat64le _ephemerisCommonContent_ura+ putFloat32le _ephemerisCommonContent_ura putWord32le _ephemerisCommonContent_fit_interval putWord8 _ephemerisCommonContent_valid putWord8 _ephemerisCommonContent_health_bits@@ -275,6 +275,43 @@ $(makeJSON "_ephemerisCommonContent_" ''EphemerisCommonContent) $(makeLenses ''EphemerisCommonContent) +data EphemerisCommonContentDepB = EphemerisCommonContentDepB+ { _ephemerisCommonContentDepB_sid :: !GnssSignal+ -- ^ GNSS signal identifier (16 bit)+ , _ephemerisCommonContentDepB_toe :: !GpsTimeSec+ -- ^ Time of Ephemerides+ , _ephemerisCommonContentDepB_ura :: !Double+ -- ^ User Range Accuracy+ , _ephemerisCommonContentDepB_fit_interval :: !Word32+ -- ^ Curve fit interval+ , _ephemerisCommonContentDepB_valid :: !Word8+ -- ^ Status of ephemeris, 1 = valid, 0 = invalid+ , _ephemerisCommonContentDepB_health_bits :: !Word8+ -- ^ Satellite health status. GPS: ICD-GPS-200, chapter 20.3.3.3.1.4 Others:+ -- 0 = valid, non-zero = invalid+ } deriving ( Show, Read, Eq )++instance Binary EphemerisCommonContentDepB where+ get = do+ _ephemerisCommonContentDepB_sid <- get+ _ephemerisCommonContentDepB_toe <- get+ _ephemerisCommonContentDepB_ura <- getFloat64le+ _ephemerisCommonContentDepB_fit_interval <- getWord32le+ _ephemerisCommonContentDepB_valid <- getWord8+ _ephemerisCommonContentDepB_health_bits <- getWord8+ pure EphemerisCommonContentDepB {..}++ put EphemerisCommonContentDepB {..} = do+ put _ephemerisCommonContentDepB_sid+ put _ephemerisCommonContentDepB_toe+ putFloat64le _ephemerisCommonContentDepB_ura+ putWord32le _ephemerisCommonContentDepB_fit_interval+ putWord8 _ephemerisCommonContentDepB_valid+ putWord8 _ephemerisCommonContentDepB_health_bits++$(makeJSON "_ephemerisCommonContentDepB_" ''EphemerisCommonContentDepB)+$(makeLenses ''EphemerisCommonContentDepB)+ data EphemerisCommonContentDepA = EphemerisCommonContentDepA { _ephemerisCommonContentDepA_sid :: !GnssSignalDep -- ^ GNSS signal identifier@@ -430,10 +467,126 @@ $(makeJSON "_msgEphemerisGpsDepE_" ''MsgEphemerisGpsDepE) $(makeLenses ''MsgEphemerisGpsDepE) +msgEphemerisGpsDepF :: Word16+msgEphemerisGpsDepF = 0x0086++-- | SBP class for message MSG_EPHEMERIS_GPS_DEP_F (0x0086).+--+-- This observation message has been deprecated in favor of ephemeris message+-- using floats for size reduction.+data MsgEphemerisGpsDepF = MsgEphemerisGpsDepF+ { _msgEphemerisGpsDepF_common :: !EphemerisCommonContentDepB+ -- ^ Values common for all ephemeris types+ , _msgEphemerisGpsDepF_tgd :: !Double+ -- ^ Group delay differential between L1 and L2+ , _msgEphemerisGpsDepF_c_rs :: !Double+ -- ^ Amplitude of the sine harmonic correction term to the orbit radius+ , _msgEphemerisGpsDepF_c_rc :: !Double+ -- ^ Amplitude of the cosine harmonic correction term to the orbit radius+ , _msgEphemerisGpsDepF_c_uc :: !Double+ -- ^ Amplitude of the cosine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisGpsDepF_c_us :: !Double+ -- ^ Amplitude of the sine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisGpsDepF_c_ic :: !Double+ -- ^ Amplitude of the cosine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisGpsDepF_c_is :: !Double+ -- ^ Amplitude of the sine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisGpsDepF_dn :: !Double+ -- ^ Mean motion difference+ , _msgEphemerisGpsDepF_m0 :: !Double+ -- ^ Mean anomaly at reference time+ , _msgEphemerisGpsDepF_ecc :: !Double+ -- ^ Eccentricity of satellite orbit+ , _msgEphemerisGpsDepF_sqrta :: !Double+ -- ^ Square root of the semi-major axis of orbit+ , _msgEphemerisGpsDepF_omega0 :: !Double+ -- ^ Longitude of ascending node of orbit plane at weekly epoch+ , _msgEphemerisGpsDepF_omegadot :: !Double+ -- ^ Rate of right ascension+ , _msgEphemerisGpsDepF_w :: !Double+ -- ^ Argument of perigee+ , _msgEphemerisGpsDepF_inc :: !Double+ -- ^ Inclination+ , _msgEphemerisGpsDepF_inc_dot :: !Double+ -- ^ Inclination first derivative+ , _msgEphemerisGpsDepF_af0 :: !Double+ -- ^ Polynomial clock correction coefficient (clock bias)+ , _msgEphemerisGpsDepF_af1 :: !Double+ -- ^ Polynomial clock correction coefficient (clock drift)+ , _msgEphemerisGpsDepF_af2 :: !Double+ -- ^ Polynomial clock correction coefficient (rate of clock drift)+ , _msgEphemerisGpsDepF_toc :: !GpsTimeSec+ -- ^ Clock reference+ , _msgEphemerisGpsDepF_iode :: !Word8+ -- ^ Issue of ephemeris data+ , _msgEphemerisGpsDepF_iodc :: !Word16+ -- ^ Issue of clock data+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisGpsDepF where+ get = do+ _msgEphemerisGpsDepF_common <- get+ _msgEphemerisGpsDepF_tgd <- getFloat64le+ _msgEphemerisGpsDepF_c_rs <- getFloat64le+ _msgEphemerisGpsDepF_c_rc <- getFloat64le+ _msgEphemerisGpsDepF_c_uc <- getFloat64le+ _msgEphemerisGpsDepF_c_us <- getFloat64le+ _msgEphemerisGpsDepF_c_ic <- getFloat64le+ _msgEphemerisGpsDepF_c_is <- getFloat64le+ _msgEphemerisGpsDepF_dn <- getFloat64le+ _msgEphemerisGpsDepF_m0 <- getFloat64le+ _msgEphemerisGpsDepF_ecc <- getFloat64le+ _msgEphemerisGpsDepF_sqrta <- getFloat64le+ _msgEphemerisGpsDepF_omega0 <- getFloat64le+ _msgEphemerisGpsDepF_omegadot <- getFloat64le+ _msgEphemerisGpsDepF_w <- getFloat64le+ _msgEphemerisGpsDepF_inc <- getFloat64le+ _msgEphemerisGpsDepF_inc_dot <- getFloat64le+ _msgEphemerisGpsDepF_af0 <- getFloat64le+ _msgEphemerisGpsDepF_af1 <- getFloat64le+ _msgEphemerisGpsDepF_af2 <- getFloat64le+ _msgEphemerisGpsDepF_toc <- get+ _msgEphemerisGpsDepF_iode <- getWord8+ _msgEphemerisGpsDepF_iodc <- getWord16le+ pure MsgEphemerisGpsDepF {..}++ put MsgEphemerisGpsDepF {..} = do+ put _msgEphemerisGpsDepF_common+ putFloat64le _msgEphemerisGpsDepF_tgd+ putFloat64le _msgEphemerisGpsDepF_c_rs+ putFloat64le _msgEphemerisGpsDepF_c_rc+ putFloat64le _msgEphemerisGpsDepF_c_uc+ putFloat64le _msgEphemerisGpsDepF_c_us+ putFloat64le _msgEphemerisGpsDepF_c_ic+ putFloat64le _msgEphemerisGpsDepF_c_is+ putFloat64le _msgEphemerisGpsDepF_dn+ putFloat64le _msgEphemerisGpsDepF_m0+ putFloat64le _msgEphemerisGpsDepF_ecc+ putFloat64le _msgEphemerisGpsDepF_sqrta+ putFloat64le _msgEphemerisGpsDepF_omega0+ putFloat64le _msgEphemerisGpsDepF_omegadot+ putFloat64le _msgEphemerisGpsDepF_w+ putFloat64le _msgEphemerisGpsDepF_inc+ putFloat64le _msgEphemerisGpsDepF_inc_dot+ putFloat64le _msgEphemerisGpsDepF_af0+ putFloat64le _msgEphemerisGpsDepF_af1+ putFloat64le _msgEphemerisGpsDepF_af2+ put _msgEphemerisGpsDepF_toc+ putWord8 _msgEphemerisGpsDepF_iode+ putWord16le _msgEphemerisGpsDepF_iodc++$(makeSBP 'msgEphemerisGpsDepF ''MsgEphemerisGpsDepF)+$(makeJSON "_msgEphemerisGpsDepF_" ''MsgEphemerisGpsDepF)+$(makeLenses ''MsgEphemerisGpsDepF)+ msgEphemerisGps :: Word16-msgEphemerisGps = 0x0086+msgEphemerisGps = 0x008A --- | SBP class for message MSG_EPHEMERIS_GPS (0x0086).+-- | SBP class for message MSG_EPHEMERIS_GPS (0x008A). -- -- The ephemeris message returns a set of satellite orbit parameters that is -- used to calculate GPS satellite position, velocity, and clock offset. Please@@ -442,22 +595,22 @@ data MsgEphemerisGps = MsgEphemerisGps { _msgEphemerisGps_common :: !EphemerisCommonContent -- ^ Values common for all ephemeris types- , _msgEphemerisGps_tgd :: !Double+ , _msgEphemerisGps_tgd :: !Float -- ^ Group delay differential between L1 and L2- , _msgEphemerisGps_c_rs :: !Double+ , _msgEphemerisGps_c_rs :: !Float -- ^ Amplitude of the sine harmonic correction term to the orbit radius- , _msgEphemerisGps_c_rc :: !Double+ , _msgEphemerisGps_c_rc :: !Float -- ^ Amplitude of the cosine harmonic correction term to the orbit radius- , _msgEphemerisGps_c_uc :: !Double+ , _msgEphemerisGps_c_uc :: !Float -- ^ Amplitude of the cosine harmonic correction term to the argument of -- latitude- , _msgEphemerisGps_c_us :: !Double+ , _msgEphemerisGps_c_us :: !Float -- ^ Amplitude of the sine harmonic correction term to the argument of -- latitude- , _msgEphemerisGps_c_ic :: !Double+ , _msgEphemerisGps_c_ic :: !Float -- ^ Amplitude of the cosine harmonic correction term to the angle of -- inclination- , _msgEphemerisGps_c_is :: !Double+ , _msgEphemerisGps_c_is :: !Float -- ^ Amplitude of the sine harmonic correction term to the angle of -- inclination , _msgEphemerisGps_dn :: !Double@@ -478,11 +631,11 @@ -- ^ Inclination , _msgEphemerisGps_inc_dot :: !Double -- ^ Inclination first derivative- , _msgEphemerisGps_af0 :: !Double+ , _msgEphemerisGps_af0 :: !Float -- ^ Polynomial clock correction coefficient (clock bias)- , _msgEphemerisGps_af1 :: !Double+ , _msgEphemerisGps_af1 :: !Float -- ^ Polynomial clock correction coefficient (clock drift)- , _msgEphemerisGps_af2 :: !Double+ , _msgEphemerisGps_af2 :: !Float -- ^ Polynomial clock correction coefficient (rate of clock drift) , _msgEphemerisGps_toc :: !GpsTimeSec -- ^ Clock reference@@ -495,13 +648,13 @@ instance Binary MsgEphemerisGps where get = do _msgEphemerisGps_common <- get- _msgEphemerisGps_tgd <- getFloat64le- _msgEphemerisGps_c_rs <- getFloat64le- _msgEphemerisGps_c_rc <- getFloat64le- _msgEphemerisGps_c_uc <- getFloat64le- _msgEphemerisGps_c_us <- getFloat64le- _msgEphemerisGps_c_ic <- getFloat64le- _msgEphemerisGps_c_is <- getFloat64le+ _msgEphemerisGps_tgd <- getFloat32le+ _msgEphemerisGps_c_rs <- getFloat32le+ _msgEphemerisGps_c_rc <- getFloat32le+ _msgEphemerisGps_c_uc <- getFloat32le+ _msgEphemerisGps_c_us <- getFloat32le+ _msgEphemerisGps_c_ic <- getFloat32le+ _msgEphemerisGps_c_is <- getFloat32le _msgEphemerisGps_dn <- getFloat64le _msgEphemerisGps_m0 <- getFloat64le _msgEphemerisGps_ecc <- getFloat64le@@ -511,9 +664,9 @@ _msgEphemerisGps_w <- getFloat64le _msgEphemerisGps_inc <- getFloat64le _msgEphemerisGps_inc_dot <- getFloat64le- _msgEphemerisGps_af0 <- getFloat64le- _msgEphemerisGps_af1 <- getFloat64le- _msgEphemerisGps_af2 <- getFloat64le+ _msgEphemerisGps_af0 <- getFloat32le+ _msgEphemerisGps_af1 <- getFloat32le+ _msgEphemerisGps_af2 <- getFloat32le _msgEphemerisGps_toc <- get _msgEphemerisGps_iode <- getWord8 _msgEphemerisGps_iodc <- getWord16le@@ -521,13 +674,13 @@ put MsgEphemerisGps {..} = do put _msgEphemerisGps_common- putFloat64le _msgEphemerisGps_tgd- putFloat64le _msgEphemerisGps_c_rs- putFloat64le _msgEphemerisGps_c_rc- putFloat64le _msgEphemerisGps_c_uc- putFloat64le _msgEphemerisGps_c_us- putFloat64le _msgEphemerisGps_c_ic- putFloat64le _msgEphemerisGps_c_is+ putFloat32le _msgEphemerisGps_tgd+ putFloat32le _msgEphemerisGps_c_rs+ putFloat32le _msgEphemerisGps_c_rc+ putFloat32le _msgEphemerisGps_c_uc+ putFloat32le _msgEphemerisGps_c_us+ putFloat32le _msgEphemerisGps_c_ic+ putFloat32le _msgEphemerisGps_c_is putFloat64le _msgEphemerisGps_dn putFloat64le _msgEphemerisGps_m0 putFloat64le _msgEphemerisGps_ecc@@ -537,9 +690,9 @@ putFloat64le _msgEphemerisGps_w putFloat64le _msgEphemerisGps_inc putFloat64le _msgEphemerisGps_inc_dot- putFloat64le _msgEphemerisGps_af0- putFloat64le _msgEphemerisGps_af1- putFloat64le _msgEphemerisGps_af2+ putFloat32le _msgEphemerisGps_af0+ putFloat32le _msgEphemerisGps_af1+ putFloat32le _msgEphemerisGps_af2 put _msgEphemerisGps_toc putWord8 _msgEphemerisGps_iode putWord16le _msgEphemerisGps_iodc@@ -548,6 +701,250 @@ $(makeJSON "_msgEphemerisGps_" ''MsgEphemerisGps) $(makeLenses ''MsgEphemerisGps) +msgEphemerisBds :: Word16+msgEphemerisBds = 0x0089++-- | SBP class for message MSG_EPHEMERIS_BDS (0x0089).+--+-- The ephemeris message returns a set of satellite orbit parameters that is+-- used to calculate BDS satellite position, velocity, and clock offset. Please+-- see the BeiDou Navigation Satellite System SIS-ICD Version 2.1, Table 5-9+-- for more details.+data MsgEphemerisBds = MsgEphemerisBds+ { _msgEphemerisBds_common :: !EphemerisCommonContent+ -- ^ Values common for all ephemeris types+ , _msgEphemerisBds_tgd1 :: !Float+ -- ^ Group delay differential for B1+ , _msgEphemerisBds_tgd2 :: !Float+ -- ^ Group delay differential for B2+ , _msgEphemerisBds_c_rs :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the orbit radius+ , _msgEphemerisBds_c_rc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the orbit radius+ , _msgEphemerisBds_c_uc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisBds_c_us :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisBds_c_ic :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisBds_c_is :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisBds_dn :: !Double+ -- ^ Mean motion difference+ , _msgEphemerisBds_m0 :: !Double+ -- ^ Mean anomaly at reference time+ , _msgEphemerisBds_ecc :: !Double+ -- ^ Eccentricity of satellite orbit+ , _msgEphemerisBds_sqrta :: !Double+ -- ^ Square root of the semi-major axis of orbit+ , _msgEphemerisBds_omega0 :: !Double+ -- ^ Longitude of ascending node of orbit plane at weekly epoch+ , _msgEphemerisBds_omegadot :: !Double+ -- ^ Rate of right ascension+ , _msgEphemerisBds_w :: !Double+ -- ^ Argument of perigee+ , _msgEphemerisBds_inc :: !Double+ -- ^ Inclination+ , _msgEphemerisBds_inc_dot :: !Double+ -- ^ Inclination first derivative+ , _msgEphemerisBds_af0 :: !Double+ -- ^ Polynomial clock correction coefficient (clock bias)+ , _msgEphemerisBds_af1 :: !Float+ -- ^ Polynomial clock correction coefficient (clock drift)+ , _msgEphemerisBds_af2 :: !Float+ -- ^ Polynomial clock correction coefficient (rate of clock drift)+ , _msgEphemerisBds_toc :: !GpsTimeSec+ -- ^ Clock reference+ , _msgEphemerisBds_iode :: !Word8+ -- ^ Issue of ephemeris data+ , _msgEphemerisBds_iodc :: !Word16+ -- ^ Issue of clock data+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisBds where+ get = do+ _msgEphemerisBds_common <- get+ _msgEphemerisBds_tgd1 <- getFloat32le+ _msgEphemerisBds_tgd2 <- getFloat32le+ _msgEphemerisBds_c_rs <- getFloat32le+ _msgEphemerisBds_c_rc <- getFloat32le+ _msgEphemerisBds_c_uc <- getFloat32le+ _msgEphemerisBds_c_us <- getFloat32le+ _msgEphemerisBds_c_ic <- getFloat32le+ _msgEphemerisBds_c_is <- getFloat32le+ _msgEphemerisBds_dn <- getFloat64le+ _msgEphemerisBds_m0 <- getFloat64le+ _msgEphemerisBds_ecc <- getFloat64le+ _msgEphemerisBds_sqrta <- getFloat64le+ _msgEphemerisBds_omega0 <- getFloat64le+ _msgEphemerisBds_omegadot <- getFloat64le+ _msgEphemerisBds_w <- getFloat64le+ _msgEphemerisBds_inc <- getFloat64le+ _msgEphemerisBds_inc_dot <- getFloat64le+ _msgEphemerisBds_af0 <- getFloat64le+ _msgEphemerisBds_af1 <- getFloat32le+ _msgEphemerisBds_af2 <- getFloat32le+ _msgEphemerisBds_toc <- get+ _msgEphemerisBds_iode <- getWord8+ _msgEphemerisBds_iodc <- getWord16le+ pure MsgEphemerisBds {..}++ put MsgEphemerisBds {..} = do+ put _msgEphemerisBds_common+ putFloat32le _msgEphemerisBds_tgd1+ putFloat32le _msgEphemerisBds_tgd2+ putFloat32le _msgEphemerisBds_c_rs+ putFloat32le _msgEphemerisBds_c_rc+ putFloat32le _msgEphemerisBds_c_uc+ putFloat32le _msgEphemerisBds_c_us+ putFloat32le _msgEphemerisBds_c_ic+ putFloat32le _msgEphemerisBds_c_is+ putFloat64le _msgEphemerisBds_dn+ putFloat64le _msgEphemerisBds_m0+ putFloat64le _msgEphemerisBds_ecc+ putFloat64le _msgEphemerisBds_sqrta+ putFloat64le _msgEphemerisBds_omega0+ putFloat64le _msgEphemerisBds_omegadot+ putFloat64le _msgEphemerisBds_w+ putFloat64le _msgEphemerisBds_inc+ putFloat64le _msgEphemerisBds_inc_dot+ putFloat64le _msgEphemerisBds_af0+ putFloat32le _msgEphemerisBds_af1+ putFloat32le _msgEphemerisBds_af2+ put _msgEphemerisBds_toc+ putWord8 _msgEphemerisBds_iode+ putWord16le _msgEphemerisBds_iodc++$(makeSBP 'msgEphemerisBds ''MsgEphemerisBds)+$(makeJSON "_msgEphemerisBds_" ''MsgEphemerisBds)+$(makeLenses ''MsgEphemerisBds)++msgEphemerisGal :: Word16+msgEphemerisGal = 0x0095++-- | SBP class for message MSG_EPHEMERIS_GAL (0x0095).+--+-- The ephemeris message returns a set of satellite orbit parameters that is+-- used to calculate Galileo satellite position, velocity, and clock offset.+-- Please see the Signal In Space ICD OS SIS ICD, Issue 1.3, December 2016 for+-- more details.+data MsgEphemerisGal = MsgEphemerisGal+ { _msgEphemerisGal_common :: !EphemerisCommonContent+ -- ^ Values common for all ephemeris types+ , _msgEphemerisGal_bgd_e1e5a :: !Float+ -- ^ E1-E5a Broadcast Group Delay+ , _msgEphemerisGal_bgd_e1e5b :: !Float+ -- ^ E1-E5b Broadcast Group Delay+ , _msgEphemerisGal_c_rs :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the orbit radius+ , _msgEphemerisGal_c_rc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the orbit radius+ , _msgEphemerisGal_c_uc :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisGal_c_us :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the argument of+ -- latitude+ , _msgEphemerisGal_c_ic :: !Float+ -- ^ Amplitude of the cosine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisGal_c_is :: !Float+ -- ^ Amplitude of the sine harmonic correction term to the angle of+ -- inclination+ , _msgEphemerisGal_dn :: !Double+ -- ^ Mean motion difference+ , _msgEphemerisGal_m0 :: !Double+ -- ^ Mean anomaly at reference time+ , _msgEphemerisGal_ecc :: !Double+ -- ^ Eccentricity of satellite orbit+ , _msgEphemerisGal_sqrta :: !Double+ -- ^ Square root of the semi-major axis of orbit+ , _msgEphemerisGal_omega0 :: !Double+ -- ^ Longitude of ascending node of orbit plane at weekly epoch+ , _msgEphemerisGal_omegadot :: !Double+ -- ^ Rate of right ascension+ , _msgEphemerisGal_w :: !Double+ -- ^ Argument of perigee+ , _msgEphemerisGal_inc :: !Double+ -- ^ Inclination+ , _msgEphemerisGal_inc_dot :: !Double+ -- ^ Inclination first derivative+ , _msgEphemerisGal_af0 :: !Double+ -- ^ Polynomial clock correction coefficient (clock bias)+ , _msgEphemerisGal_af1 :: !Double+ -- ^ Polynomial clock correction coefficient (clock drift)+ , _msgEphemerisGal_af2 :: !Float+ -- ^ Polynomial clock correction coefficient (rate of clock drift)+ , _msgEphemerisGal_toc :: !GpsTimeSec+ -- ^ Clock reference+ , _msgEphemerisGal_iode :: !Word16+ -- ^ Issue of ephemeris data+ , _msgEphemerisGal_iodc :: !Word16+ -- ^ Issue of clock data+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisGal where+ get = do+ _msgEphemerisGal_common <- get+ _msgEphemerisGal_bgd_e1e5a <- getFloat32le+ _msgEphemerisGal_bgd_e1e5b <- getFloat32le+ _msgEphemerisGal_c_rs <- getFloat32le+ _msgEphemerisGal_c_rc <- getFloat32le+ _msgEphemerisGal_c_uc <- getFloat32le+ _msgEphemerisGal_c_us <- getFloat32le+ _msgEphemerisGal_c_ic <- getFloat32le+ _msgEphemerisGal_c_is <- getFloat32le+ _msgEphemerisGal_dn <- getFloat64le+ _msgEphemerisGal_m0 <- getFloat64le+ _msgEphemerisGal_ecc <- getFloat64le+ _msgEphemerisGal_sqrta <- getFloat64le+ _msgEphemerisGal_omega0 <- getFloat64le+ _msgEphemerisGal_omegadot <- getFloat64le+ _msgEphemerisGal_w <- getFloat64le+ _msgEphemerisGal_inc <- getFloat64le+ _msgEphemerisGal_inc_dot <- getFloat64le+ _msgEphemerisGal_af0 <- getFloat64le+ _msgEphemerisGal_af1 <- getFloat64le+ _msgEphemerisGal_af2 <- getFloat32le+ _msgEphemerisGal_toc <- get+ _msgEphemerisGal_iode <- getWord16le+ _msgEphemerisGal_iodc <- getWord16le+ pure MsgEphemerisGal {..}++ put MsgEphemerisGal {..} = do+ put _msgEphemerisGal_common+ putFloat32le _msgEphemerisGal_bgd_e1e5a+ putFloat32le _msgEphemerisGal_bgd_e1e5b+ putFloat32le _msgEphemerisGal_c_rs+ putFloat32le _msgEphemerisGal_c_rc+ putFloat32le _msgEphemerisGal_c_uc+ putFloat32le _msgEphemerisGal_c_us+ putFloat32le _msgEphemerisGal_c_ic+ putFloat32le _msgEphemerisGal_c_is+ putFloat64le _msgEphemerisGal_dn+ putFloat64le _msgEphemerisGal_m0+ putFloat64le _msgEphemerisGal_ecc+ putFloat64le _msgEphemerisGal_sqrta+ putFloat64le _msgEphemerisGal_omega0+ putFloat64le _msgEphemerisGal_omegadot+ putFloat64le _msgEphemerisGal_w+ putFloat64le _msgEphemerisGal_inc+ putFloat64le _msgEphemerisGal_inc_dot+ putFloat64le _msgEphemerisGal_af0+ putFloat64le _msgEphemerisGal_af1+ putFloat32le _msgEphemerisGal_af2+ put _msgEphemerisGal_toc+ putWord16le _msgEphemerisGal_iode+ putWord16le _msgEphemerisGal_iodc++$(makeSBP 'msgEphemerisGal ''MsgEphemerisGal)+$(makeJSON "_msgEphemerisGal_" ''MsgEphemerisGal)+$(makeLenses ''MsgEphemerisGal)+ msgEphemerisSbasDepA :: Word16 msgEphemerisSbasDepA = 0x0082 @@ -634,21 +1031,65 @@ $(makeJSON "_msgEphemerisGloDepA_" ''MsgEphemerisGloDepA) $(makeLenses ''MsgEphemerisGloDepA) +msgEphemerisSbasDepB :: Word16+msgEphemerisSbasDepB = 0x0084++-- | SBP class for message MSG_EPHEMERIS_SBAS_DEP_B (0x0084).+--+-- This observation message has been deprecated in favor of ephemeris message+-- using floats for size reduction.+data MsgEphemerisSbasDepB = MsgEphemerisSbasDepB+ { _msgEphemerisSbasDepB_common :: !EphemerisCommonContentDepB+ -- ^ Values common for all ephemeris types+ , _msgEphemerisSbasDepB_pos :: ![Double]+ -- ^ Position of the GEO at time toe+ , _msgEphemerisSbasDepB_vel :: ![Double]+ -- ^ Velocity of the GEO at time toe+ , _msgEphemerisSbasDepB_acc :: ![Double]+ -- ^ Acceleration of the GEO at time toe+ , _msgEphemerisSbasDepB_a_gf0 :: !Double+ -- ^ Time offset of the GEO clock w.r.t. SBAS Network Time+ , _msgEphemerisSbasDepB_a_gf1 :: !Double+ -- ^ Drift of the GEO clock w.r.t. SBAS Network Time+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisSbasDepB where+ get = do+ _msgEphemerisSbasDepB_common <- get+ _msgEphemerisSbasDepB_pos <- replicateM 3 getFloat64le+ _msgEphemerisSbasDepB_vel <- replicateM 3 getFloat64le+ _msgEphemerisSbasDepB_acc <- replicateM 3 getFloat64le+ _msgEphemerisSbasDepB_a_gf0 <- getFloat64le+ _msgEphemerisSbasDepB_a_gf1 <- getFloat64le+ pure MsgEphemerisSbasDepB {..}++ put MsgEphemerisSbasDepB {..} = do+ put _msgEphemerisSbasDepB_common+ mapM_ putFloat64le _msgEphemerisSbasDepB_pos+ mapM_ putFloat64le _msgEphemerisSbasDepB_vel+ mapM_ putFloat64le _msgEphemerisSbasDepB_acc+ putFloat64le _msgEphemerisSbasDepB_a_gf0+ putFloat64le _msgEphemerisSbasDepB_a_gf1++$(makeSBP 'msgEphemerisSbasDepB ''MsgEphemerisSbasDepB)+$(makeJSON "_msgEphemerisSbasDepB_" ''MsgEphemerisSbasDepB)+$(makeLenses ''MsgEphemerisSbasDepB)+ msgEphemerisSbas :: Word16-msgEphemerisSbas = 0x0084+msgEphemerisSbas = 0x008C data MsgEphemerisSbas = MsgEphemerisSbas { _msgEphemerisSbas_common :: !EphemerisCommonContent -- ^ Values common for all ephemeris types , _msgEphemerisSbas_pos :: ![Double] -- ^ Position of the GEO at time toe- , _msgEphemerisSbas_vel :: ![Double]+ , _msgEphemerisSbas_vel :: ![Float] -- ^ Velocity of the GEO at time toe- , _msgEphemerisSbas_acc :: ![Double]+ , _msgEphemerisSbas_acc :: ![Float] -- ^ Acceleration of the GEO at time toe- , _msgEphemerisSbas_a_gf0 :: !Double+ , _msgEphemerisSbas_a_gf0 :: !Float -- ^ Time offset of the GEO clock w.r.t. SBAS Network Time- , _msgEphemerisSbas_a_gf1 :: !Double+ , _msgEphemerisSbas_a_gf1 :: !Float -- ^ Drift of the GEO clock w.r.t. SBAS Network Time } deriving ( Show, Read, Eq ) @@ -656,19 +1097,19 @@ get = do _msgEphemerisSbas_common <- get _msgEphemerisSbas_pos <- replicateM 3 getFloat64le- _msgEphemerisSbas_vel <- replicateM 3 getFloat64le- _msgEphemerisSbas_acc <- replicateM 3 getFloat64le- _msgEphemerisSbas_a_gf0 <- getFloat64le- _msgEphemerisSbas_a_gf1 <- getFloat64le+ _msgEphemerisSbas_vel <- replicateM 3 getFloat32le+ _msgEphemerisSbas_acc <- replicateM 3 getFloat32le+ _msgEphemerisSbas_a_gf0 <- getFloat32le+ _msgEphemerisSbas_a_gf1 <- getFloat32le pure MsgEphemerisSbas {..} put MsgEphemerisSbas {..} = do put _msgEphemerisSbas_common mapM_ putFloat64le _msgEphemerisSbas_pos- mapM_ putFloat64le _msgEphemerisSbas_vel- mapM_ putFloat64le _msgEphemerisSbas_acc- putFloat64le _msgEphemerisSbas_a_gf0- putFloat64le _msgEphemerisSbas_a_gf1+ mapM_ putFloat32le _msgEphemerisSbas_vel+ mapM_ putFloat32le _msgEphemerisSbas_acc+ putFloat32le _msgEphemerisSbas_a_gf0+ putFloat32le _msgEphemerisSbas_a_gf1 $(makeSBP 'msgEphemerisSbas ''MsgEphemerisSbas) $(makeJSON "_msgEphemerisSbas_" ''MsgEphemerisSbas)@@ -684,7 +1125,7 @@ -- see the GLO ICD 5.1 "Table 4.5 Characteristics of words of immediate -- information (ephemeris parameters)" for more details. data MsgEphemerisGloDepB = MsgEphemerisGloDepB- { _msgEphemerisGloDepB_common :: !EphemerisCommonContent+ { _msgEphemerisGloDepB_common :: !EphemerisCommonContentDepB -- ^ Values common for all ephemeris types , _msgEphemerisGloDepB_gamma :: !Double -- ^ Relative deviation of predicted carrier frequency from nominal@@ -730,7 +1171,7 @@ -- see the GLO ICD 5.1 "Table 4.5 Characteristics of words of immediate -- information (ephemeris parameters)" for more details. data MsgEphemerisGloDepC = MsgEphemerisGloDepC- { _msgEphemerisGloDepC_common :: !EphemerisCommonContent+ { _msgEphemerisGloDepC_common :: !EphemerisCommonContentDepB -- ^ Values common for all ephemeris types , _msgEphemerisGloDepC_gamma :: !Double -- ^ Relative deviation of predicted carrier frequency from nominal@@ -774,10 +1215,66 @@ $(makeJSON "_msgEphemerisGloDepC_" ''MsgEphemerisGloDepC) $(makeLenses ''MsgEphemerisGloDepC) +msgEphemerisGloDepD :: Word16+msgEphemerisGloDepD = 0x0088++-- | SBP class for message MSG_EPHEMERIS_GLO_DEP_D (0x0088).+--+-- This observation message has been deprecated in favor of ephemeris message+-- using floats for size reduction.+data MsgEphemerisGloDepD = MsgEphemerisGloDepD+ { _msgEphemerisGloDepD_common :: !EphemerisCommonContentDepB+ -- ^ Values common for all ephemeris types+ , _msgEphemerisGloDepD_gamma :: !Double+ -- ^ Relative deviation of predicted carrier frequency from nominal+ , _msgEphemerisGloDepD_tau :: !Double+ -- ^ Correction to the SV time+ , _msgEphemerisGloDepD_d_tau :: !Double+ -- ^ Equipment delay between L1 and L2+ , _msgEphemerisGloDepD_pos :: ![Double]+ -- ^ Position of the SV at tb in PZ-90.02 coordinates system+ , _msgEphemerisGloDepD_vel :: ![Double]+ -- ^ Velocity vector of the SV at tb in PZ-90.02 coordinates system+ , _msgEphemerisGloDepD_acc :: ![Double]+ -- ^ Acceleration vector of the SV at tb in PZ-90.02 coordinates sys+ , _msgEphemerisGloDepD_fcn :: !Word8+ -- ^ Frequency slot. FCN+8 (that is [1..14]). 0 or 0xFF for invalid+ , _msgEphemerisGloDepD_iod :: !Word8+ -- ^ Issue of ephemeris data+ } deriving ( Show, Read, Eq )++instance Binary MsgEphemerisGloDepD where+ get = do+ _msgEphemerisGloDepD_common <- get+ _msgEphemerisGloDepD_gamma <- getFloat64le+ _msgEphemerisGloDepD_tau <- getFloat64le+ _msgEphemerisGloDepD_d_tau <- getFloat64le+ _msgEphemerisGloDepD_pos <- replicateM 3 getFloat64le+ _msgEphemerisGloDepD_vel <- replicateM 3 getFloat64le+ _msgEphemerisGloDepD_acc <- replicateM 3 getFloat64le+ _msgEphemerisGloDepD_fcn <- getWord8+ _msgEphemerisGloDepD_iod <- getWord8+ pure MsgEphemerisGloDepD {..}++ put MsgEphemerisGloDepD {..} = do+ put _msgEphemerisGloDepD_common+ putFloat64le _msgEphemerisGloDepD_gamma+ putFloat64le _msgEphemerisGloDepD_tau+ putFloat64le _msgEphemerisGloDepD_d_tau+ mapM_ putFloat64le _msgEphemerisGloDepD_pos+ mapM_ putFloat64le _msgEphemerisGloDepD_vel+ mapM_ putFloat64le _msgEphemerisGloDepD_acc+ putWord8 _msgEphemerisGloDepD_fcn+ putWord8 _msgEphemerisGloDepD_iod++$(makeSBP 'msgEphemerisGloDepD ''MsgEphemerisGloDepD)+$(makeJSON "_msgEphemerisGloDepD_" ''MsgEphemerisGloDepD)+$(makeLenses ''MsgEphemerisGloDepD)+ msgEphemerisGlo :: Word16-msgEphemerisGlo = 0x0088+msgEphemerisGlo = 0x008B --- | SBP class for message MSG_EPHEMERIS_GLO (0x0088).+-- | SBP class for message MSG_EPHEMERIS_GLO (0x008B). -- -- The ephemeris message returns a set of satellite orbit parameters that is -- used to calculate GLO satellite position, velocity, and clock offset. Please@@ -786,17 +1283,17 @@ data MsgEphemerisGlo = MsgEphemerisGlo { _msgEphemerisGlo_common :: !EphemerisCommonContent -- ^ Values common for all ephemeris types- , _msgEphemerisGlo_gamma :: !Double+ , _msgEphemerisGlo_gamma :: !Float -- ^ Relative deviation of predicted carrier frequency from nominal- , _msgEphemerisGlo_tau :: !Double+ , _msgEphemerisGlo_tau :: !Float -- ^ Correction to the SV time- , _msgEphemerisGlo_d_tau :: !Double+ , _msgEphemerisGlo_d_tau :: !Float -- ^ Equipment delay between L1 and L2 , _msgEphemerisGlo_pos :: ![Double] -- ^ Position of the SV at tb in PZ-90.02 coordinates system , _msgEphemerisGlo_vel :: ![Double] -- ^ Velocity vector of the SV at tb in PZ-90.02 coordinates system- , _msgEphemerisGlo_acc :: ![Double]+ , _msgEphemerisGlo_acc :: ![Float] -- ^ Acceleration vector of the SV at tb in PZ-90.02 coordinates sys , _msgEphemerisGlo_fcn :: !Word8 -- ^ Frequency slot. FCN+8 (that is [1..14]). 0 or 0xFF for invalid@@ -807,24 +1304,24 @@ instance Binary MsgEphemerisGlo where get = do _msgEphemerisGlo_common <- get- _msgEphemerisGlo_gamma <- getFloat64le- _msgEphemerisGlo_tau <- getFloat64le- _msgEphemerisGlo_d_tau <- getFloat64le+ _msgEphemerisGlo_gamma <- getFloat32le+ _msgEphemerisGlo_tau <- getFloat32le+ _msgEphemerisGlo_d_tau <- getFloat32le _msgEphemerisGlo_pos <- replicateM 3 getFloat64le _msgEphemerisGlo_vel <- replicateM 3 getFloat64le- _msgEphemerisGlo_acc <- replicateM 3 getFloat64le+ _msgEphemerisGlo_acc <- replicateM 3 getFloat32le _msgEphemerisGlo_fcn <- getWord8 _msgEphemerisGlo_iod <- getWord8 pure MsgEphemerisGlo {..} put MsgEphemerisGlo {..} = do put _msgEphemerisGlo_common- putFloat64le _msgEphemerisGlo_gamma- putFloat64le _msgEphemerisGlo_tau- putFloat64le _msgEphemerisGlo_d_tau+ putFloat32le _msgEphemerisGlo_gamma+ putFloat32le _msgEphemerisGlo_tau+ putFloat32le _msgEphemerisGlo_d_tau mapM_ putFloat64le _msgEphemerisGlo_pos mapM_ putFloat64le _msgEphemerisGlo_vel- mapM_ putFloat64le _msgEphemerisGlo_acc+ mapM_ putFloat32le _msgEphemerisGlo_acc putWord8 _msgEphemerisGlo_fcn putWord8 _msgEphemerisGlo_iod @@ -1676,32 +2173,130 @@ $(makeJSON "_msgIono_" ''MsgIono) $(makeLenses ''MsgIono) -msgSvConfigurationGps :: Word16-msgSvConfigurationGps = 0x0091+msgSvConfigurationGpsDep :: Word16+msgSvConfigurationGpsDep = 0x0091 --- | SBP class for message MSG_SV_CONFIGURATION_GPS (0x0091).+-- | SBP class for message MSG_SV_CONFIGURATION_GPS_DEP (0x0091). -- -- Please see ICD-GPS-200 (Chapter 20.3.3.5.1.4) for more details.-data MsgSvConfigurationGps = MsgSvConfigurationGps- { _msgSvConfigurationGps_t_nmct :: !GpsTimeSec+data MsgSvConfigurationGpsDep = MsgSvConfigurationGpsDep+ { _msgSvConfigurationGpsDep_t_nmct :: !GpsTimeSec -- ^ Navigation Message Correction Table Valitidy Time- , _msgSvConfigurationGps_l2c_mask :: !Word32+ , _msgSvConfigurationGpsDep_l2c_mask :: !Word32 -- ^ L2C capability mask, SV32 bit being MSB, SV1 bit being LSB } deriving ( Show, Read, Eq ) -instance Binary MsgSvConfigurationGps where+instance Binary MsgSvConfigurationGpsDep where get = do- _msgSvConfigurationGps_t_nmct <- get- _msgSvConfigurationGps_l2c_mask <- getWord32le- pure MsgSvConfigurationGps {..}+ _msgSvConfigurationGpsDep_t_nmct <- get+ _msgSvConfigurationGpsDep_l2c_mask <- getWord32le+ pure MsgSvConfigurationGpsDep {..} - put MsgSvConfigurationGps {..} = do- put _msgSvConfigurationGps_t_nmct- putWord32le _msgSvConfigurationGps_l2c_mask+ put MsgSvConfigurationGpsDep {..} = do+ put _msgSvConfigurationGpsDep_t_nmct+ putWord32le _msgSvConfigurationGpsDep_l2c_mask -$(makeSBP 'msgSvConfigurationGps ''MsgSvConfigurationGps)-$(makeJSON "_msgSvConfigurationGps_" ''MsgSvConfigurationGps)-$(makeLenses ''MsgSvConfigurationGps)+$(makeSBP 'msgSvConfigurationGpsDep ''MsgSvConfigurationGpsDep)+$(makeJSON "_msgSvConfigurationGpsDep_" ''MsgSvConfigurationGpsDep)+$(makeLenses ''MsgSvConfigurationGpsDep)++data GnssCapb = GnssCapb+ { _gnssCapb_gps_active :: !Word64+ -- ^ GPS SV active mask+ , _gnssCapb_gps_l2c :: !Word64+ -- ^ GPS L2C active mask+ , _gnssCapb_gps_l5 :: !Word64+ -- ^ GPS L5 active mask+ , _gnssCapb_glo_active :: !Word32+ -- ^ GLO active mask+ , _gnssCapb_glo_l2of :: !Word32+ -- ^ GLO L2OF active mask+ , _gnssCapb_glo_l3 :: !Word32+ -- ^ GLO L3 active mask+ , _gnssCapb_sbas_active :: !Word64+ -- ^ SBAS active mask (PRNs 120..158, AN 7/62.2.2-18/18 Table B-23,+ -- https://www.caat.or.th/wp-content/uploads/2018/03/SL-2018.18.E-1.pdf)+ , _gnssCapb_sbas_l5 :: !Word64+ -- ^ SBAS L5 active mask (PRNs 120..158, AN 7/62.2.2-18/18 Table B-23,+ -- https://www.caat.or.th/wp-content/uploads/2018/03/SL-2018.18.E-1.pdf)+ , _gnssCapb_bds_active :: !Word64+ -- ^ BDS active mask+ , _gnssCapb_bds_d2nav :: !Word64+ -- ^ BDS D2NAV active mask+ , _gnssCapb_bds_b2 :: !Word64+ -- ^ BDS B2 active mask+ , _gnssCapb_bds_b2a :: !Word64+ -- ^ BDS B2A active mask+ , _gnssCapb_qzss_active :: !Word32+ -- ^ QZSS active mask+ , _gnssCapb_gal_active :: !Word64+ -- ^ GAL active mask+ , _gnssCapb_gal_e5 :: !Word64+ -- ^ GAL E5 active mask+ } deriving ( Show, Read, Eq )++instance Binary GnssCapb where+ get = do+ _gnssCapb_gps_active <- getWord64le+ _gnssCapb_gps_l2c <- getWord64le+ _gnssCapb_gps_l5 <- getWord64le+ _gnssCapb_glo_active <- getWord32le+ _gnssCapb_glo_l2of <- getWord32le+ _gnssCapb_glo_l3 <- getWord32le+ _gnssCapb_sbas_active <- getWord64le+ _gnssCapb_sbas_l5 <- getWord64le+ _gnssCapb_bds_active <- getWord64le+ _gnssCapb_bds_d2nav <- getWord64le+ _gnssCapb_bds_b2 <- getWord64le+ _gnssCapb_bds_b2a <- getWord64le+ _gnssCapb_qzss_active <- getWord32le+ _gnssCapb_gal_active <- getWord64le+ _gnssCapb_gal_e5 <- getWord64le+ pure GnssCapb {..}++ put GnssCapb {..} = do+ putWord64le _gnssCapb_gps_active+ putWord64le _gnssCapb_gps_l2c+ putWord64le _gnssCapb_gps_l5+ putWord32le _gnssCapb_glo_active+ putWord32le _gnssCapb_glo_l2of+ putWord32le _gnssCapb_glo_l3+ putWord64le _gnssCapb_sbas_active+ putWord64le _gnssCapb_sbas_l5+ putWord64le _gnssCapb_bds_active+ putWord64le _gnssCapb_bds_d2nav+ putWord64le _gnssCapb_bds_b2+ putWord64le _gnssCapb_bds_b2a+ putWord32le _gnssCapb_qzss_active+ putWord64le _gnssCapb_gal_active+ putWord64le _gnssCapb_gal_e5++$(makeJSON "_gnssCapb_" ''GnssCapb)+$(makeLenses ''GnssCapb)++msgGnssCapb :: Word16+msgGnssCapb = 0x0096++data MsgGnssCapb = MsgGnssCapb+ { _msgGnssCapb_t_nmct :: !GpsTimeSec+ -- ^ Navigation Message Correction Table Validity Time+ , _msgGnssCapb_gc :: !GnssCapb+ -- ^ GNSS capabilities masks+ } deriving ( Show, Read, Eq )++instance Binary MsgGnssCapb where+ get = do+ _msgGnssCapb_t_nmct <- get+ _msgGnssCapb_gc <- get+ pure MsgGnssCapb {..}++ put MsgGnssCapb {..} = do+ put _msgGnssCapb_t_nmct+ put _msgGnssCapb_gc++$(makeSBP 'msgGnssCapb ''MsgGnssCapb)+$(makeJSON "_msgGnssCapb_" ''MsgGnssCapb)+$(makeLenses ''MsgGnssCapb) msgGroupDelayDepA :: Word16 msgGroupDelayDepA = 0x0092