{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# LANGUAGE NoImplicitPrelude           #-}
{-# LANGUAGE TemplateHaskell             #-}
{-# LANGUAGE RecordWildCards             #-}

-- |
-- Module:      SwiftNav.SBP.Ssr
-- Copyright:   Copyright (C) 2015-2021 Swift Navigation, Inc.
-- License:     MIT
-- Contact:     https://support.swiftnav.com
-- Stability:   experimental
-- Portability: portable
--
-- \< Precise State Space Representation (SSR) corrections format \>

module SwiftNav.SBP.Ssr
  ( module SwiftNav.SBP.Ssr
  ) where

import BasicPrelude
import Control.Lens
import Control.Monad.Loops
import Data.Binary
import Data.Binary.Get
import Data.Binary.IEEE754
import Data.Binary.Put
import Data.ByteString.Lazy    hiding (ByteString)
import Data.Int
import Data.Word
import SwiftNav.SBP.TH
import SwiftNav.SBP.Types
import SwiftNav.SBP.Gnss

{-# ANN module ("HLint: ignore Use camelCase"::String) #-}
{-# ANN module ("HLint: ignore Redundant do"::String) #-}
{-# ANN module ("HLint: ignore Use newtype instead of data"::String) #-}


-- | CodeBiasesContent.
--
-- Code biases are to be added to pseudorange. The corrections conform with
-- RTCMv3 MT 1059 / 1065.
data CodeBiasesContent = CodeBiasesContent
  { CodeBiasesContent -> Word8
_codeBiasesContent_code :: !Word8
    -- ^ Signal encoded following RTCM specifications (DF380, DF381, DF382 and
    -- DF467).
  , CodeBiasesContent -> Int16
_codeBiasesContent_value :: !Int16
    -- ^ Code bias value
  } deriving ( Int -> CodeBiasesContent -> ShowS
[CodeBiasesContent] -> ShowS
CodeBiasesContent -> String
(Int -> CodeBiasesContent -> ShowS)
-> (CodeBiasesContent -> String)
-> ([CodeBiasesContent] -> ShowS)
-> Show CodeBiasesContent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeBiasesContent] -> ShowS
$cshowList :: [CodeBiasesContent] -> ShowS
show :: CodeBiasesContent -> String
$cshow :: CodeBiasesContent -> String
showsPrec :: Int -> CodeBiasesContent -> ShowS
$cshowsPrec :: Int -> CodeBiasesContent -> ShowS
Show, ReadPrec [CodeBiasesContent]
ReadPrec CodeBiasesContent
Int -> ReadS CodeBiasesContent
ReadS [CodeBiasesContent]
(Int -> ReadS CodeBiasesContent)
-> ReadS [CodeBiasesContent]
-> ReadPrec CodeBiasesContent
-> ReadPrec [CodeBiasesContent]
-> Read CodeBiasesContent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeBiasesContent]
$creadListPrec :: ReadPrec [CodeBiasesContent]
readPrec :: ReadPrec CodeBiasesContent
$creadPrec :: ReadPrec CodeBiasesContent
readList :: ReadS [CodeBiasesContent]
$creadList :: ReadS [CodeBiasesContent]
readsPrec :: Int -> ReadS CodeBiasesContent
$creadsPrec :: Int -> ReadS CodeBiasesContent
Read, CodeBiasesContent -> CodeBiasesContent -> Bool
(CodeBiasesContent -> CodeBiasesContent -> Bool)
-> (CodeBiasesContent -> CodeBiasesContent -> Bool)
-> Eq CodeBiasesContent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeBiasesContent -> CodeBiasesContent -> Bool
$c/= :: CodeBiasesContent -> CodeBiasesContent -> Bool
== :: CodeBiasesContent -> CodeBiasesContent -> Bool
$c== :: CodeBiasesContent -> CodeBiasesContent -> Bool
Eq )

instance Binary CodeBiasesContent where
  get :: Get CodeBiasesContent
get = do
    Word8
_codeBiasesContent_code <- Get Word8
getWord8
    Int16
_codeBiasesContent_value <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    CodeBiasesContent -> Get CodeBiasesContent
forall (f :: * -> *) a. Applicative f => a -> f a
pure CodeBiasesContent :: Word8 -> Int16 -> CodeBiasesContent
CodeBiasesContent {Int16
Word8
_codeBiasesContent_value :: Int16
_codeBiasesContent_code :: Word8
_codeBiasesContent_value :: Int16
_codeBiasesContent_code :: Word8
..}

  put :: CodeBiasesContent -> Put
put CodeBiasesContent {Int16
Word8
_codeBiasesContent_value :: Int16
_codeBiasesContent_code :: Word8
_codeBiasesContent_value :: CodeBiasesContent -> Int16
_codeBiasesContent_code :: CodeBiasesContent -> Word8
..} = do
    Word8 -> Put
putWord8 Word8
_codeBiasesContent_code
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_codeBiasesContent_value

$(makeJSON "_codeBiasesContent_" ''CodeBiasesContent)
$(makeLenses ''CodeBiasesContent)

-- | PhaseBiasesContent.
--
-- Phase biases are to be added to carrier phase measurements.
data PhaseBiasesContent = PhaseBiasesContent
  { PhaseBiasesContent -> Word8
_phaseBiasesContent_code                     :: !Word8
    -- ^ Signal encoded following RTCM specifications (DF380, DF381, DF382 and
    -- DF467)
  , PhaseBiasesContent -> Word8
_phaseBiasesContent_integer_indicator        :: !Word8
    -- ^ Indicator for integer property
  , PhaseBiasesContent -> Word8
_phaseBiasesContent_widelane_integer_indicator :: !Word8
    -- ^ Indicator for two groups of Wide-Lane(s) integer property
  , PhaseBiasesContent -> Word8
_phaseBiasesContent_discontinuity_counter    :: !Word8
    -- ^ Signal phase discontinuity counter. Increased for every discontinuity
    -- in phase.
  , PhaseBiasesContent -> Int32
_phaseBiasesContent_bias                     :: !Int32
    -- ^ Phase bias for specified signal
  } deriving ( Int -> PhaseBiasesContent -> ShowS
[PhaseBiasesContent] -> ShowS
PhaseBiasesContent -> String
(Int -> PhaseBiasesContent -> ShowS)
-> (PhaseBiasesContent -> String)
-> ([PhaseBiasesContent] -> ShowS)
-> Show PhaseBiasesContent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PhaseBiasesContent] -> ShowS
$cshowList :: [PhaseBiasesContent] -> ShowS
show :: PhaseBiasesContent -> String
$cshow :: PhaseBiasesContent -> String
showsPrec :: Int -> PhaseBiasesContent -> ShowS
$cshowsPrec :: Int -> PhaseBiasesContent -> ShowS
Show, ReadPrec [PhaseBiasesContent]
ReadPrec PhaseBiasesContent
Int -> ReadS PhaseBiasesContent
ReadS [PhaseBiasesContent]
(Int -> ReadS PhaseBiasesContent)
-> ReadS [PhaseBiasesContent]
-> ReadPrec PhaseBiasesContent
-> ReadPrec [PhaseBiasesContent]
-> Read PhaseBiasesContent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PhaseBiasesContent]
$creadListPrec :: ReadPrec [PhaseBiasesContent]
readPrec :: ReadPrec PhaseBiasesContent
$creadPrec :: ReadPrec PhaseBiasesContent
readList :: ReadS [PhaseBiasesContent]
$creadList :: ReadS [PhaseBiasesContent]
readsPrec :: Int -> ReadS PhaseBiasesContent
$creadsPrec :: Int -> ReadS PhaseBiasesContent
Read, PhaseBiasesContent -> PhaseBiasesContent -> Bool
(PhaseBiasesContent -> PhaseBiasesContent -> Bool)
-> (PhaseBiasesContent -> PhaseBiasesContent -> Bool)
-> Eq PhaseBiasesContent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhaseBiasesContent -> PhaseBiasesContent -> Bool
$c/= :: PhaseBiasesContent -> PhaseBiasesContent -> Bool
== :: PhaseBiasesContent -> PhaseBiasesContent -> Bool
$c== :: PhaseBiasesContent -> PhaseBiasesContent -> Bool
Eq )

instance Binary PhaseBiasesContent where
  get :: Get PhaseBiasesContent
get = do
    Word8
_phaseBiasesContent_code <- Get Word8
getWord8
    Word8
_phaseBiasesContent_integer_indicator <- Get Word8
getWord8
    Word8
_phaseBiasesContent_widelane_integer_indicator <- Get Word8
getWord8
    Word8
_phaseBiasesContent_discontinuity_counter <- Get Word8
getWord8
    Int32
_phaseBiasesContent_bias <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    PhaseBiasesContent -> Get PhaseBiasesContent
forall (f :: * -> *) a. Applicative f => a -> f a
pure PhaseBiasesContent :: Word8 -> Word8 -> Word8 -> Word8 -> Int32 -> PhaseBiasesContent
PhaseBiasesContent {Int32
Word8
_phaseBiasesContent_bias :: Int32
_phaseBiasesContent_discontinuity_counter :: Word8
_phaseBiasesContent_widelane_integer_indicator :: Word8
_phaseBiasesContent_integer_indicator :: Word8
_phaseBiasesContent_code :: Word8
_phaseBiasesContent_bias :: Int32
_phaseBiasesContent_discontinuity_counter :: Word8
_phaseBiasesContent_widelane_integer_indicator :: Word8
_phaseBiasesContent_integer_indicator :: Word8
_phaseBiasesContent_code :: Word8
..}

  put :: PhaseBiasesContent -> Put
put PhaseBiasesContent {Int32
Word8
_phaseBiasesContent_bias :: Int32
_phaseBiasesContent_discontinuity_counter :: Word8
_phaseBiasesContent_widelane_integer_indicator :: Word8
_phaseBiasesContent_integer_indicator :: Word8
_phaseBiasesContent_code :: Word8
_phaseBiasesContent_bias :: PhaseBiasesContent -> Int32
_phaseBiasesContent_discontinuity_counter :: PhaseBiasesContent -> Word8
_phaseBiasesContent_widelane_integer_indicator :: PhaseBiasesContent -> Word8
_phaseBiasesContent_integer_indicator :: PhaseBiasesContent -> Word8
_phaseBiasesContent_code :: PhaseBiasesContent -> Word8
..} = do
    Word8 -> Put
putWord8 Word8
_phaseBiasesContent_code
    Word8 -> Put
putWord8 Word8
_phaseBiasesContent_integer_indicator
    Word8 -> Put
putWord8 Word8
_phaseBiasesContent_widelane_integer_indicator
    Word8 -> Put
putWord8 Word8
_phaseBiasesContent_discontinuity_counter
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_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 -> Word16
_sTECHeader_tile_set_id   :: !Word16
    -- ^ Unique identifier of the tile set this tile belongs to.
  , STECHeader -> Word16
_sTECHeader_tile_id       :: !Word16
    -- ^ Unique identifier of this tile in the tile set.
  , STECHeader -> GpsTimeSec
_sTECHeader_time          :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , STECHeader -> Word8
_sTECHeader_num_msgs      :: !Word8
    -- ^ Number of messages in the dataset
  , STECHeader -> Word8
_sTECHeader_seq_num       :: !Word8
    -- ^ Position of this message in the dataset
  , STECHeader -> Word8
_sTECHeader_update_interval :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , STECHeader -> Word8
_sTECHeader_iod_atmo      :: !Word8
    -- ^ IOD of the SSR atmospheric correction
  } deriving ( Int -> STECHeader -> ShowS
[STECHeader] -> ShowS
STECHeader -> String
(Int -> STECHeader -> ShowS)
-> (STECHeader -> String)
-> ([STECHeader] -> ShowS)
-> Show STECHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [STECHeader] -> ShowS
$cshowList :: [STECHeader] -> ShowS
show :: STECHeader -> String
$cshow :: STECHeader -> String
showsPrec :: Int -> STECHeader -> ShowS
$cshowsPrec :: Int -> STECHeader -> ShowS
Show, ReadPrec [STECHeader]
ReadPrec STECHeader
Int -> ReadS STECHeader
ReadS [STECHeader]
(Int -> ReadS STECHeader)
-> ReadS [STECHeader]
-> ReadPrec STECHeader
-> ReadPrec [STECHeader]
-> Read STECHeader
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [STECHeader]
$creadListPrec :: ReadPrec [STECHeader]
readPrec :: ReadPrec STECHeader
$creadPrec :: ReadPrec STECHeader
readList :: ReadS [STECHeader]
$creadList :: ReadS [STECHeader]
readsPrec :: Int -> ReadS STECHeader
$creadsPrec :: Int -> ReadS STECHeader
Read, STECHeader -> STECHeader -> Bool
(STECHeader -> STECHeader -> Bool)
-> (STECHeader -> STECHeader -> Bool) -> Eq STECHeader
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: STECHeader -> STECHeader -> Bool
$c/= :: STECHeader -> STECHeader -> Bool
== :: STECHeader -> STECHeader -> Bool
$c== :: STECHeader -> STECHeader -> Bool
Eq )

instance Binary STECHeader where
  get :: Get STECHeader
get = do
    Word16
_sTECHeader_tile_set_id <- Get Word16
getWord16le
    Word16
_sTECHeader_tile_id <- Get Word16
getWord16le
    GpsTimeSec
_sTECHeader_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    Word8
_sTECHeader_num_msgs <- Get Word8
getWord8
    Word8
_sTECHeader_seq_num <- Get Word8
getWord8
    Word8
_sTECHeader_update_interval <- Get Word8
getWord8
    Word8
_sTECHeader_iod_atmo <- Get Word8
getWord8
    STECHeader -> Get STECHeader
forall (f :: * -> *) a. Applicative f => a -> f a
pure STECHeader :: Word16
-> Word16
-> GpsTimeSec
-> Word8
-> Word8
-> Word8
-> Word8
-> STECHeader
STECHeader {Word8
Word16
GpsTimeSec
_sTECHeader_iod_atmo :: Word8
_sTECHeader_update_interval :: Word8
_sTECHeader_seq_num :: Word8
_sTECHeader_num_msgs :: Word8
_sTECHeader_time :: GpsTimeSec
_sTECHeader_tile_id :: Word16
_sTECHeader_tile_set_id :: Word16
_sTECHeader_iod_atmo :: Word8
_sTECHeader_update_interval :: Word8
_sTECHeader_seq_num :: Word8
_sTECHeader_num_msgs :: Word8
_sTECHeader_time :: GpsTimeSec
_sTECHeader_tile_id :: Word16
_sTECHeader_tile_set_id :: Word16
..}

  put :: STECHeader -> Put
put STECHeader {Word8
Word16
GpsTimeSec
_sTECHeader_iod_atmo :: Word8
_sTECHeader_update_interval :: Word8
_sTECHeader_seq_num :: Word8
_sTECHeader_num_msgs :: Word8
_sTECHeader_time :: GpsTimeSec
_sTECHeader_tile_id :: Word16
_sTECHeader_tile_set_id :: Word16
_sTECHeader_iod_atmo :: STECHeader -> Word8
_sTECHeader_update_interval :: STECHeader -> Word8
_sTECHeader_seq_num :: STECHeader -> Word8
_sTECHeader_num_msgs :: STECHeader -> Word8
_sTECHeader_time :: STECHeader -> GpsTimeSec
_sTECHeader_tile_id :: STECHeader -> Word16
_sTECHeader_tile_set_id :: STECHeader -> Word16
..} = do
    Word16 -> Put
putWord16le Word16
_sTECHeader_tile_set_id
    Word16 -> Put
putWord16le Word16
_sTECHeader_tile_id
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_sTECHeader_time
    Word8 -> Put
putWord8 Word8
_sTECHeader_num_msgs
    Word8 -> Put
putWord8 Word8
_sTECHeader_seq_num
    Word8 -> Put
putWord8 Word8
_sTECHeader_update_interval
    Word8 -> Put
putWord8 Word8
_sTECHeader_iod_atmo

$(makeJSON "_sTECHeader_" ''STECHeader)
$(makeLenses ''STECHeader)

-- | GriddedCorrectionHeader.
--
-- The LPP message contains nested variable length arrays which are not
-- supported in SBP, so each grid point will be identified by the index.
data GriddedCorrectionHeader = GriddedCorrectionHeader
  { GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_tile_set_id           :: !Word16
    -- ^ Unique identifier of the tile set this tile belongs to.
  , GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_tile_id               :: !Word16
    -- ^ Unique identifier of this tile in the tile set.
  , GriddedCorrectionHeader -> GpsTimeSec
_griddedCorrectionHeader_time                  :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_num_msgs              :: !Word16
    -- ^ Number of messages in the dataset
  , GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_seq_num               :: !Word16
    -- ^ Position of this message in the dataset
  , GriddedCorrectionHeader -> Word8
_griddedCorrectionHeader_update_interval       :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , GriddedCorrectionHeader -> Word8
_griddedCorrectionHeader_iod_atmo              :: !Word8
    -- ^ IOD of the SSR atmospheric correction
  , GriddedCorrectionHeader -> Word8
_griddedCorrectionHeader_tropo_quality_indicator :: !Word8
    -- ^ Quality of the troposphere data. Encoded following RTCM DF389
    -- specification in units of m.
  } deriving ( Int -> GriddedCorrectionHeader -> ShowS
[GriddedCorrectionHeader] -> ShowS
GriddedCorrectionHeader -> String
(Int -> GriddedCorrectionHeader -> ShowS)
-> (GriddedCorrectionHeader -> String)
-> ([GriddedCorrectionHeader] -> ShowS)
-> Show GriddedCorrectionHeader
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GriddedCorrectionHeader] -> ShowS
$cshowList :: [GriddedCorrectionHeader] -> ShowS
show :: GriddedCorrectionHeader -> String
$cshow :: GriddedCorrectionHeader -> String
showsPrec :: Int -> GriddedCorrectionHeader -> ShowS
$cshowsPrec :: Int -> GriddedCorrectionHeader -> ShowS
Show, ReadPrec [GriddedCorrectionHeader]
ReadPrec GriddedCorrectionHeader
Int -> ReadS GriddedCorrectionHeader
ReadS [GriddedCorrectionHeader]
(Int -> ReadS GriddedCorrectionHeader)
-> ReadS [GriddedCorrectionHeader]
-> ReadPrec GriddedCorrectionHeader
-> ReadPrec [GriddedCorrectionHeader]
-> Read GriddedCorrectionHeader
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GriddedCorrectionHeader]
$creadListPrec :: ReadPrec [GriddedCorrectionHeader]
readPrec :: ReadPrec GriddedCorrectionHeader
$creadPrec :: ReadPrec GriddedCorrectionHeader
readList :: ReadS [GriddedCorrectionHeader]
$creadList :: ReadS [GriddedCorrectionHeader]
readsPrec :: Int -> ReadS GriddedCorrectionHeader
$creadsPrec :: Int -> ReadS GriddedCorrectionHeader
Read, GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool
(GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool)
-> (GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool)
-> Eq GriddedCorrectionHeader
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool
$c/= :: GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool
== :: GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool
$c== :: GriddedCorrectionHeader -> GriddedCorrectionHeader -> Bool
Eq )

instance Binary GriddedCorrectionHeader where
  get :: Get GriddedCorrectionHeader
get = do
    Word16
_griddedCorrectionHeader_tile_set_id <- Get Word16
getWord16le
    Word16
_griddedCorrectionHeader_tile_id <- Get Word16
getWord16le
    GpsTimeSec
_griddedCorrectionHeader_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    Word16
_griddedCorrectionHeader_num_msgs <- Get Word16
getWord16le
    Word16
_griddedCorrectionHeader_seq_num <- Get Word16
getWord16le
    Word8
_griddedCorrectionHeader_update_interval <- Get Word8
getWord8
    Word8
_griddedCorrectionHeader_iod_atmo <- Get Word8
getWord8
    Word8
_griddedCorrectionHeader_tropo_quality_indicator <- Get Word8
getWord8
    GriddedCorrectionHeader -> Get GriddedCorrectionHeader
forall (f :: * -> *) a. Applicative f => a -> f a
pure GriddedCorrectionHeader :: Word16
-> Word16
-> GpsTimeSec
-> Word16
-> Word16
-> Word8
-> Word8
-> Word8
-> GriddedCorrectionHeader
GriddedCorrectionHeader {Word8
Word16
GpsTimeSec
_griddedCorrectionHeader_tropo_quality_indicator :: Word8
_griddedCorrectionHeader_iod_atmo :: Word8
_griddedCorrectionHeader_update_interval :: Word8
_griddedCorrectionHeader_seq_num :: Word16
_griddedCorrectionHeader_num_msgs :: Word16
_griddedCorrectionHeader_time :: GpsTimeSec
_griddedCorrectionHeader_tile_id :: Word16
_griddedCorrectionHeader_tile_set_id :: Word16
_griddedCorrectionHeader_tropo_quality_indicator :: Word8
_griddedCorrectionHeader_iod_atmo :: Word8
_griddedCorrectionHeader_update_interval :: Word8
_griddedCorrectionHeader_seq_num :: Word16
_griddedCorrectionHeader_num_msgs :: Word16
_griddedCorrectionHeader_time :: GpsTimeSec
_griddedCorrectionHeader_tile_id :: Word16
_griddedCorrectionHeader_tile_set_id :: Word16
..}

  put :: GriddedCorrectionHeader -> Put
put GriddedCorrectionHeader {Word8
Word16
GpsTimeSec
_griddedCorrectionHeader_tropo_quality_indicator :: Word8
_griddedCorrectionHeader_iod_atmo :: Word8
_griddedCorrectionHeader_update_interval :: Word8
_griddedCorrectionHeader_seq_num :: Word16
_griddedCorrectionHeader_num_msgs :: Word16
_griddedCorrectionHeader_time :: GpsTimeSec
_griddedCorrectionHeader_tile_id :: Word16
_griddedCorrectionHeader_tile_set_id :: Word16
_griddedCorrectionHeader_tropo_quality_indicator :: GriddedCorrectionHeader -> Word8
_griddedCorrectionHeader_iod_atmo :: GriddedCorrectionHeader -> Word8
_griddedCorrectionHeader_update_interval :: GriddedCorrectionHeader -> Word8
_griddedCorrectionHeader_seq_num :: GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_num_msgs :: GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_time :: GriddedCorrectionHeader -> GpsTimeSec
_griddedCorrectionHeader_tile_id :: GriddedCorrectionHeader -> Word16
_griddedCorrectionHeader_tile_set_id :: GriddedCorrectionHeader -> Word16
..} = do
    Word16 -> Put
putWord16le Word16
_griddedCorrectionHeader_tile_set_id
    Word16 -> Put
putWord16le Word16
_griddedCorrectionHeader_tile_id
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_griddedCorrectionHeader_time
    Word16 -> Put
putWord16le Word16
_griddedCorrectionHeader_num_msgs
    Word16 -> Put
putWord16le Word16
_griddedCorrectionHeader_seq_num
    Word8 -> Put
putWord8 Word8
_griddedCorrectionHeader_update_interval
    Word8 -> Put
putWord8 Word8
_griddedCorrectionHeader_iod_atmo
    Word8 -> Put
putWord8 Word8
_griddedCorrectionHeader_tropo_quality_indicator

$(makeJSON "_griddedCorrectionHeader_" ''GriddedCorrectionHeader)
$(makeLenses ''GriddedCorrectionHeader)

-- | STECSatElement.
--
-- STEC polynomial for the given satellite.
data STECSatElement = STECSatElement
  { STECSatElement -> SvId
_sTECSatElement_sv_id                :: !SvId
    -- ^ Unique space vehicle identifier
  , STECSatElement -> Word8
_sTECSatElement_stec_quality_indicator :: !Word8
    -- ^ Quality of the STEC data. Encoded following RTCM DF389 specification
    -- but in units of TECU instead of m.
  , STECSatElement -> [Int16]
_sTECSatElement_stec_coeff           :: ![Int16]
    -- ^ Coefficients of the STEC polynomial in the order of C00, C01, C10, C11
  } deriving ( Int -> STECSatElement -> ShowS
[STECSatElement] -> ShowS
STECSatElement -> String
(Int -> STECSatElement -> ShowS)
-> (STECSatElement -> String)
-> ([STECSatElement] -> ShowS)
-> Show STECSatElement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [STECSatElement] -> ShowS
$cshowList :: [STECSatElement] -> ShowS
show :: STECSatElement -> String
$cshow :: STECSatElement -> String
showsPrec :: Int -> STECSatElement -> ShowS
$cshowsPrec :: Int -> STECSatElement -> ShowS
Show, ReadPrec [STECSatElement]
ReadPrec STECSatElement
Int -> ReadS STECSatElement
ReadS [STECSatElement]
(Int -> ReadS STECSatElement)
-> ReadS [STECSatElement]
-> ReadPrec STECSatElement
-> ReadPrec [STECSatElement]
-> Read STECSatElement
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [STECSatElement]
$creadListPrec :: ReadPrec [STECSatElement]
readPrec :: ReadPrec STECSatElement
$creadPrec :: ReadPrec STECSatElement
readList :: ReadS [STECSatElement]
$creadList :: ReadS [STECSatElement]
readsPrec :: Int -> ReadS STECSatElement
$creadsPrec :: Int -> ReadS STECSatElement
Read, STECSatElement -> STECSatElement -> Bool
(STECSatElement -> STECSatElement -> Bool)
-> (STECSatElement -> STECSatElement -> Bool) -> Eq STECSatElement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: STECSatElement -> STECSatElement -> Bool
$c/= :: STECSatElement -> STECSatElement -> Bool
== :: STECSatElement -> STECSatElement -> Bool
$c== :: STECSatElement -> STECSatElement -> Bool
Eq )

instance Binary STECSatElement where
  get :: Get STECSatElement
get = do
    SvId
_sTECSatElement_sv_id <- Get SvId
forall t. Binary t => Get t
get
    Word8
_sTECSatElement_stec_quality_indicator <- Get Word8
getWord8
    [Int16]
_sTECSatElement_stec_coeff <- Int -> Get Int16 -> Get [Int16]
forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a]
replicateM Int
4 (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    STECSatElement -> Get STECSatElement
forall (f :: * -> *) a. Applicative f => a -> f a
pure STECSatElement :: SvId -> Word8 -> [Int16] -> STECSatElement
STECSatElement {[Int16]
Word8
SvId
_sTECSatElement_stec_coeff :: [Int16]
_sTECSatElement_stec_quality_indicator :: Word8
_sTECSatElement_sv_id :: SvId
_sTECSatElement_stec_coeff :: [Int16]
_sTECSatElement_stec_quality_indicator :: Word8
_sTECSatElement_sv_id :: SvId
..}

  put :: STECSatElement -> Put
put STECSatElement {[Int16]
Word8
SvId
_sTECSatElement_stec_coeff :: [Int16]
_sTECSatElement_stec_quality_indicator :: Word8
_sTECSatElement_sv_id :: SvId
_sTECSatElement_stec_coeff :: STECSatElement -> [Int16]
_sTECSatElement_stec_quality_indicator :: STECSatElement -> Word8
_sTECSatElement_sv_id :: STECSatElement -> SvId
..} = do
    SvId -> Put
forall t. Binary t => t -> Put
put SvId
_sTECSatElement_sv_id
    Word8 -> Put
putWord8 Word8
_sTECSatElement_stec_quality_indicator
    (Int16 -> Put) -> [Int16] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) [Int16]
_sTECSatElement_stec_coeff

$(makeJSON "_sTECSatElement_" ''STECSatElement)
$(makeLenses ''STECSatElement)

-- | TroposphericDelayCorrectionNoStd.
--
-- Troposphere vertical delays at the grid point.
data TroposphericDelayCorrectionNoStd = TroposphericDelayCorrectionNoStd
  { TroposphericDelayCorrectionNoStd -> Int16
_troposphericDelayCorrectionNoStd_hydro :: !Int16
    -- ^ Hydrostatic vertical delay
  , TroposphericDelayCorrectionNoStd -> Int8
_troposphericDelayCorrectionNoStd_wet :: !Int8
    -- ^ Wet vertical delay
  } deriving ( Int -> TroposphericDelayCorrectionNoStd -> ShowS
[TroposphericDelayCorrectionNoStd] -> ShowS
TroposphericDelayCorrectionNoStd -> String
(Int -> TroposphericDelayCorrectionNoStd -> ShowS)
-> (TroposphericDelayCorrectionNoStd -> String)
-> ([TroposphericDelayCorrectionNoStd] -> ShowS)
-> Show TroposphericDelayCorrectionNoStd
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TroposphericDelayCorrectionNoStd] -> ShowS
$cshowList :: [TroposphericDelayCorrectionNoStd] -> ShowS
show :: TroposphericDelayCorrectionNoStd -> String
$cshow :: TroposphericDelayCorrectionNoStd -> String
showsPrec :: Int -> TroposphericDelayCorrectionNoStd -> ShowS
$cshowsPrec :: Int -> TroposphericDelayCorrectionNoStd -> ShowS
Show, ReadPrec [TroposphericDelayCorrectionNoStd]
ReadPrec TroposphericDelayCorrectionNoStd
Int -> ReadS TroposphericDelayCorrectionNoStd
ReadS [TroposphericDelayCorrectionNoStd]
(Int -> ReadS TroposphericDelayCorrectionNoStd)
-> ReadS [TroposphericDelayCorrectionNoStd]
-> ReadPrec TroposphericDelayCorrectionNoStd
-> ReadPrec [TroposphericDelayCorrectionNoStd]
-> Read TroposphericDelayCorrectionNoStd
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TroposphericDelayCorrectionNoStd]
$creadListPrec :: ReadPrec [TroposphericDelayCorrectionNoStd]
readPrec :: ReadPrec TroposphericDelayCorrectionNoStd
$creadPrec :: ReadPrec TroposphericDelayCorrectionNoStd
readList :: ReadS [TroposphericDelayCorrectionNoStd]
$creadList :: ReadS [TroposphericDelayCorrectionNoStd]
readsPrec :: Int -> ReadS TroposphericDelayCorrectionNoStd
$creadsPrec :: Int -> ReadS TroposphericDelayCorrectionNoStd
Read, TroposphericDelayCorrectionNoStd
-> TroposphericDelayCorrectionNoStd -> Bool
(TroposphericDelayCorrectionNoStd
 -> TroposphericDelayCorrectionNoStd -> Bool)
-> (TroposphericDelayCorrectionNoStd
    -> TroposphericDelayCorrectionNoStd -> Bool)
-> Eq TroposphericDelayCorrectionNoStd
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TroposphericDelayCorrectionNoStd
-> TroposphericDelayCorrectionNoStd -> Bool
$c/= :: TroposphericDelayCorrectionNoStd
-> TroposphericDelayCorrectionNoStd -> Bool
== :: TroposphericDelayCorrectionNoStd
-> TroposphericDelayCorrectionNoStd -> Bool
$c== :: TroposphericDelayCorrectionNoStd
-> TroposphericDelayCorrectionNoStd -> Bool
Eq )

instance Binary TroposphericDelayCorrectionNoStd where
  get :: Get TroposphericDelayCorrectionNoStd
get = do
    Int16
_troposphericDelayCorrectionNoStd_hydro <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    Int8
_troposphericDelayCorrectionNoStd_wet <- (Word8 -> Int8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word8 -> Int8) -> Get Word8 -> Get Int8
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word8
getWord8)
    TroposphericDelayCorrectionNoStd
-> Get TroposphericDelayCorrectionNoStd
forall (f :: * -> *) a. Applicative f => a -> f a
pure TroposphericDelayCorrectionNoStd :: Int16 -> Int8 -> TroposphericDelayCorrectionNoStd
TroposphericDelayCorrectionNoStd {Int8
Int16
_troposphericDelayCorrectionNoStd_wet :: Int8
_troposphericDelayCorrectionNoStd_hydro :: Int16
_troposphericDelayCorrectionNoStd_wet :: Int8
_troposphericDelayCorrectionNoStd_hydro :: Int16
..}

  put :: TroposphericDelayCorrectionNoStd -> Put
put TroposphericDelayCorrectionNoStd {Int8
Int16
_troposphericDelayCorrectionNoStd_wet :: Int8
_troposphericDelayCorrectionNoStd_hydro :: Int16
_troposphericDelayCorrectionNoStd_wet :: TroposphericDelayCorrectionNoStd -> Int8
_troposphericDelayCorrectionNoStd_hydro :: TroposphericDelayCorrectionNoStd -> Int16
..} = do
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_troposphericDelayCorrectionNoStd_hydro
    (Word8 -> Put
putWord8 (Word8 -> Put) -> (Int8 -> Word8) -> Int8 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int8 -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int8
_troposphericDelayCorrectionNoStd_wet

$(makeJSON "_troposphericDelayCorrectionNoStd_" ''TroposphericDelayCorrectionNoStd)
$(makeLenses ''TroposphericDelayCorrectionNoStd)

-- | TroposphericDelayCorrection.
--
-- Troposphere vertical delays (mean and standard deviation) at the grid
-- point.
data TroposphericDelayCorrection = TroposphericDelayCorrection
  { TroposphericDelayCorrection -> Int16
_troposphericDelayCorrection_hydro :: !Int16
    -- ^ Hydrostatic vertical delay
  , TroposphericDelayCorrection -> Int8
_troposphericDelayCorrection_wet  :: !Int8
    -- ^ Wet vertical delay
  , TroposphericDelayCorrection -> Word8
_troposphericDelayCorrection_stddev :: !Word8
    -- ^ stddev
  } deriving ( Int -> TroposphericDelayCorrection -> ShowS
[TroposphericDelayCorrection] -> ShowS
TroposphericDelayCorrection -> String
(Int -> TroposphericDelayCorrection -> ShowS)
-> (TroposphericDelayCorrection -> String)
-> ([TroposphericDelayCorrection] -> ShowS)
-> Show TroposphericDelayCorrection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TroposphericDelayCorrection] -> ShowS
$cshowList :: [TroposphericDelayCorrection] -> ShowS
show :: TroposphericDelayCorrection -> String
$cshow :: TroposphericDelayCorrection -> String
showsPrec :: Int -> TroposphericDelayCorrection -> ShowS
$cshowsPrec :: Int -> TroposphericDelayCorrection -> ShowS
Show, ReadPrec [TroposphericDelayCorrection]
ReadPrec TroposphericDelayCorrection
Int -> ReadS TroposphericDelayCorrection
ReadS [TroposphericDelayCorrection]
(Int -> ReadS TroposphericDelayCorrection)
-> ReadS [TroposphericDelayCorrection]
-> ReadPrec TroposphericDelayCorrection
-> ReadPrec [TroposphericDelayCorrection]
-> Read TroposphericDelayCorrection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TroposphericDelayCorrection]
$creadListPrec :: ReadPrec [TroposphericDelayCorrection]
readPrec :: ReadPrec TroposphericDelayCorrection
$creadPrec :: ReadPrec TroposphericDelayCorrection
readList :: ReadS [TroposphericDelayCorrection]
$creadList :: ReadS [TroposphericDelayCorrection]
readsPrec :: Int -> ReadS TroposphericDelayCorrection
$creadsPrec :: Int -> ReadS TroposphericDelayCorrection
Read, TroposphericDelayCorrection -> TroposphericDelayCorrection -> Bool
(TroposphericDelayCorrection
 -> TroposphericDelayCorrection -> Bool)
-> (TroposphericDelayCorrection
    -> TroposphericDelayCorrection -> Bool)
-> Eq TroposphericDelayCorrection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TroposphericDelayCorrection -> TroposphericDelayCorrection -> Bool
$c/= :: TroposphericDelayCorrection -> TroposphericDelayCorrection -> Bool
== :: TroposphericDelayCorrection -> TroposphericDelayCorrection -> Bool
$c== :: TroposphericDelayCorrection -> TroposphericDelayCorrection -> Bool
Eq )

instance Binary TroposphericDelayCorrection where
  get :: Get TroposphericDelayCorrection
get = do
    Int16
_troposphericDelayCorrection_hydro <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    Int8
_troposphericDelayCorrection_wet <- (Word8 -> Int8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word8 -> Int8) -> Get Word8 -> Get Int8
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word8
getWord8)
    Word8
_troposphericDelayCorrection_stddev <- Get Word8
getWord8
    TroposphericDelayCorrection -> Get TroposphericDelayCorrection
forall (f :: * -> *) a. Applicative f => a -> f a
pure TroposphericDelayCorrection :: Int16 -> Int8 -> Word8 -> TroposphericDelayCorrection
TroposphericDelayCorrection {Int8
Int16
Word8
_troposphericDelayCorrection_stddev :: Word8
_troposphericDelayCorrection_wet :: Int8
_troposphericDelayCorrection_hydro :: Int16
_troposphericDelayCorrection_stddev :: Word8
_troposphericDelayCorrection_wet :: Int8
_troposphericDelayCorrection_hydro :: Int16
..}

  put :: TroposphericDelayCorrection -> Put
put TroposphericDelayCorrection {Int8
Int16
Word8
_troposphericDelayCorrection_stddev :: Word8
_troposphericDelayCorrection_wet :: Int8
_troposphericDelayCorrection_hydro :: Int16
_troposphericDelayCorrection_stddev :: TroposphericDelayCorrection -> Word8
_troposphericDelayCorrection_wet :: TroposphericDelayCorrection -> Int8
_troposphericDelayCorrection_hydro :: TroposphericDelayCorrection -> Int16
..} = do
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_troposphericDelayCorrection_hydro
    (Word8 -> Put
putWord8 (Word8 -> Put) -> (Int8 -> Word8) -> Int8 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int8 -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int8
_troposphericDelayCorrection_wet
    Word8 -> Put
putWord8 Word8
_troposphericDelayCorrection_stddev

$(makeJSON "_troposphericDelayCorrection_" ''TroposphericDelayCorrection)
$(makeLenses ''TroposphericDelayCorrection)

-- | STECResidualNoStd.
--
-- STEC residual for the given satellite at the grid point.
data STECResidualNoStd = STECResidualNoStd
  { STECResidualNoStd -> SvId
_sTECResidualNoStd_sv_id  :: !SvId
    -- ^ space vehicle identifier
  , STECResidualNoStd -> Int16
_sTECResidualNoStd_residual :: !Int16
    -- ^ STEC residual
  } deriving ( Int -> STECResidualNoStd -> ShowS
[STECResidualNoStd] -> ShowS
STECResidualNoStd -> String
(Int -> STECResidualNoStd -> ShowS)
-> (STECResidualNoStd -> String)
-> ([STECResidualNoStd] -> ShowS)
-> Show STECResidualNoStd
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [STECResidualNoStd] -> ShowS
$cshowList :: [STECResidualNoStd] -> ShowS
show :: STECResidualNoStd -> String
$cshow :: STECResidualNoStd -> String
showsPrec :: Int -> STECResidualNoStd -> ShowS
$cshowsPrec :: Int -> STECResidualNoStd -> ShowS
Show, ReadPrec [STECResidualNoStd]
ReadPrec STECResidualNoStd
Int -> ReadS STECResidualNoStd
ReadS [STECResidualNoStd]
(Int -> ReadS STECResidualNoStd)
-> ReadS [STECResidualNoStd]
-> ReadPrec STECResidualNoStd
-> ReadPrec [STECResidualNoStd]
-> Read STECResidualNoStd
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [STECResidualNoStd]
$creadListPrec :: ReadPrec [STECResidualNoStd]
readPrec :: ReadPrec STECResidualNoStd
$creadPrec :: ReadPrec STECResidualNoStd
readList :: ReadS [STECResidualNoStd]
$creadList :: ReadS [STECResidualNoStd]
readsPrec :: Int -> ReadS STECResidualNoStd
$creadsPrec :: Int -> ReadS STECResidualNoStd
Read, STECResidualNoStd -> STECResidualNoStd -> Bool
(STECResidualNoStd -> STECResidualNoStd -> Bool)
-> (STECResidualNoStd -> STECResidualNoStd -> Bool)
-> Eq STECResidualNoStd
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: STECResidualNoStd -> STECResidualNoStd -> Bool
$c/= :: STECResidualNoStd -> STECResidualNoStd -> Bool
== :: STECResidualNoStd -> STECResidualNoStd -> Bool
$c== :: STECResidualNoStd -> STECResidualNoStd -> Bool
Eq )

instance Binary STECResidualNoStd where
  get :: Get STECResidualNoStd
get = do
    SvId
_sTECResidualNoStd_sv_id <- Get SvId
forall t. Binary t => Get t
get
    Int16
_sTECResidualNoStd_residual <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    STECResidualNoStd -> Get STECResidualNoStd
forall (f :: * -> *) a. Applicative f => a -> f a
pure STECResidualNoStd :: SvId -> Int16 -> STECResidualNoStd
STECResidualNoStd {Int16
SvId
_sTECResidualNoStd_residual :: Int16
_sTECResidualNoStd_sv_id :: SvId
_sTECResidualNoStd_residual :: Int16
_sTECResidualNoStd_sv_id :: SvId
..}

  put :: STECResidualNoStd -> Put
put STECResidualNoStd {Int16
SvId
_sTECResidualNoStd_residual :: Int16
_sTECResidualNoStd_sv_id :: SvId
_sTECResidualNoStd_residual :: STECResidualNoStd -> Int16
_sTECResidualNoStd_sv_id :: STECResidualNoStd -> SvId
..} = do
    SvId -> Put
forall t. Binary t => t -> Put
put SvId
_sTECResidualNoStd_sv_id
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_sTECResidualNoStd_residual

$(makeJSON "_sTECResidualNoStd_" ''STECResidualNoStd)
$(makeLenses ''STECResidualNoStd)

-- | STECResidual.
--
-- STEC residual (mean and standard deviation) for the given satellite at the
-- grid point.
data STECResidual = STECResidual
  { STECResidual -> SvId
_sTECResidual_sv_id  :: !SvId
    -- ^ space vehicle identifier
  , STECResidual -> Int16
_sTECResidual_residual :: !Int16
    -- ^ STEC residual
  , STECResidual -> Word8
_sTECResidual_stddev :: !Word8
    -- ^ stddev
  } deriving ( Int -> STECResidual -> ShowS
[STECResidual] -> ShowS
STECResidual -> String
(Int -> STECResidual -> ShowS)
-> (STECResidual -> String)
-> ([STECResidual] -> ShowS)
-> Show STECResidual
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [STECResidual] -> ShowS
$cshowList :: [STECResidual] -> ShowS
show :: STECResidual -> String
$cshow :: STECResidual -> String
showsPrec :: Int -> STECResidual -> ShowS
$cshowsPrec :: Int -> STECResidual -> ShowS
Show, ReadPrec [STECResidual]
ReadPrec STECResidual
Int -> ReadS STECResidual
ReadS [STECResidual]
(Int -> ReadS STECResidual)
-> ReadS [STECResidual]
-> ReadPrec STECResidual
-> ReadPrec [STECResidual]
-> Read STECResidual
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [STECResidual]
$creadListPrec :: ReadPrec [STECResidual]
readPrec :: ReadPrec STECResidual
$creadPrec :: ReadPrec STECResidual
readList :: ReadS [STECResidual]
$creadList :: ReadS [STECResidual]
readsPrec :: Int -> ReadS STECResidual
$creadsPrec :: Int -> ReadS STECResidual
Read, STECResidual -> STECResidual -> Bool
(STECResidual -> STECResidual -> Bool)
-> (STECResidual -> STECResidual -> Bool) -> Eq STECResidual
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: STECResidual -> STECResidual -> Bool
$c/= :: STECResidual -> STECResidual -> Bool
== :: STECResidual -> STECResidual -> Bool
$c== :: STECResidual -> STECResidual -> Bool
Eq )

instance Binary STECResidual where
  get :: Get STECResidual
get = do
    SvId
_sTECResidual_sv_id <- Get SvId
forall t. Binary t => Get t
get
    Int16
_sTECResidual_residual <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    Word8
_sTECResidual_stddev <- Get Word8
getWord8
    STECResidual -> Get STECResidual
forall (f :: * -> *) a. Applicative f => a -> f a
pure STECResidual :: SvId -> Int16 -> Word8 -> STECResidual
STECResidual {Int16
Word8
SvId
_sTECResidual_stddev :: Word8
_sTECResidual_residual :: Int16
_sTECResidual_sv_id :: SvId
_sTECResidual_stddev :: Word8
_sTECResidual_residual :: Int16
_sTECResidual_sv_id :: SvId
..}

  put :: STECResidual -> Put
put STECResidual {Int16
Word8
SvId
_sTECResidual_stddev :: Word8
_sTECResidual_residual :: Int16
_sTECResidual_sv_id :: SvId
_sTECResidual_stddev :: STECResidual -> Word8
_sTECResidual_residual :: STECResidual -> Int16
_sTECResidual_sv_id :: STECResidual -> SvId
..} = do
    SvId -> Put
forall t. Binary t => t -> Put
put SvId
_sTECResidual_sv_id
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_sTECResidual_residual
    Word8 -> Put
putWord8 Word8
_sTECResidual_stddev

$(makeJSON "_sTECResidual_" ''STECResidual)
$(makeLenses ''STECResidual)

msgSsrOrbitClock :: Word16
msgSsrOrbitClock :: Word16
msgSsrOrbitClock = Word16
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 an equivalent to the 1060 /1066
-- RTCM message types.
data MsgSsrOrbitClock = MsgSsrOrbitClock
  { MsgSsrOrbitClock -> GpsTimeSec
_msgSsrOrbitClock_time          :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , MsgSsrOrbitClock -> GnssSignal
_msgSsrOrbitClock_sid           :: !GnssSignal
    -- ^ GNSS signal identifier (16 bit)
  , MsgSsrOrbitClock -> Word8
_msgSsrOrbitClock_update_interval :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , MsgSsrOrbitClock -> Word8
_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
  , MsgSsrOrbitClock -> Word32
_msgSsrOrbitClock_iod           :: !Word32
    -- ^ Issue of broadcast ephemeris data or IODCRC (Beidou)
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_radial        :: !Int32
    -- ^ Orbit radial delta correction
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_along         :: !Int32
    -- ^ Orbit along delta correction
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_cross         :: !Int32
    -- ^ Orbit along delta correction
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_dot_radial    :: !Int32
    -- ^ Velocity of orbit radial delta correction
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_dot_along     :: !Int32
    -- ^ Velocity of orbit along delta correction
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_dot_cross     :: !Int32
    -- ^ Velocity of orbit cross delta correction
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_c0            :: !Int32
    -- ^ C0 polynomial coefficient for correction of broadcast satellite clock
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_c1            :: !Int32
    -- ^ C1 polynomial coefficient for correction of broadcast satellite clock
  , MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_c2            :: !Int32
    -- ^ C2 polynomial coefficient for correction of broadcast satellite clock
  } deriving ( Int -> MsgSsrOrbitClock -> ShowS
[MsgSsrOrbitClock] -> ShowS
MsgSsrOrbitClock -> String
(Int -> MsgSsrOrbitClock -> ShowS)
-> (MsgSsrOrbitClock -> String)
-> ([MsgSsrOrbitClock] -> ShowS)
-> Show MsgSsrOrbitClock
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrOrbitClock] -> ShowS
$cshowList :: [MsgSsrOrbitClock] -> ShowS
show :: MsgSsrOrbitClock -> String
$cshow :: MsgSsrOrbitClock -> String
showsPrec :: Int -> MsgSsrOrbitClock -> ShowS
$cshowsPrec :: Int -> MsgSsrOrbitClock -> ShowS
Show, ReadPrec [MsgSsrOrbitClock]
ReadPrec MsgSsrOrbitClock
Int -> ReadS MsgSsrOrbitClock
ReadS [MsgSsrOrbitClock]
(Int -> ReadS MsgSsrOrbitClock)
-> ReadS [MsgSsrOrbitClock]
-> ReadPrec MsgSsrOrbitClock
-> ReadPrec [MsgSsrOrbitClock]
-> Read MsgSsrOrbitClock
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrOrbitClock]
$creadListPrec :: ReadPrec [MsgSsrOrbitClock]
readPrec :: ReadPrec MsgSsrOrbitClock
$creadPrec :: ReadPrec MsgSsrOrbitClock
readList :: ReadS [MsgSsrOrbitClock]
$creadList :: ReadS [MsgSsrOrbitClock]
readsPrec :: Int -> ReadS MsgSsrOrbitClock
$creadsPrec :: Int -> ReadS MsgSsrOrbitClock
Read, MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool
(MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool)
-> (MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool)
-> Eq MsgSsrOrbitClock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool
$c/= :: MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool
== :: MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool
$c== :: MsgSsrOrbitClock -> MsgSsrOrbitClock -> Bool
Eq )

instance Binary MsgSsrOrbitClock where
  get :: Get MsgSsrOrbitClock
get = do
    GpsTimeSec
_msgSsrOrbitClock_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    GnssSignal
_msgSsrOrbitClock_sid <- Get GnssSignal
forall t. Binary t => Get t
get
    Word8
_msgSsrOrbitClock_update_interval <- Get Word8
getWord8
    Word8
_msgSsrOrbitClock_iod_ssr <- Get Word8
getWord8
    Word32
_msgSsrOrbitClock_iod <- Get Word32
getWord32le
    Int32
_msgSsrOrbitClock_radial <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_along <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_cross <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_dot_radial <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_dot_along <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_dot_cross <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_c0 <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_c1 <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClock_c2 <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    MsgSsrOrbitClock -> Get MsgSsrOrbitClock
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrOrbitClock :: GpsTimeSec
-> GnssSignal
-> Word8
-> Word8
-> Word32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> MsgSsrOrbitClock
MsgSsrOrbitClock {Int32
Word8
Word32
GnssSignal
GpsTimeSec
_msgSsrOrbitClock_c2 :: Int32
_msgSsrOrbitClock_c1 :: Int32
_msgSsrOrbitClock_c0 :: Int32
_msgSsrOrbitClock_dot_cross :: Int32
_msgSsrOrbitClock_dot_along :: Int32
_msgSsrOrbitClock_dot_radial :: Int32
_msgSsrOrbitClock_cross :: Int32
_msgSsrOrbitClock_along :: Int32
_msgSsrOrbitClock_radial :: Int32
_msgSsrOrbitClock_iod :: Word32
_msgSsrOrbitClock_iod_ssr :: Word8
_msgSsrOrbitClock_update_interval :: Word8
_msgSsrOrbitClock_sid :: GnssSignal
_msgSsrOrbitClock_time :: GpsTimeSec
_msgSsrOrbitClock_c2 :: Int32
_msgSsrOrbitClock_c1 :: Int32
_msgSsrOrbitClock_c0 :: Int32
_msgSsrOrbitClock_dot_cross :: Int32
_msgSsrOrbitClock_dot_along :: Int32
_msgSsrOrbitClock_dot_radial :: Int32
_msgSsrOrbitClock_cross :: Int32
_msgSsrOrbitClock_along :: Int32
_msgSsrOrbitClock_radial :: Int32
_msgSsrOrbitClock_iod :: Word32
_msgSsrOrbitClock_iod_ssr :: Word8
_msgSsrOrbitClock_update_interval :: Word8
_msgSsrOrbitClock_sid :: GnssSignal
_msgSsrOrbitClock_time :: GpsTimeSec
..}

  put :: MsgSsrOrbitClock -> Put
put MsgSsrOrbitClock {Int32
Word8
Word32
GnssSignal
GpsTimeSec
_msgSsrOrbitClock_c2 :: Int32
_msgSsrOrbitClock_c1 :: Int32
_msgSsrOrbitClock_c0 :: Int32
_msgSsrOrbitClock_dot_cross :: Int32
_msgSsrOrbitClock_dot_along :: Int32
_msgSsrOrbitClock_dot_radial :: Int32
_msgSsrOrbitClock_cross :: Int32
_msgSsrOrbitClock_along :: Int32
_msgSsrOrbitClock_radial :: Int32
_msgSsrOrbitClock_iod :: Word32
_msgSsrOrbitClock_iod_ssr :: Word8
_msgSsrOrbitClock_update_interval :: Word8
_msgSsrOrbitClock_sid :: GnssSignal
_msgSsrOrbitClock_time :: GpsTimeSec
_msgSsrOrbitClock_c2 :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_c1 :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_c0 :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_dot_cross :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_dot_along :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_dot_radial :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_cross :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_along :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_radial :: MsgSsrOrbitClock -> Int32
_msgSsrOrbitClock_iod :: MsgSsrOrbitClock -> Word32
_msgSsrOrbitClock_iod_ssr :: MsgSsrOrbitClock -> Word8
_msgSsrOrbitClock_update_interval :: MsgSsrOrbitClock -> Word8
_msgSsrOrbitClock_sid :: MsgSsrOrbitClock -> GnssSignal
_msgSsrOrbitClock_time :: MsgSsrOrbitClock -> GpsTimeSec
..} = do
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_msgSsrOrbitClock_time
    GnssSignal -> Put
forall t. Binary t => t -> Put
put GnssSignal
_msgSsrOrbitClock_sid
    Word8 -> Put
putWord8 Word8
_msgSsrOrbitClock_update_interval
    Word8 -> Put
putWord8 Word8
_msgSsrOrbitClock_iod_ssr
    Word32 -> Put
putWord32le Word32
_msgSsrOrbitClock_iod
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_radial
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_along
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_cross
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_dot_radial
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_dot_along
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_dot_cross
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_c0
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_c1
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClock_c2

$(makeSBP 'msgSsrOrbitClock ''MsgSsrOrbitClock)
$(makeJSON "_msgSsrOrbitClock_" ''MsgSsrOrbitClock)
$(makeLenses ''MsgSsrOrbitClock)

msgSsrCodeBiases :: Word16
msgSsrCodeBiases :: Word16
msgSsrCodeBiases = Word16
0x05E1

-- | 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 an equivalent to
-- the 1059 / 1065 RTCM message types.
data MsgSsrCodeBiases = MsgSsrCodeBiases
  { MsgSsrCodeBiases -> GpsTimeSec
_msgSsrCodeBiases_time          :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , MsgSsrCodeBiases -> GnssSignal
_msgSsrCodeBiases_sid           :: !GnssSignal
    -- ^ GNSS signal identifier (16 bit)
  , MsgSsrCodeBiases -> Word8
_msgSsrCodeBiases_update_interval :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , MsgSsrCodeBiases -> Word8
_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
  , MsgSsrCodeBiases -> [CodeBiasesContent]
_msgSsrCodeBiases_biases        :: ![CodeBiasesContent]
    -- ^ Code biases for the different satellite signals
  } deriving ( Int -> MsgSsrCodeBiases -> ShowS
[MsgSsrCodeBiases] -> ShowS
MsgSsrCodeBiases -> String
(Int -> MsgSsrCodeBiases -> ShowS)
-> (MsgSsrCodeBiases -> String)
-> ([MsgSsrCodeBiases] -> ShowS)
-> Show MsgSsrCodeBiases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrCodeBiases] -> ShowS
$cshowList :: [MsgSsrCodeBiases] -> ShowS
show :: MsgSsrCodeBiases -> String
$cshow :: MsgSsrCodeBiases -> String
showsPrec :: Int -> MsgSsrCodeBiases -> ShowS
$cshowsPrec :: Int -> MsgSsrCodeBiases -> ShowS
Show, ReadPrec [MsgSsrCodeBiases]
ReadPrec MsgSsrCodeBiases
Int -> ReadS MsgSsrCodeBiases
ReadS [MsgSsrCodeBiases]
(Int -> ReadS MsgSsrCodeBiases)
-> ReadS [MsgSsrCodeBiases]
-> ReadPrec MsgSsrCodeBiases
-> ReadPrec [MsgSsrCodeBiases]
-> Read MsgSsrCodeBiases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrCodeBiases]
$creadListPrec :: ReadPrec [MsgSsrCodeBiases]
readPrec :: ReadPrec MsgSsrCodeBiases
$creadPrec :: ReadPrec MsgSsrCodeBiases
readList :: ReadS [MsgSsrCodeBiases]
$creadList :: ReadS [MsgSsrCodeBiases]
readsPrec :: Int -> ReadS MsgSsrCodeBiases
$creadsPrec :: Int -> ReadS MsgSsrCodeBiases
Read, MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool
(MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool)
-> (MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool)
-> Eq MsgSsrCodeBiases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool
$c/= :: MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool
== :: MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool
$c== :: MsgSsrCodeBiases -> MsgSsrCodeBiases -> Bool
Eq )

instance Binary MsgSsrCodeBiases where
  get :: Get MsgSsrCodeBiases
get = do
    GpsTimeSec
_msgSsrCodeBiases_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    GnssSignal
_msgSsrCodeBiases_sid <- Get GnssSignal
forall t. Binary t => Get t
get
    Word8
_msgSsrCodeBiases_update_interval <- Get Word8
getWord8
    Word8
_msgSsrCodeBiases_iod_ssr <- Get Word8
getWord8
    [CodeBiasesContent]
_msgSsrCodeBiases_biases <- Get Bool -> Get CodeBiasesContent -> Get [CodeBiasesContent]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get CodeBiasesContent
forall t. Binary t => Get t
get
    MsgSsrCodeBiases -> Get MsgSsrCodeBiases
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrCodeBiases :: GpsTimeSec
-> GnssSignal
-> Word8
-> Word8
-> [CodeBiasesContent]
-> MsgSsrCodeBiases
MsgSsrCodeBiases {[CodeBiasesContent]
Word8
GnssSignal
GpsTimeSec
_msgSsrCodeBiases_biases :: [CodeBiasesContent]
_msgSsrCodeBiases_iod_ssr :: Word8
_msgSsrCodeBiases_update_interval :: Word8
_msgSsrCodeBiases_sid :: GnssSignal
_msgSsrCodeBiases_time :: GpsTimeSec
_msgSsrCodeBiases_biases :: [CodeBiasesContent]
_msgSsrCodeBiases_iod_ssr :: Word8
_msgSsrCodeBiases_update_interval :: Word8
_msgSsrCodeBiases_sid :: GnssSignal
_msgSsrCodeBiases_time :: GpsTimeSec
..}

  put :: MsgSsrCodeBiases -> Put
put MsgSsrCodeBiases {[CodeBiasesContent]
Word8
GnssSignal
GpsTimeSec
_msgSsrCodeBiases_biases :: [CodeBiasesContent]
_msgSsrCodeBiases_iod_ssr :: Word8
_msgSsrCodeBiases_update_interval :: Word8
_msgSsrCodeBiases_sid :: GnssSignal
_msgSsrCodeBiases_time :: GpsTimeSec
_msgSsrCodeBiases_biases :: MsgSsrCodeBiases -> [CodeBiasesContent]
_msgSsrCodeBiases_iod_ssr :: MsgSsrCodeBiases -> Word8
_msgSsrCodeBiases_update_interval :: MsgSsrCodeBiases -> Word8
_msgSsrCodeBiases_sid :: MsgSsrCodeBiases -> GnssSignal
_msgSsrCodeBiases_time :: MsgSsrCodeBiases -> GpsTimeSec
..} = do
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_msgSsrCodeBiases_time
    GnssSignal -> Put
forall t. Binary t => t -> Put
put GnssSignal
_msgSsrCodeBiases_sid
    Word8 -> Put
putWord8 Word8
_msgSsrCodeBiases_update_interval
    Word8 -> Put
putWord8 Word8
_msgSsrCodeBiases_iod_ssr
    (CodeBiasesContent -> Put) -> [CodeBiasesContent] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ CodeBiasesContent -> Put
forall t. Binary t => t -> Put
put [CodeBiasesContent]
_msgSsrCodeBiases_biases

$(makeSBP 'msgSsrCodeBiases ''MsgSsrCodeBiases)
$(makeJSON "_msgSsrCodeBiases_" ''MsgSsrCodeBiases)
$(makeLenses ''MsgSsrCodeBiases)

msgSsrPhaseBiases :: Word16
msgSsrPhaseBiases :: Word16
msgSsrPhaseBiases = Word16
0x05E6

-- | SBP class for message MSG_SSR_PHASE_BIASES (0x05E6).
--
-- 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.
data MsgSsrPhaseBiases = MsgSsrPhaseBiases
  { MsgSsrPhaseBiases -> GpsTimeSec
_msgSsrPhaseBiases_time          :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , MsgSsrPhaseBiases -> GnssSignal
_msgSsrPhaseBiases_sid           :: !GnssSignal
    -- ^ GNSS signal identifier (16 bit)
  , MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_update_interval :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , MsgSsrPhaseBiases -> Word8
_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
  , MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_dispersive_bias :: !Word8
    -- ^ Indicator for the dispersive phase biases property.
  , MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_mw_consistency :: !Word8
    -- ^ Consistency indicator for Melbourne-Wubbena linear combinations
  , MsgSsrPhaseBiases -> Word16
_msgSsrPhaseBiases_yaw           :: !Word16
    -- ^ Satellite yaw angle
  , MsgSsrPhaseBiases -> Int8
_msgSsrPhaseBiases_yaw_rate      :: !Int8
    -- ^ Satellite yaw angle rate
  , MsgSsrPhaseBiases -> [PhaseBiasesContent]
_msgSsrPhaseBiases_biases        :: ![PhaseBiasesContent]
    -- ^ Phase biases corrections for a satellite being tracked.
  } deriving ( Int -> MsgSsrPhaseBiases -> ShowS
[MsgSsrPhaseBiases] -> ShowS
MsgSsrPhaseBiases -> String
(Int -> MsgSsrPhaseBiases -> ShowS)
-> (MsgSsrPhaseBiases -> String)
-> ([MsgSsrPhaseBiases] -> ShowS)
-> Show MsgSsrPhaseBiases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrPhaseBiases] -> ShowS
$cshowList :: [MsgSsrPhaseBiases] -> ShowS
show :: MsgSsrPhaseBiases -> String
$cshow :: MsgSsrPhaseBiases -> String
showsPrec :: Int -> MsgSsrPhaseBiases -> ShowS
$cshowsPrec :: Int -> MsgSsrPhaseBiases -> ShowS
Show, ReadPrec [MsgSsrPhaseBiases]
ReadPrec MsgSsrPhaseBiases
Int -> ReadS MsgSsrPhaseBiases
ReadS [MsgSsrPhaseBiases]
(Int -> ReadS MsgSsrPhaseBiases)
-> ReadS [MsgSsrPhaseBiases]
-> ReadPrec MsgSsrPhaseBiases
-> ReadPrec [MsgSsrPhaseBiases]
-> Read MsgSsrPhaseBiases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrPhaseBiases]
$creadListPrec :: ReadPrec [MsgSsrPhaseBiases]
readPrec :: ReadPrec MsgSsrPhaseBiases
$creadPrec :: ReadPrec MsgSsrPhaseBiases
readList :: ReadS [MsgSsrPhaseBiases]
$creadList :: ReadS [MsgSsrPhaseBiases]
readsPrec :: Int -> ReadS MsgSsrPhaseBiases
$creadsPrec :: Int -> ReadS MsgSsrPhaseBiases
Read, MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool
(MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool)
-> (MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool)
-> Eq MsgSsrPhaseBiases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool
$c/= :: MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool
== :: MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool
$c== :: MsgSsrPhaseBiases -> MsgSsrPhaseBiases -> Bool
Eq )

instance Binary MsgSsrPhaseBiases where
  get :: Get MsgSsrPhaseBiases
get = do
    GpsTimeSec
_msgSsrPhaseBiases_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    GnssSignal
_msgSsrPhaseBiases_sid <- Get GnssSignal
forall t. Binary t => Get t
get
    Word8
_msgSsrPhaseBiases_update_interval <- Get Word8
getWord8
    Word8
_msgSsrPhaseBiases_iod_ssr <- Get Word8
getWord8
    Word8
_msgSsrPhaseBiases_dispersive_bias <- Get Word8
getWord8
    Word8
_msgSsrPhaseBiases_mw_consistency <- Get Word8
getWord8
    Word16
_msgSsrPhaseBiases_yaw <- Get Word16
getWord16le
    Int8
_msgSsrPhaseBiases_yaw_rate <- (Word8 -> Int8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word8 -> Int8) -> Get Word8 -> Get Int8
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word8
getWord8)
    [PhaseBiasesContent]
_msgSsrPhaseBiases_biases <- Get Bool -> Get PhaseBiasesContent -> Get [PhaseBiasesContent]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get PhaseBiasesContent
forall t. Binary t => Get t
get
    MsgSsrPhaseBiases -> Get MsgSsrPhaseBiases
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrPhaseBiases :: GpsTimeSec
-> GnssSignal
-> Word8
-> Word8
-> Word8
-> Word8
-> Word16
-> Int8
-> [PhaseBiasesContent]
-> MsgSsrPhaseBiases
MsgSsrPhaseBiases {Int8
[PhaseBiasesContent]
Word8
Word16
GnssSignal
GpsTimeSec
_msgSsrPhaseBiases_biases :: [PhaseBiasesContent]
_msgSsrPhaseBiases_yaw_rate :: Int8
_msgSsrPhaseBiases_yaw :: Word16
_msgSsrPhaseBiases_mw_consistency :: Word8
_msgSsrPhaseBiases_dispersive_bias :: Word8
_msgSsrPhaseBiases_iod_ssr :: Word8
_msgSsrPhaseBiases_update_interval :: Word8
_msgSsrPhaseBiases_sid :: GnssSignal
_msgSsrPhaseBiases_time :: GpsTimeSec
_msgSsrPhaseBiases_biases :: [PhaseBiasesContent]
_msgSsrPhaseBiases_yaw_rate :: Int8
_msgSsrPhaseBiases_yaw :: Word16
_msgSsrPhaseBiases_mw_consistency :: Word8
_msgSsrPhaseBiases_dispersive_bias :: Word8
_msgSsrPhaseBiases_iod_ssr :: Word8
_msgSsrPhaseBiases_update_interval :: Word8
_msgSsrPhaseBiases_sid :: GnssSignal
_msgSsrPhaseBiases_time :: GpsTimeSec
..}

  put :: MsgSsrPhaseBiases -> Put
put MsgSsrPhaseBiases {Int8
[PhaseBiasesContent]
Word8
Word16
GnssSignal
GpsTimeSec
_msgSsrPhaseBiases_biases :: [PhaseBiasesContent]
_msgSsrPhaseBiases_yaw_rate :: Int8
_msgSsrPhaseBiases_yaw :: Word16
_msgSsrPhaseBiases_mw_consistency :: Word8
_msgSsrPhaseBiases_dispersive_bias :: Word8
_msgSsrPhaseBiases_iod_ssr :: Word8
_msgSsrPhaseBiases_update_interval :: Word8
_msgSsrPhaseBiases_sid :: GnssSignal
_msgSsrPhaseBiases_time :: GpsTimeSec
_msgSsrPhaseBiases_biases :: MsgSsrPhaseBiases -> [PhaseBiasesContent]
_msgSsrPhaseBiases_yaw_rate :: MsgSsrPhaseBiases -> Int8
_msgSsrPhaseBiases_yaw :: MsgSsrPhaseBiases -> Word16
_msgSsrPhaseBiases_mw_consistency :: MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_dispersive_bias :: MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_iod_ssr :: MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_update_interval :: MsgSsrPhaseBiases -> Word8
_msgSsrPhaseBiases_sid :: MsgSsrPhaseBiases -> GnssSignal
_msgSsrPhaseBiases_time :: MsgSsrPhaseBiases -> GpsTimeSec
..} = do
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_msgSsrPhaseBiases_time
    GnssSignal -> Put
forall t. Binary t => t -> Put
put GnssSignal
_msgSsrPhaseBiases_sid
    Word8 -> Put
putWord8 Word8
_msgSsrPhaseBiases_update_interval
    Word8 -> Put
putWord8 Word8
_msgSsrPhaseBiases_iod_ssr
    Word8 -> Put
putWord8 Word8
_msgSsrPhaseBiases_dispersive_bias
    Word8 -> Put
putWord8 Word8
_msgSsrPhaseBiases_mw_consistency
    Word16 -> Put
putWord16le Word16
_msgSsrPhaseBiases_yaw
    (Word8 -> Put
putWord8 (Word8 -> Put) -> (Int8 -> Word8) -> Int8 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int8 -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int8
_msgSsrPhaseBiases_yaw_rate
    (PhaseBiasesContent -> Put) -> [PhaseBiasesContent] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ PhaseBiasesContent -> Put
forall t. Binary t => t -> Put
put [PhaseBiasesContent]
_msgSsrPhaseBiases_biases

$(makeSBP 'msgSsrPhaseBiases ''MsgSsrPhaseBiases)
$(makeJSON "_msgSsrPhaseBiases_" ''MsgSsrPhaseBiases)
$(makeLenses ''MsgSsrPhaseBiases)

msgSsrStecCorrectionDep :: Word16
msgSsrStecCorrectionDep :: Word16
msgSsrStecCorrectionDep = Word16
0x05FB

-- | SBP class for message MSG_SSR_STEC_CORRECTION_DEP (0x05FB).
--
-- The Slant Total Electron Content per space vehicle, given as polynomial
-- approximation for a given tile. This should be combined with the
-- MSG_SSR_GRIDDED_CORRECTION message to get the state space representation of
-- the atmospheric delay.
--
-- It is typically equivalent to the QZSS CLAS Sub Type 8 messages.
data MsgSsrStecCorrectionDep = MsgSsrStecCorrectionDep
  { MsgSsrStecCorrectionDep -> STECHeader
_msgSsrStecCorrectionDep_header      :: !STECHeader
    -- ^ Header of a STEC polynomial coefficient message.
  , MsgSsrStecCorrectionDep -> [STECSatElement]
_msgSsrStecCorrectionDep_stec_sat_list :: ![STECSatElement]
    -- ^ Array of STEC polynomial coefficients for each space vehicle.
  } deriving ( Int -> MsgSsrStecCorrectionDep -> ShowS
[MsgSsrStecCorrectionDep] -> ShowS
MsgSsrStecCorrectionDep -> String
(Int -> MsgSsrStecCorrectionDep -> ShowS)
-> (MsgSsrStecCorrectionDep -> String)
-> ([MsgSsrStecCorrectionDep] -> ShowS)
-> Show MsgSsrStecCorrectionDep
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrStecCorrectionDep] -> ShowS
$cshowList :: [MsgSsrStecCorrectionDep] -> ShowS
show :: MsgSsrStecCorrectionDep -> String
$cshow :: MsgSsrStecCorrectionDep -> String
showsPrec :: Int -> MsgSsrStecCorrectionDep -> ShowS
$cshowsPrec :: Int -> MsgSsrStecCorrectionDep -> ShowS
Show, ReadPrec [MsgSsrStecCorrectionDep]
ReadPrec MsgSsrStecCorrectionDep
Int -> ReadS MsgSsrStecCorrectionDep
ReadS [MsgSsrStecCorrectionDep]
(Int -> ReadS MsgSsrStecCorrectionDep)
-> ReadS [MsgSsrStecCorrectionDep]
-> ReadPrec MsgSsrStecCorrectionDep
-> ReadPrec [MsgSsrStecCorrectionDep]
-> Read MsgSsrStecCorrectionDep
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrStecCorrectionDep]
$creadListPrec :: ReadPrec [MsgSsrStecCorrectionDep]
readPrec :: ReadPrec MsgSsrStecCorrectionDep
$creadPrec :: ReadPrec MsgSsrStecCorrectionDep
readList :: ReadS [MsgSsrStecCorrectionDep]
$creadList :: ReadS [MsgSsrStecCorrectionDep]
readsPrec :: Int -> ReadS MsgSsrStecCorrectionDep
$creadsPrec :: Int -> ReadS MsgSsrStecCorrectionDep
Read, MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool
(MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool)
-> (MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool)
-> Eq MsgSsrStecCorrectionDep
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool
$c/= :: MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool
== :: MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool
$c== :: MsgSsrStecCorrectionDep -> MsgSsrStecCorrectionDep -> Bool
Eq )

instance Binary MsgSsrStecCorrectionDep where
  get :: Get MsgSsrStecCorrectionDep
get = do
    STECHeader
_msgSsrStecCorrectionDep_header <- Get STECHeader
forall t. Binary t => Get t
get
    [STECSatElement]
_msgSsrStecCorrectionDep_stec_sat_list <- Get Bool -> Get STECSatElement -> Get [STECSatElement]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get STECSatElement
forall t. Binary t => Get t
get
    MsgSsrStecCorrectionDep -> Get MsgSsrStecCorrectionDep
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrStecCorrectionDep :: STECHeader -> [STECSatElement] -> MsgSsrStecCorrectionDep
MsgSsrStecCorrectionDep {[STECSatElement]
STECHeader
_msgSsrStecCorrectionDep_stec_sat_list :: [STECSatElement]
_msgSsrStecCorrectionDep_header :: STECHeader
_msgSsrStecCorrectionDep_stec_sat_list :: [STECSatElement]
_msgSsrStecCorrectionDep_header :: STECHeader
..}

  put :: MsgSsrStecCorrectionDep -> Put
put MsgSsrStecCorrectionDep {[STECSatElement]
STECHeader
_msgSsrStecCorrectionDep_stec_sat_list :: [STECSatElement]
_msgSsrStecCorrectionDep_header :: STECHeader
_msgSsrStecCorrectionDep_stec_sat_list :: MsgSsrStecCorrectionDep -> [STECSatElement]
_msgSsrStecCorrectionDep_header :: MsgSsrStecCorrectionDep -> STECHeader
..} = do
    STECHeader -> Put
forall t. Binary t => t -> Put
put STECHeader
_msgSsrStecCorrectionDep_header
    (STECSatElement -> Put) -> [STECSatElement] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ STECSatElement -> Put
forall t. Binary t => t -> Put
put [STECSatElement]
_msgSsrStecCorrectionDep_stec_sat_list

$(makeSBP 'msgSsrStecCorrectionDep ''MsgSsrStecCorrectionDep)
$(makeJSON "_msgSsrStecCorrectionDep_" ''MsgSsrStecCorrectionDep)
$(makeLenses ''MsgSsrStecCorrectionDep)

msgSsrStecCorrection :: Word16
msgSsrStecCorrection :: Word16
msgSsrStecCorrection = Word16
0x05FD

data MsgSsrStecCorrection = MsgSsrStecCorrection
  { MsgSsrStecCorrection -> [Word8]
_msgSsrStecCorrection_stub :: ![Word8]
  } deriving ( Int -> MsgSsrStecCorrection -> ShowS
[MsgSsrStecCorrection] -> ShowS
MsgSsrStecCorrection -> String
(Int -> MsgSsrStecCorrection -> ShowS)
-> (MsgSsrStecCorrection -> String)
-> ([MsgSsrStecCorrection] -> ShowS)
-> Show MsgSsrStecCorrection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrStecCorrection] -> ShowS
$cshowList :: [MsgSsrStecCorrection] -> ShowS
show :: MsgSsrStecCorrection -> String
$cshow :: MsgSsrStecCorrection -> String
showsPrec :: Int -> MsgSsrStecCorrection -> ShowS
$cshowsPrec :: Int -> MsgSsrStecCorrection -> ShowS
Show, ReadPrec [MsgSsrStecCorrection]
ReadPrec MsgSsrStecCorrection
Int -> ReadS MsgSsrStecCorrection
ReadS [MsgSsrStecCorrection]
(Int -> ReadS MsgSsrStecCorrection)
-> ReadS [MsgSsrStecCorrection]
-> ReadPrec MsgSsrStecCorrection
-> ReadPrec [MsgSsrStecCorrection]
-> Read MsgSsrStecCorrection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrStecCorrection]
$creadListPrec :: ReadPrec [MsgSsrStecCorrection]
readPrec :: ReadPrec MsgSsrStecCorrection
$creadPrec :: ReadPrec MsgSsrStecCorrection
readList :: ReadS [MsgSsrStecCorrection]
$creadList :: ReadS [MsgSsrStecCorrection]
readsPrec :: Int -> ReadS MsgSsrStecCorrection
$creadsPrec :: Int -> ReadS MsgSsrStecCorrection
Read, MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool
(MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool)
-> (MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool)
-> Eq MsgSsrStecCorrection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool
$c/= :: MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool
== :: MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool
$c== :: MsgSsrStecCorrection -> MsgSsrStecCorrection -> Bool
Eq )

instance Binary MsgSsrStecCorrection where
  get :: Get MsgSsrStecCorrection
get = do
    [Word8]
_msgSsrStecCorrection_stub <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrStecCorrection -> Get MsgSsrStecCorrection
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrStecCorrection :: [Word8] -> MsgSsrStecCorrection
MsgSsrStecCorrection {[Word8]
_msgSsrStecCorrection_stub :: [Word8]
_msgSsrStecCorrection_stub :: [Word8]
..}

  put :: MsgSsrStecCorrection -> Put
put MsgSsrStecCorrection {[Word8]
_msgSsrStecCorrection_stub :: [Word8]
_msgSsrStecCorrection_stub :: MsgSsrStecCorrection -> [Word8]
..} = do
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrStecCorrection_stub

$(makeSBP 'msgSsrStecCorrection ''MsgSsrStecCorrection)
$(makeJSON "_msgSsrStecCorrection_" ''MsgSsrStecCorrection)
$(makeLenses ''MsgSsrStecCorrection)

msgSsrGriddedCorrection :: Word16
msgSsrGriddedCorrection :: Word16
msgSsrGriddedCorrection = Word16
0x05FC

-- | SBP class for message MSG_SSR_GRIDDED_CORRECTION (0x05FC).
--
-- STEC residuals are per space vehicle, troposphere is not.
--
-- It is typically equivalent to the QZSS CLAS Sub Type 9 messages.
data MsgSsrGriddedCorrection = MsgSsrGriddedCorrection
  { MsgSsrGriddedCorrection -> GriddedCorrectionHeader
_msgSsrGriddedCorrection_header               :: !GriddedCorrectionHeader
    -- ^ Header of a gridded correction message
  , MsgSsrGriddedCorrection -> Word16
_msgSsrGriddedCorrection_index                :: !Word16
    -- ^ Index of the grid point.
  , MsgSsrGriddedCorrection -> TroposphericDelayCorrection
_msgSsrGriddedCorrection_tropo_delay_correction :: !TroposphericDelayCorrection
    -- ^ Wet and hydrostatic vertical delays (mean, stddev).
  , MsgSsrGriddedCorrection -> [STECResidual]
_msgSsrGriddedCorrection_stec_residuals       :: ![STECResidual]
    -- ^ STEC residuals for each satellite (mean, stddev).
  } deriving ( Int -> MsgSsrGriddedCorrection -> ShowS
[MsgSsrGriddedCorrection] -> ShowS
MsgSsrGriddedCorrection -> String
(Int -> MsgSsrGriddedCorrection -> ShowS)
-> (MsgSsrGriddedCorrection -> String)
-> ([MsgSsrGriddedCorrection] -> ShowS)
-> Show MsgSsrGriddedCorrection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrGriddedCorrection] -> ShowS
$cshowList :: [MsgSsrGriddedCorrection] -> ShowS
show :: MsgSsrGriddedCorrection -> String
$cshow :: MsgSsrGriddedCorrection -> String
showsPrec :: Int -> MsgSsrGriddedCorrection -> ShowS
$cshowsPrec :: Int -> MsgSsrGriddedCorrection -> ShowS
Show, ReadPrec [MsgSsrGriddedCorrection]
ReadPrec MsgSsrGriddedCorrection
Int -> ReadS MsgSsrGriddedCorrection
ReadS [MsgSsrGriddedCorrection]
(Int -> ReadS MsgSsrGriddedCorrection)
-> ReadS [MsgSsrGriddedCorrection]
-> ReadPrec MsgSsrGriddedCorrection
-> ReadPrec [MsgSsrGriddedCorrection]
-> Read MsgSsrGriddedCorrection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrGriddedCorrection]
$creadListPrec :: ReadPrec [MsgSsrGriddedCorrection]
readPrec :: ReadPrec MsgSsrGriddedCorrection
$creadPrec :: ReadPrec MsgSsrGriddedCorrection
readList :: ReadS [MsgSsrGriddedCorrection]
$creadList :: ReadS [MsgSsrGriddedCorrection]
readsPrec :: Int -> ReadS MsgSsrGriddedCorrection
$creadsPrec :: Int -> ReadS MsgSsrGriddedCorrection
Read, MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool
(MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool)
-> (MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool)
-> Eq MsgSsrGriddedCorrection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool
$c/= :: MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool
== :: MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool
$c== :: MsgSsrGriddedCorrection -> MsgSsrGriddedCorrection -> Bool
Eq )

instance Binary MsgSsrGriddedCorrection where
  get :: Get MsgSsrGriddedCorrection
get = do
    GriddedCorrectionHeader
_msgSsrGriddedCorrection_header <- Get GriddedCorrectionHeader
forall t. Binary t => Get t
get
    Word16
_msgSsrGriddedCorrection_index <- Get Word16
getWord16le
    TroposphericDelayCorrection
_msgSsrGriddedCorrection_tropo_delay_correction <- Get TroposphericDelayCorrection
forall t. Binary t => Get t
get
    [STECResidual]
_msgSsrGriddedCorrection_stec_residuals <- Get Bool -> Get STECResidual -> Get [STECResidual]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get STECResidual
forall t. Binary t => Get t
get
    MsgSsrGriddedCorrection -> Get MsgSsrGriddedCorrection
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrGriddedCorrection :: GriddedCorrectionHeader
-> Word16
-> TroposphericDelayCorrection
-> [STECResidual]
-> MsgSsrGriddedCorrection
MsgSsrGriddedCorrection {[STECResidual]
Word16
GriddedCorrectionHeader
TroposphericDelayCorrection
_msgSsrGriddedCorrection_stec_residuals :: [STECResidual]
_msgSsrGriddedCorrection_tropo_delay_correction :: TroposphericDelayCorrection
_msgSsrGriddedCorrection_index :: Word16
_msgSsrGriddedCorrection_header :: GriddedCorrectionHeader
_msgSsrGriddedCorrection_stec_residuals :: [STECResidual]
_msgSsrGriddedCorrection_tropo_delay_correction :: TroposphericDelayCorrection
_msgSsrGriddedCorrection_index :: Word16
_msgSsrGriddedCorrection_header :: GriddedCorrectionHeader
..}

  put :: MsgSsrGriddedCorrection -> Put
put MsgSsrGriddedCorrection {[STECResidual]
Word16
GriddedCorrectionHeader
TroposphericDelayCorrection
_msgSsrGriddedCorrection_stec_residuals :: [STECResidual]
_msgSsrGriddedCorrection_tropo_delay_correction :: TroposphericDelayCorrection
_msgSsrGriddedCorrection_index :: Word16
_msgSsrGriddedCorrection_header :: GriddedCorrectionHeader
_msgSsrGriddedCorrection_stec_residuals :: MsgSsrGriddedCorrection -> [STECResidual]
_msgSsrGriddedCorrection_tropo_delay_correction :: MsgSsrGriddedCorrection -> TroposphericDelayCorrection
_msgSsrGriddedCorrection_index :: MsgSsrGriddedCorrection -> Word16
_msgSsrGriddedCorrection_header :: MsgSsrGriddedCorrection -> GriddedCorrectionHeader
..} = do
    GriddedCorrectionHeader -> Put
forall t. Binary t => t -> Put
put GriddedCorrectionHeader
_msgSsrGriddedCorrection_header
    Word16 -> Put
putWord16le Word16
_msgSsrGriddedCorrection_index
    TroposphericDelayCorrection -> Put
forall t. Binary t => t -> Put
put TroposphericDelayCorrection
_msgSsrGriddedCorrection_tropo_delay_correction
    (STECResidual -> Put) -> [STECResidual] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ STECResidual -> Put
forall t. Binary t => t -> Put
put [STECResidual]
_msgSsrGriddedCorrection_stec_residuals

$(makeSBP 'msgSsrGriddedCorrection ''MsgSsrGriddedCorrection)
$(makeJSON "_msgSsrGriddedCorrection_" ''MsgSsrGriddedCorrection)
$(makeLenses ''MsgSsrGriddedCorrection)

msgSsrGriddedCorrectionBounds :: Word16
msgSsrGriddedCorrectionBounds :: Word16
msgSsrGriddedCorrectionBounds = Word16
0x05FE

data MsgSsrGriddedCorrectionBounds = MsgSsrGriddedCorrectionBounds
  { MsgSsrGriddedCorrectionBounds -> [Word8]
_msgSsrGriddedCorrectionBounds_stub :: ![Word8]
  } deriving ( Int -> MsgSsrGriddedCorrectionBounds -> ShowS
[MsgSsrGriddedCorrectionBounds] -> ShowS
MsgSsrGriddedCorrectionBounds -> String
(Int -> MsgSsrGriddedCorrectionBounds -> ShowS)
-> (MsgSsrGriddedCorrectionBounds -> String)
-> ([MsgSsrGriddedCorrectionBounds] -> ShowS)
-> Show MsgSsrGriddedCorrectionBounds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrGriddedCorrectionBounds] -> ShowS
$cshowList :: [MsgSsrGriddedCorrectionBounds] -> ShowS
show :: MsgSsrGriddedCorrectionBounds -> String
$cshow :: MsgSsrGriddedCorrectionBounds -> String
showsPrec :: Int -> MsgSsrGriddedCorrectionBounds -> ShowS
$cshowsPrec :: Int -> MsgSsrGriddedCorrectionBounds -> ShowS
Show, ReadPrec [MsgSsrGriddedCorrectionBounds]
ReadPrec MsgSsrGriddedCorrectionBounds
Int -> ReadS MsgSsrGriddedCorrectionBounds
ReadS [MsgSsrGriddedCorrectionBounds]
(Int -> ReadS MsgSsrGriddedCorrectionBounds)
-> ReadS [MsgSsrGriddedCorrectionBounds]
-> ReadPrec MsgSsrGriddedCorrectionBounds
-> ReadPrec [MsgSsrGriddedCorrectionBounds]
-> Read MsgSsrGriddedCorrectionBounds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrGriddedCorrectionBounds]
$creadListPrec :: ReadPrec [MsgSsrGriddedCorrectionBounds]
readPrec :: ReadPrec MsgSsrGriddedCorrectionBounds
$creadPrec :: ReadPrec MsgSsrGriddedCorrectionBounds
readList :: ReadS [MsgSsrGriddedCorrectionBounds]
$creadList :: ReadS [MsgSsrGriddedCorrectionBounds]
readsPrec :: Int -> ReadS MsgSsrGriddedCorrectionBounds
$creadsPrec :: Int -> ReadS MsgSsrGriddedCorrectionBounds
Read, MsgSsrGriddedCorrectionBounds
-> MsgSsrGriddedCorrectionBounds -> Bool
(MsgSsrGriddedCorrectionBounds
 -> MsgSsrGriddedCorrectionBounds -> Bool)
-> (MsgSsrGriddedCorrectionBounds
    -> MsgSsrGriddedCorrectionBounds -> Bool)
-> Eq MsgSsrGriddedCorrectionBounds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrGriddedCorrectionBounds
-> MsgSsrGriddedCorrectionBounds -> Bool
$c/= :: MsgSsrGriddedCorrectionBounds
-> MsgSsrGriddedCorrectionBounds -> Bool
== :: MsgSsrGriddedCorrectionBounds
-> MsgSsrGriddedCorrectionBounds -> Bool
$c== :: MsgSsrGriddedCorrectionBounds
-> MsgSsrGriddedCorrectionBounds -> Bool
Eq )

instance Binary MsgSsrGriddedCorrectionBounds where
  get :: Get MsgSsrGriddedCorrectionBounds
get = do
    [Word8]
_msgSsrGriddedCorrectionBounds_stub <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrGriddedCorrectionBounds -> Get MsgSsrGriddedCorrectionBounds
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrGriddedCorrectionBounds :: [Word8] -> MsgSsrGriddedCorrectionBounds
MsgSsrGriddedCorrectionBounds {[Word8]
_msgSsrGriddedCorrectionBounds_stub :: [Word8]
_msgSsrGriddedCorrectionBounds_stub :: [Word8]
..}

  put :: MsgSsrGriddedCorrectionBounds -> Put
put MsgSsrGriddedCorrectionBounds {[Word8]
_msgSsrGriddedCorrectionBounds_stub :: [Word8]
_msgSsrGriddedCorrectionBounds_stub :: MsgSsrGriddedCorrectionBounds -> [Word8]
..} = do
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrGriddedCorrectionBounds_stub

$(makeSBP 'msgSsrGriddedCorrectionBounds ''MsgSsrGriddedCorrectionBounds)
$(makeJSON "_msgSsrGriddedCorrectionBounds_" ''MsgSsrGriddedCorrectionBounds)
$(makeLenses ''MsgSsrGriddedCorrectionBounds)

msgSsrTileDefinitionDep :: Word16
msgSsrTileDefinitionDep :: Word16
msgSsrTileDefinitionDep = Word16
0x05F6

-- | SBP class for message MSG_SSR_TILE_DEFINITION_DEP (0x05F6).
--
-- Provides the correction point coordinates for the atmospheric correction
-- values in the MSG_SSR_STEC_CORRECTION_DEP and MSG_SSR_GRIDDED_CORRECTION
-- messages.
--
-- Based on ETSI TS 137 355 V16.1.0 (LTE Positioning Protocol) information
-- element GNSS-SSR-CorrectionPoints. SBP only supports gridded arrays of
-- correction points, not lists of points.
data MsgSsrTileDefinitionDep = MsgSsrTileDefinitionDep
  { MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_tile_set_id :: !Word16
    -- ^ Unique identifier of the tile set this tile belongs to.
  , MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_tile_id     :: !Word16
    -- ^ Unique identifier of this tile in the tile set.
    -- See GNSS-SSR-ArrayOfCorrectionPoints field correctionPointSetID.
  , MsgSsrTileDefinitionDep -> Int16
_msgSsrTileDefinitionDep_corner_nw_lat :: !Int16
    -- ^ North-West corner correction point latitude.
    --
    -- The relation between the latitude X in the range [-90, 90] and the
    -- coded number N is:
    --
    -- N = floor((X / 90) * 2^14)
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field referencePointLatitude.
  , MsgSsrTileDefinitionDep -> Int16
_msgSsrTileDefinitionDep_corner_nw_lon :: !Int16
    -- ^ North-West corner correction point longitude.
    --
    -- The relation between the longitude X in the range [-180, 180] and the
    -- coded number N is:
    --
    -- N = floor((X / 180) * 2^15)
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field referencePointLongitude.
  , MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_spacing_lat :: !Word16
    -- ^ Spacing of the correction points in the latitude direction.
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field stepOfLatitude.
  , MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_spacing_lon :: !Word16
    -- ^ Spacing of the correction points in the longitude direction.
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field stepOfLongitude.
  , MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_rows        :: !Word16
    -- ^ Number of steps in the latitude direction.
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field numberOfStepsLatitude.
  , MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_cols        :: !Word16
    -- ^ Number of steps in the longitude direction.
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field numberOfStepsLongitude.
  , MsgSsrTileDefinitionDep -> Word64
_msgSsrTileDefinitionDep_bitmask     :: !Word64
    -- ^ Specifies the availability of correction data at the correction points
    -- in the array.
    --
    -- If a specific bit is enabled (set to 1), the correction is not
    -- available. Only the first rows * cols bits are used, the remainder are
    -- set to 0. If there are more then 64 correction points the remaining
    -- corrections are always available.
    --
    -- Starting with the northwest corner of the array (top left on a north
    -- oriented map) the correction points are enumerated with row precedence
    -- - first row west to east, second row west to east, until last row west
    -- to east - ending with the southeast corner of the array.
    --
    -- See GNSS-SSR-ArrayOfCorrectionPoints field bitmaskOfGrids but note the
    -- definition of the bits is inverted.
  } deriving ( Int -> MsgSsrTileDefinitionDep -> ShowS
[MsgSsrTileDefinitionDep] -> ShowS
MsgSsrTileDefinitionDep -> String
(Int -> MsgSsrTileDefinitionDep -> ShowS)
-> (MsgSsrTileDefinitionDep -> String)
-> ([MsgSsrTileDefinitionDep] -> ShowS)
-> Show MsgSsrTileDefinitionDep
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrTileDefinitionDep] -> ShowS
$cshowList :: [MsgSsrTileDefinitionDep] -> ShowS
show :: MsgSsrTileDefinitionDep -> String
$cshow :: MsgSsrTileDefinitionDep -> String
showsPrec :: Int -> MsgSsrTileDefinitionDep -> ShowS
$cshowsPrec :: Int -> MsgSsrTileDefinitionDep -> ShowS
Show, ReadPrec [MsgSsrTileDefinitionDep]
ReadPrec MsgSsrTileDefinitionDep
Int -> ReadS MsgSsrTileDefinitionDep
ReadS [MsgSsrTileDefinitionDep]
(Int -> ReadS MsgSsrTileDefinitionDep)
-> ReadS [MsgSsrTileDefinitionDep]
-> ReadPrec MsgSsrTileDefinitionDep
-> ReadPrec [MsgSsrTileDefinitionDep]
-> Read MsgSsrTileDefinitionDep
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrTileDefinitionDep]
$creadListPrec :: ReadPrec [MsgSsrTileDefinitionDep]
readPrec :: ReadPrec MsgSsrTileDefinitionDep
$creadPrec :: ReadPrec MsgSsrTileDefinitionDep
readList :: ReadS [MsgSsrTileDefinitionDep]
$creadList :: ReadS [MsgSsrTileDefinitionDep]
readsPrec :: Int -> ReadS MsgSsrTileDefinitionDep
$creadsPrec :: Int -> ReadS MsgSsrTileDefinitionDep
Read, MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool
(MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool)
-> (MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool)
-> Eq MsgSsrTileDefinitionDep
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool
$c/= :: MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool
== :: MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool
$c== :: MsgSsrTileDefinitionDep -> MsgSsrTileDefinitionDep -> Bool
Eq )

instance Binary MsgSsrTileDefinitionDep where
  get :: Get MsgSsrTileDefinitionDep
get = do
    Word16
_msgSsrTileDefinitionDep_tile_set_id <- Get Word16
getWord16le
    Word16
_msgSsrTileDefinitionDep_tile_id <- Get Word16
getWord16le
    Int16
_msgSsrTileDefinitionDep_corner_nw_lat <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    Int16
_msgSsrTileDefinitionDep_corner_nw_lon <- (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    Word16
_msgSsrTileDefinitionDep_spacing_lat <- Get Word16
getWord16le
    Word16
_msgSsrTileDefinitionDep_spacing_lon <- Get Word16
getWord16le
    Word16
_msgSsrTileDefinitionDep_rows <- Get Word16
getWord16le
    Word16
_msgSsrTileDefinitionDep_cols <- Get Word16
getWord16le
    Word64
_msgSsrTileDefinitionDep_bitmask <- Get Word64
getWord64le
    MsgSsrTileDefinitionDep -> Get MsgSsrTileDefinitionDep
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrTileDefinitionDep :: Word16
-> Word16
-> Int16
-> Int16
-> Word16
-> Word16
-> Word16
-> Word16
-> Word64
-> MsgSsrTileDefinitionDep
MsgSsrTileDefinitionDep {Int16
Word16
Word64
_msgSsrTileDefinitionDep_bitmask :: Word64
_msgSsrTileDefinitionDep_cols :: Word16
_msgSsrTileDefinitionDep_rows :: Word16
_msgSsrTileDefinitionDep_spacing_lon :: Word16
_msgSsrTileDefinitionDep_spacing_lat :: Word16
_msgSsrTileDefinitionDep_corner_nw_lon :: Int16
_msgSsrTileDefinitionDep_corner_nw_lat :: Int16
_msgSsrTileDefinitionDep_tile_id :: Word16
_msgSsrTileDefinitionDep_tile_set_id :: Word16
_msgSsrTileDefinitionDep_bitmask :: Word64
_msgSsrTileDefinitionDep_cols :: Word16
_msgSsrTileDefinitionDep_rows :: Word16
_msgSsrTileDefinitionDep_spacing_lon :: Word16
_msgSsrTileDefinitionDep_spacing_lat :: Word16
_msgSsrTileDefinitionDep_corner_nw_lon :: Int16
_msgSsrTileDefinitionDep_corner_nw_lat :: Int16
_msgSsrTileDefinitionDep_tile_id :: Word16
_msgSsrTileDefinitionDep_tile_set_id :: Word16
..}

  put :: MsgSsrTileDefinitionDep -> Put
put MsgSsrTileDefinitionDep {Int16
Word16
Word64
_msgSsrTileDefinitionDep_bitmask :: Word64
_msgSsrTileDefinitionDep_cols :: Word16
_msgSsrTileDefinitionDep_rows :: Word16
_msgSsrTileDefinitionDep_spacing_lon :: Word16
_msgSsrTileDefinitionDep_spacing_lat :: Word16
_msgSsrTileDefinitionDep_corner_nw_lon :: Int16
_msgSsrTileDefinitionDep_corner_nw_lat :: Int16
_msgSsrTileDefinitionDep_tile_id :: Word16
_msgSsrTileDefinitionDep_tile_set_id :: Word16
_msgSsrTileDefinitionDep_bitmask :: MsgSsrTileDefinitionDep -> Word64
_msgSsrTileDefinitionDep_cols :: MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_rows :: MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_spacing_lon :: MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_spacing_lat :: MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_corner_nw_lon :: MsgSsrTileDefinitionDep -> Int16
_msgSsrTileDefinitionDep_corner_nw_lat :: MsgSsrTileDefinitionDep -> Int16
_msgSsrTileDefinitionDep_tile_id :: MsgSsrTileDefinitionDep -> Word16
_msgSsrTileDefinitionDep_tile_set_id :: MsgSsrTileDefinitionDep -> Word16
..} = do
    Word16 -> Put
putWord16le Word16
_msgSsrTileDefinitionDep_tile_set_id
    Word16 -> Put
putWord16le Word16
_msgSsrTileDefinitionDep_tile_id
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_msgSsrTileDefinitionDep_corner_nw_lat
    (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int16
_msgSsrTileDefinitionDep_corner_nw_lon
    Word16 -> Put
putWord16le Word16
_msgSsrTileDefinitionDep_spacing_lat
    Word16 -> Put
putWord16le Word16
_msgSsrTileDefinitionDep_spacing_lon
    Word16 -> Put
putWord16le Word16
_msgSsrTileDefinitionDep_rows
    Word16 -> Put
putWord16le Word16
_msgSsrTileDefinitionDep_cols
    Word64 -> Put
putWord64le Word64
_msgSsrTileDefinitionDep_bitmask

$(makeSBP 'msgSsrTileDefinitionDep ''MsgSsrTileDefinitionDep)
$(makeJSON "_msgSsrTileDefinitionDep_" ''MsgSsrTileDefinitionDep)
$(makeLenses ''MsgSsrTileDefinitionDep)

msgSsrTileDefinition :: Word16
msgSsrTileDefinition :: Word16
msgSsrTileDefinition = Word16
0x05F7

-- | SBP class for message MSG_SSR_TILE_DEFINITION (0x05F7).
--
-- Provides the correction point coordinates for the atmospheric correction
-- values in the MSG_SSR_STEC_CORRECTION and MSG_SSR_GRIDDED_CORRECTION
-- messages.
--
-- Based on ETSI TS 137 355 V16.1.0 (LTE Positioning Protocol) information
-- element GNSS-SSR-CorrectionPoints. SBP only supports gridded arrays of
-- correction points, not lists of points.
data MsgSsrTileDefinition = MsgSsrTileDefinition
  { MsgSsrTileDefinition -> [Word8]
_msgSsrTileDefinition_stub :: ![Word8]
  } deriving ( Int -> MsgSsrTileDefinition -> ShowS
[MsgSsrTileDefinition] -> ShowS
MsgSsrTileDefinition -> String
(Int -> MsgSsrTileDefinition -> ShowS)
-> (MsgSsrTileDefinition -> String)
-> ([MsgSsrTileDefinition] -> ShowS)
-> Show MsgSsrTileDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrTileDefinition] -> ShowS
$cshowList :: [MsgSsrTileDefinition] -> ShowS
show :: MsgSsrTileDefinition -> String
$cshow :: MsgSsrTileDefinition -> String
showsPrec :: Int -> MsgSsrTileDefinition -> ShowS
$cshowsPrec :: Int -> MsgSsrTileDefinition -> ShowS
Show, ReadPrec [MsgSsrTileDefinition]
ReadPrec MsgSsrTileDefinition
Int -> ReadS MsgSsrTileDefinition
ReadS [MsgSsrTileDefinition]
(Int -> ReadS MsgSsrTileDefinition)
-> ReadS [MsgSsrTileDefinition]
-> ReadPrec MsgSsrTileDefinition
-> ReadPrec [MsgSsrTileDefinition]
-> Read MsgSsrTileDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrTileDefinition]
$creadListPrec :: ReadPrec [MsgSsrTileDefinition]
readPrec :: ReadPrec MsgSsrTileDefinition
$creadPrec :: ReadPrec MsgSsrTileDefinition
readList :: ReadS [MsgSsrTileDefinition]
$creadList :: ReadS [MsgSsrTileDefinition]
readsPrec :: Int -> ReadS MsgSsrTileDefinition
$creadsPrec :: Int -> ReadS MsgSsrTileDefinition
Read, MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool
(MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool)
-> (MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool)
-> Eq MsgSsrTileDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool
$c/= :: MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool
== :: MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool
$c== :: MsgSsrTileDefinition -> MsgSsrTileDefinition -> Bool
Eq )

instance Binary MsgSsrTileDefinition where
  get :: Get MsgSsrTileDefinition
get = do
    [Word8]
_msgSsrTileDefinition_stub <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrTileDefinition -> Get MsgSsrTileDefinition
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrTileDefinition :: [Word8] -> MsgSsrTileDefinition
MsgSsrTileDefinition {[Word8]
_msgSsrTileDefinition_stub :: [Word8]
_msgSsrTileDefinition_stub :: [Word8]
..}

  put :: MsgSsrTileDefinition -> Put
put MsgSsrTileDefinition {[Word8]
_msgSsrTileDefinition_stub :: [Word8]
_msgSsrTileDefinition_stub :: MsgSsrTileDefinition -> [Word8]
..} = do
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrTileDefinition_stub

$(makeSBP 'msgSsrTileDefinition ''MsgSsrTileDefinition)
$(makeJSON "_msgSsrTileDefinition_" ''MsgSsrTileDefinition)
$(makeLenses ''MsgSsrTileDefinition)

-- | SatelliteAPC.
--
-- Contains phase center offset and elevation variation corrections for one
-- signal on a satellite.
data SatelliteAPC = SatelliteAPC
  { SatelliteAPC -> GnssSignal
_satelliteAPC_sid    :: !GnssSignal
    -- ^ GNSS signal identifier (16 bit)
  , SatelliteAPC -> Word8
_satelliteAPC_sat_info :: !Word8
    -- ^ Additional satellite information
  , SatelliteAPC -> Word16
_satelliteAPC_svn    :: !Word16
    -- ^ Satellite Code, as defined by IGS. Typically the space vehicle number.
  , SatelliteAPC -> [Int16]
_satelliteAPC_pco    :: ![Int16]
    -- ^ Mean phase center offset, X Y and Z axes. See IGS ANTEX file format
    -- description for coordinate system definition.
  , SatelliteAPC -> [Int8]
_satelliteAPC_pcv    :: ![Int8]
    -- ^ Elevation dependent phase center variations. First element is 0 degrees
    -- separation from the Z axis, subsequent elements represent elevation
    -- variations in 1 degree increments.
  } deriving ( Int -> SatelliteAPC -> ShowS
[SatelliteAPC] -> ShowS
SatelliteAPC -> String
(Int -> SatelliteAPC -> ShowS)
-> (SatelliteAPC -> String)
-> ([SatelliteAPC] -> ShowS)
-> Show SatelliteAPC
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SatelliteAPC] -> ShowS
$cshowList :: [SatelliteAPC] -> ShowS
show :: SatelliteAPC -> String
$cshow :: SatelliteAPC -> String
showsPrec :: Int -> SatelliteAPC -> ShowS
$cshowsPrec :: Int -> SatelliteAPC -> ShowS
Show, ReadPrec [SatelliteAPC]
ReadPrec SatelliteAPC
Int -> ReadS SatelliteAPC
ReadS [SatelliteAPC]
(Int -> ReadS SatelliteAPC)
-> ReadS [SatelliteAPC]
-> ReadPrec SatelliteAPC
-> ReadPrec [SatelliteAPC]
-> Read SatelliteAPC
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SatelliteAPC]
$creadListPrec :: ReadPrec [SatelliteAPC]
readPrec :: ReadPrec SatelliteAPC
$creadPrec :: ReadPrec SatelliteAPC
readList :: ReadS [SatelliteAPC]
$creadList :: ReadS [SatelliteAPC]
readsPrec :: Int -> ReadS SatelliteAPC
$creadsPrec :: Int -> ReadS SatelliteAPC
Read, SatelliteAPC -> SatelliteAPC -> Bool
(SatelliteAPC -> SatelliteAPC -> Bool)
-> (SatelliteAPC -> SatelliteAPC -> Bool) -> Eq SatelliteAPC
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SatelliteAPC -> SatelliteAPC -> Bool
$c/= :: SatelliteAPC -> SatelliteAPC -> Bool
== :: SatelliteAPC -> SatelliteAPC -> Bool
$c== :: SatelliteAPC -> SatelliteAPC -> Bool
Eq )

instance Binary SatelliteAPC where
  get :: Get SatelliteAPC
get = do
    GnssSignal
_satelliteAPC_sid <- Get GnssSignal
forall t. Binary t => Get t
get
    Word8
_satelliteAPC_sat_info <- Get Word8
getWord8
    Word16
_satelliteAPC_svn <- Get Word16
getWord16le
    [Int16]
_satelliteAPC_pco <- Int -> Get Int16 -> Get [Int16]
forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a]
replicateM Int
3 (Word16 -> Int16
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word16 -> Int16) -> Get Word16 -> Get Int16
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word16
getWord16le)
    [Int8]
_satelliteAPC_pcv <- Int -> Get Int8 -> Get [Int8]
forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a]
replicateM Int
21 (Word8 -> Int8
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word8 -> Int8) -> Get Word8 -> Get Int8
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word8
getWord8)
    SatelliteAPC -> Get SatelliteAPC
forall (f :: * -> *) a. Applicative f => a -> f a
pure SatelliteAPC :: GnssSignal -> Word8 -> Word16 -> [Int16] -> [Int8] -> SatelliteAPC
SatelliteAPC {[Int8]
[Int16]
Word8
Word16
GnssSignal
_satelliteAPC_pcv :: [Int8]
_satelliteAPC_pco :: [Int16]
_satelliteAPC_svn :: Word16
_satelliteAPC_sat_info :: Word8
_satelliteAPC_sid :: GnssSignal
_satelliteAPC_pcv :: [Int8]
_satelliteAPC_pco :: [Int16]
_satelliteAPC_svn :: Word16
_satelliteAPC_sat_info :: Word8
_satelliteAPC_sid :: GnssSignal
..}

  put :: SatelliteAPC -> Put
put SatelliteAPC {[Int8]
[Int16]
Word8
Word16
GnssSignal
_satelliteAPC_pcv :: [Int8]
_satelliteAPC_pco :: [Int16]
_satelliteAPC_svn :: Word16
_satelliteAPC_sat_info :: Word8
_satelliteAPC_sid :: GnssSignal
_satelliteAPC_pcv :: SatelliteAPC -> [Int8]
_satelliteAPC_pco :: SatelliteAPC -> [Int16]
_satelliteAPC_svn :: SatelliteAPC -> Word16
_satelliteAPC_sat_info :: SatelliteAPC -> Word8
_satelliteAPC_sid :: SatelliteAPC -> GnssSignal
..} = do
    GnssSignal -> Put
forall t. Binary t => t -> Put
put GnssSignal
_satelliteAPC_sid
    Word8 -> Put
putWord8 Word8
_satelliteAPC_sat_info
    Word16 -> Put
putWord16le Word16
_satelliteAPC_svn
    (Int16 -> Put) -> [Int16] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (Word16 -> Put
putWord16le (Word16 -> Put) -> (Int16 -> Word16) -> Int16 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int16 -> Word16
forall a b. (Integral a, Num b) => a -> b
fromIntegral) [Int16]
_satelliteAPC_pco
    (Int8 -> Put) -> [Int8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (Word8 -> Put
putWord8 (Word8 -> Put) -> (Int8 -> Word8) -> Int8 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int8 -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral) [Int8]
_satelliteAPC_pcv

$(makeJSON "_satelliteAPC_" ''SatelliteAPC)
$(makeLenses ''SatelliteAPC)

msgSsrSatelliteApc :: Word16
msgSsrSatelliteApc :: Word16
msgSsrSatelliteApc = Word16
0x0604

data MsgSsrSatelliteApc = MsgSsrSatelliteApc
  { MsgSsrSatelliteApc -> [SatelliteAPC]
_msgSsrSatelliteApc_apc :: ![SatelliteAPC]
    -- ^ Satellite antenna phase center corrections
  } deriving ( Int -> MsgSsrSatelliteApc -> ShowS
[MsgSsrSatelliteApc] -> ShowS
MsgSsrSatelliteApc -> String
(Int -> MsgSsrSatelliteApc -> ShowS)
-> (MsgSsrSatelliteApc -> String)
-> ([MsgSsrSatelliteApc] -> ShowS)
-> Show MsgSsrSatelliteApc
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrSatelliteApc] -> ShowS
$cshowList :: [MsgSsrSatelliteApc] -> ShowS
show :: MsgSsrSatelliteApc -> String
$cshow :: MsgSsrSatelliteApc -> String
showsPrec :: Int -> MsgSsrSatelliteApc -> ShowS
$cshowsPrec :: Int -> MsgSsrSatelliteApc -> ShowS
Show, ReadPrec [MsgSsrSatelliteApc]
ReadPrec MsgSsrSatelliteApc
Int -> ReadS MsgSsrSatelliteApc
ReadS [MsgSsrSatelliteApc]
(Int -> ReadS MsgSsrSatelliteApc)
-> ReadS [MsgSsrSatelliteApc]
-> ReadPrec MsgSsrSatelliteApc
-> ReadPrec [MsgSsrSatelliteApc]
-> Read MsgSsrSatelliteApc
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrSatelliteApc]
$creadListPrec :: ReadPrec [MsgSsrSatelliteApc]
readPrec :: ReadPrec MsgSsrSatelliteApc
$creadPrec :: ReadPrec MsgSsrSatelliteApc
readList :: ReadS [MsgSsrSatelliteApc]
$creadList :: ReadS [MsgSsrSatelliteApc]
readsPrec :: Int -> ReadS MsgSsrSatelliteApc
$creadsPrec :: Int -> ReadS MsgSsrSatelliteApc
Read, MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool
(MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool)
-> (MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool)
-> Eq MsgSsrSatelliteApc
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool
$c/= :: MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool
== :: MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool
$c== :: MsgSsrSatelliteApc -> MsgSsrSatelliteApc -> Bool
Eq )

instance Binary MsgSsrSatelliteApc where
  get :: Get MsgSsrSatelliteApc
get = do
    [SatelliteAPC]
_msgSsrSatelliteApc_apc <- Get Bool -> Get SatelliteAPC -> Get [SatelliteAPC]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get SatelliteAPC
forall t. Binary t => Get t
get
    MsgSsrSatelliteApc -> Get MsgSsrSatelliteApc
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrSatelliteApc :: [SatelliteAPC] -> MsgSsrSatelliteApc
MsgSsrSatelliteApc {[SatelliteAPC]
_msgSsrSatelliteApc_apc :: [SatelliteAPC]
_msgSsrSatelliteApc_apc :: [SatelliteAPC]
..}

  put :: MsgSsrSatelliteApc -> Put
put MsgSsrSatelliteApc {[SatelliteAPC]
_msgSsrSatelliteApc_apc :: [SatelliteAPC]
_msgSsrSatelliteApc_apc :: MsgSsrSatelliteApc -> [SatelliteAPC]
..} = do
    (SatelliteAPC -> Put) -> [SatelliteAPC] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ SatelliteAPC -> Put
forall t. Binary t => t -> Put
put [SatelliteAPC]
_msgSsrSatelliteApc_apc

$(makeSBP 'msgSsrSatelliteApc ''MsgSsrSatelliteApc)
$(makeJSON "_msgSsrSatelliteApc_" ''MsgSsrSatelliteApc)
$(makeLenses ''MsgSsrSatelliteApc)

msgSsrOrbitClockDepA :: Word16
msgSsrOrbitClockDepA :: Word16
msgSsrOrbitClockDepA = Word16
0x05DC

data MsgSsrOrbitClockDepA = MsgSsrOrbitClockDepA
  { MsgSsrOrbitClockDepA -> GpsTimeSec
_msgSsrOrbitClockDepA_time          :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , MsgSsrOrbitClockDepA -> GnssSignal
_msgSsrOrbitClockDepA_sid           :: !GnssSignal
    -- ^ GNSS signal identifier (16 bit)
  , MsgSsrOrbitClockDepA -> Word8
_msgSsrOrbitClockDepA_update_interval :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , MsgSsrOrbitClockDepA -> Word8
_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
  , MsgSsrOrbitClockDepA -> Word8
_msgSsrOrbitClockDepA_iod           :: !Word8
    -- ^ Issue of broadcast ephemeris data
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_radial        :: !Int32
    -- ^ Orbit radial delta correction
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_along         :: !Int32
    -- ^ Orbit along delta correction
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_cross         :: !Int32
    -- ^ Orbit along delta correction
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_dot_radial    :: !Int32
    -- ^ Velocity of orbit radial delta correction
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_dot_along     :: !Int32
    -- ^ Velocity of orbit along delta correction
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_dot_cross     :: !Int32
    -- ^ Velocity of orbit cross delta correction
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_c0            :: !Int32
    -- ^ C0 polynomial coefficient for correction of broadcast satellite clock
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_c1            :: !Int32
    -- ^ C1 polynomial coefficient for correction of broadcast satellite clock
  , MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_c2            :: !Int32
    -- ^ C2 polynomial coefficient for correction of broadcast satellite clock
  } deriving ( Int -> MsgSsrOrbitClockDepA -> ShowS
[MsgSsrOrbitClockDepA] -> ShowS
MsgSsrOrbitClockDepA -> String
(Int -> MsgSsrOrbitClockDepA -> ShowS)
-> (MsgSsrOrbitClockDepA -> String)
-> ([MsgSsrOrbitClockDepA] -> ShowS)
-> Show MsgSsrOrbitClockDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrOrbitClockDepA] -> ShowS
$cshowList :: [MsgSsrOrbitClockDepA] -> ShowS
show :: MsgSsrOrbitClockDepA -> String
$cshow :: MsgSsrOrbitClockDepA -> String
showsPrec :: Int -> MsgSsrOrbitClockDepA -> ShowS
$cshowsPrec :: Int -> MsgSsrOrbitClockDepA -> ShowS
Show, ReadPrec [MsgSsrOrbitClockDepA]
ReadPrec MsgSsrOrbitClockDepA
Int -> ReadS MsgSsrOrbitClockDepA
ReadS [MsgSsrOrbitClockDepA]
(Int -> ReadS MsgSsrOrbitClockDepA)
-> ReadS [MsgSsrOrbitClockDepA]
-> ReadPrec MsgSsrOrbitClockDepA
-> ReadPrec [MsgSsrOrbitClockDepA]
-> Read MsgSsrOrbitClockDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrOrbitClockDepA]
$creadListPrec :: ReadPrec [MsgSsrOrbitClockDepA]
readPrec :: ReadPrec MsgSsrOrbitClockDepA
$creadPrec :: ReadPrec MsgSsrOrbitClockDepA
readList :: ReadS [MsgSsrOrbitClockDepA]
$creadList :: ReadS [MsgSsrOrbitClockDepA]
readsPrec :: Int -> ReadS MsgSsrOrbitClockDepA
$creadsPrec :: Int -> ReadS MsgSsrOrbitClockDepA
Read, MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool
(MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool)
-> (MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool)
-> Eq MsgSsrOrbitClockDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool
$c/= :: MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool
== :: MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool
$c== :: MsgSsrOrbitClockDepA -> MsgSsrOrbitClockDepA -> Bool
Eq )

instance Binary MsgSsrOrbitClockDepA where
  get :: Get MsgSsrOrbitClockDepA
get = do
    GpsTimeSec
_msgSsrOrbitClockDepA_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    GnssSignal
_msgSsrOrbitClockDepA_sid <- Get GnssSignal
forall t. Binary t => Get t
get
    Word8
_msgSsrOrbitClockDepA_update_interval <- Get Word8
getWord8
    Word8
_msgSsrOrbitClockDepA_iod_ssr <- Get Word8
getWord8
    Word8
_msgSsrOrbitClockDepA_iod <- Get Word8
getWord8
    Int32
_msgSsrOrbitClockDepA_radial <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_along <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_cross <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_dot_radial <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_dot_along <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_dot_cross <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_c0 <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_c1 <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    Int32
_msgSsrOrbitClockDepA_c2 <- (Word32 -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32 -> Int32) -> Get Word32 -> Get Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Word32
getWord32le)
    MsgSsrOrbitClockDepA -> Get MsgSsrOrbitClockDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrOrbitClockDepA :: GpsTimeSec
-> GnssSignal
-> Word8
-> Word8
-> Word8
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> Int32
-> MsgSsrOrbitClockDepA
MsgSsrOrbitClockDepA {Int32
Word8
GnssSignal
GpsTimeSec
_msgSsrOrbitClockDepA_c2 :: Int32
_msgSsrOrbitClockDepA_c1 :: Int32
_msgSsrOrbitClockDepA_c0 :: Int32
_msgSsrOrbitClockDepA_dot_cross :: Int32
_msgSsrOrbitClockDepA_dot_along :: Int32
_msgSsrOrbitClockDepA_dot_radial :: Int32
_msgSsrOrbitClockDepA_cross :: Int32
_msgSsrOrbitClockDepA_along :: Int32
_msgSsrOrbitClockDepA_radial :: Int32
_msgSsrOrbitClockDepA_iod :: Word8
_msgSsrOrbitClockDepA_iod_ssr :: Word8
_msgSsrOrbitClockDepA_update_interval :: Word8
_msgSsrOrbitClockDepA_sid :: GnssSignal
_msgSsrOrbitClockDepA_time :: GpsTimeSec
_msgSsrOrbitClockDepA_c2 :: Int32
_msgSsrOrbitClockDepA_c1 :: Int32
_msgSsrOrbitClockDepA_c0 :: Int32
_msgSsrOrbitClockDepA_dot_cross :: Int32
_msgSsrOrbitClockDepA_dot_along :: Int32
_msgSsrOrbitClockDepA_dot_radial :: Int32
_msgSsrOrbitClockDepA_cross :: Int32
_msgSsrOrbitClockDepA_along :: Int32
_msgSsrOrbitClockDepA_radial :: Int32
_msgSsrOrbitClockDepA_iod :: Word8
_msgSsrOrbitClockDepA_iod_ssr :: Word8
_msgSsrOrbitClockDepA_update_interval :: Word8
_msgSsrOrbitClockDepA_sid :: GnssSignal
_msgSsrOrbitClockDepA_time :: GpsTimeSec
..}

  put :: MsgSsrOrbitClockDepA -> Put
put MsgSsrOrbitClockDepA {Int32
Word8
GnssSignal
GpsTimeSec
_msgSsrOrbitClockDepA_c2 :: Int32
_msgSsrOrbitClockDepA_c1 :: Int32
_msgSsrOrbitClockDepA_c0 :: Int32
_msgSsrOrbitClockDepA_dot_cross :: Int32
_msgSsrOrbitClockDepA_dot_along :: Int32
_msgSsrOrbitClockDepA_dot_radial :: Int32
_msgSsrOrbitClockDepA_cross :: Int32
_msgSsrOrbitClockDepA_along :: Int32
_msgSsrOrbitClockDepA_radial :: Int32
_msgSsrOrbitClockDepA_iod :: Word8
_msgSsrOrbitClockDepA_iod_ssr :: Word8
_msgSsrOrbitClockDepA_update_interval :: Word8
_msgSsrOrbitClockDepA_sid :: GnssSignal
_msgSsrOrbitClockDepA_time :: GpsTimeSec
_msgSsrOrbitClockDepA_c2 :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_c1 :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_c0 :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_dot_cross :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_dot_along :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_dot_radial :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_cross :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_along :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_radial :: MsgSsrOrbitClockDepA -> Int32
_msgSsrOrbitClockDepA_iod :: MsgSsrOrbitClockDepA -> Word8
_msgSsrOrbitClockDepA_iod_ssr :: MsgSsrOrbitClockDepA -> Word8
_msgSsrOrbitClockDepA_update_interval :: MsgSsrOrbitClockDepA -> Word8
_msgSsrOrbitClockDepA_sid :: MsgSsrOrbitClockDepA -> GnssSignal
_msgSsrOrbitClockDepA_time :: MsgSsrOrbitClockDepA -> GpsTimeSec
..} = do
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_msgSsrOrbitClockDepA_time
    GnssSignal -> Put
forall t. Binary t => t -> Put
put GnssSignal
_msgSsrOrbitClockDepA_sid
    Word8 -> Put
putWord8 Word8
_msgSsrOrbitClockDepA_update_interval
    Word8 -> Put
putWord8 Word8
_msgSsrOrbitClockDepA_iod_ssr
    Word8 -> Put
putWord8 Word8
_msgSsrOrbitClockDepA_iod
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_radial
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_along
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_cross
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_dot_radial
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_dot_along
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_dot_cross
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_c0
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_c1
    (Word32 -> Put
putWord32le (Word32 -> Put) -> (Int32 -> Word32) -> Int32 -> Put
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Int32 -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral) Int32
_msgSsrOrbitClockDepA_c2

$(makeSBP 'msgSsrOrbitClockDepA ''MsgSsrOrbitClockDepA)
$(makeJSON "_msgSsrOrbitClockDepA_" ''MsgSsrOrbitClockDepA)
$(makeLenses ''MsgSsrOrbitClockDepA)

-- | STECHeaderDepA.
--
-- 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 STECHeaderDepA = STECHeaderDepA
  { STECHeaderDepA -> GpsTimeSec
_sTECHeaderDepA_time          :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , STECHeaderDepA -> Word8
_sTECHeaderDepA_num_msgs      :: !Word8
    -- ^ Number of messages in the dataset
  , STECHeaderDepA -> Word8
_sTECHeaderDepA_seq_num       :: !Word8
    -- ^ Position of this message in the dataset
  , STECHeaderDepA -> Word8
_sTECHeaderDepA_update_interval :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , STECHeaderDepA -> Word8
_sTECHeaderDepA_iod_atmo      :: !Word8
    -- ^ IOD of the SSR atmospheric correction
  } deriving ( Int -> STECHeaderDepA -> ShowS
[STECHeaderDepA] -> ShowS
STECHeaderDepA -> String
(Int -> STECHeaderDepA -> ShowS)
-> (STECHeaderDepA -> String)
-> ([STECHeaderDepA] -> ShowS)
-> Show STECHeaderDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [STECHeaderDepA] -> ShowS
$cshowList :: [STECHeaderDepA] -> ShowS
show :: STECHeaderDepA -> String
$cshow :: STECHeaderDepA -> String
showsPrec :: Int -> STECHeaderDepA -> ShowS
$cshowsPrec :: Int -> STECHeaderDepA -> ShowS
Show, ReadPrec [STECHeaderDepA]
ReadPrec STECHeaderDepA
Int -> ReadS STECHeaderDepA
ReadS [STECHeaderDepA]
(Int -> ReadS STECHeaderDepA)
-> ReadS [STECHeaderDepA]
-> ReadPrec STECHeaderDepA
-> ReadPrec [STECHeaderDepA]
-> Read STECHeaderDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [STECHeaderDepA]
$creadListPrec :: ReadPrec [STECHeaderDepA]
readPrec :: ReadPrec STECHeaderDepA
$creadPrec :: ReadPrec STECHeaderDepA
readList :: ReadS [STECHeaderDepA]
$creadList :: ReadS [STECHeaderDepA]
readsPrec :: Int -> ReadS STECHeaderDepA
$creadsPrec :: Int -> ReadS STECHeaderDepA
Read, STECHeaderDepA -> STECHeaderDepA -> Bool
(STECHeaderDepA -> STECHeaderDepA -> Bool)
-> (STECHeaderDepA -> STECHeaderDepA -> Bool) -> Eq STECHeaderDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: STECHeaderDepA -> STECHeaderDepA -> Bool
$c/= :: STECHeaderDepA -> STECHeaderDepA -> Bool
== :: STECHeaderDepA -> STECHeaderDepA -> Bool
$c== :: STECHeaderDepA -> STECHeaderDepA -> Bool
Eq )

instance Binary STECHeaderDepA where
  get :: Get STECHeaderDepA
get = do
    GpsTimeSec
_sTECHeaderDepA_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    Word8
_sTECHeaderDepA_num_msgs <- Get Word8
getWord8
    Word8
_sTECHeaderDepA_seq_num <- Get Word8
getWord8
    Word8
_sTECHeaderDepA_update_interval <- Get Word8
getWord8
    Word8
_sTECHeaderDepA_iod_atmo <- Get Word8
getWord8
    STECHeaderDepA -> Get STECHeaderDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure STECHeaderDepA :: GpsTimeSec -> Word8 -> Word8 -> Word8 -> Word8 -> STECHeaderDepA
STECHeaderDepA {Word8
GpsTimeSec
_sTECHeaderDepA_iod_atmo :: Word8
_sTECHeaderDepA_update_interval :: Word8
_sTECHeaderDepA_seq_num :: Word8
_sTECHeaderDepA_num_msgs :: Word8
_sTECHeaderDepA_time :: GpsTimeSec
_sTECHeaderDepA_iod_atmo :: Word8
_sTECHeaderDepA_update_interval :: Word8
_sTECHeaderDepA_seq_num :: Word8
_sTECHeaderDepA_num_msgs :: Word8
_sTECHeaderDepA_time :: GpsTimeSec
..}

  put :: STECHeaderDepA -> Put
put STECHeaderDepA {Word8
GpsTimeSec
_sTECHeaderDepA_iod_atmo :: Word8
_sTECHeaderDepA_update_interval :: Word8
_sTECHeaderDepA_seq_num :: Word8
_sTECHeaderDepA_num_msgs :: Word8
_sTECHeaderDepA_time :: GpsTimeSec
_sTECHeaderDepA_iod_atmo :: STECHeaderDepA -> Word8
_sTECHeaderDepA_update_interval :: STECHeaderDepA -> Word8
_sTECHeaderDepA_seq_num :: STECHeaderDepA -> Word8
_sTECHeaderDepA_num_msgs :: STECHeaderDepA -> Word8
_sTECHeaderDepA_time :: STECHeaderDepA -> GpsTimeSec
..} = do
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_sTECHeaderDepA_time
    Word8 -> Put
putWord8 Word8
_sTECHeaderDepA_num_msgs
    Word8 -> Put
putWord8 Word8
_sTECHeaderDepA_seq_num
    Word8 -> Put
putWord8 Word8
_sTECHeaderDepA_update_interval
    Word8 -> Put
putWord8 Word8
_sTECHeaderDepA_iod_atmo

$(makeJSON "_sTECHeaderDepA_" ''STECHeaderDepA)
$(makeLenses ''STECHeaderDepA)

-- | GriddedCorrectionHeaderDepA.
--
-- The 3GPP message contains nested variable length arrays which are not
-- supported in SBP, so each grid point will be identified by the index.
data GriddedCorrectionHeaderDepA = GriddedCorrectionHeaderDepA
  { GriddedCorrectionHeaderDepA -> GpsTimeSec
_griddedCorrectionHeaderDepA_time                  :: !GpsTimeSec
    -- ^ GNSS reference time of the correction
  , GriddedCorrectionHeaderDepA -> Word16
_griddedCorrectionHeaderDepA_num_msgs              :: !Word16
    -- ^ Number of messages in the dataset
  , GriddedCorrectionHeaderDepA -> Word16
_griddedCorrectionHeaderDepA_seq_num               :: !Word16
    -- ^ Position of this message in the dataset
  , GriddedCorrectionHeaderDepA -> Word8
_griddedCorrectionHeaderDepA_update_interval       :: !Word8
    -- ^ Update interval between consecutive corrections. Encoded following RTCM
    -- DF391 specification.
  , GriddedCorrectionHeaderDepA -> Word8
_griddedCorrectionHeaderDepA_iod_atmo              :: !Word8
    -- ^ IOD of the SSR atmospheric correction
  , GriddedCorrectionHeaderDepA -> Word8
_griddedCorrectionHeaderDepA_tropo_quality_indicator :: !Word8
    -- ^ Quality of the troposphere data. Encoded following RTCM DF389
    -- specification in units of m.
  } deriving ( Int -> GriddedCorrectionHeaderDepA -> ShowS
[GriddedCorrectionHeaderDepA] -> ShowS
GriddedCorrectionHeaderDepA -> String
(Int -> GriddedCorrectionHeaderDepA -> ShowS)
-> (GriddedCorrectionHeaderDepA -> String)
-> ([GriddedCorrectionHeaderDepA] -> ShowS)
-> Show GriddedCorrectionHeaderDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GriddedCorrectionHeaderDepA] -> ShowS
$cshowList :: [GriddedCorrectionHeaderDepA] -> ShowS
show :: GriddedCorrectionHeaderDepA -> String
$cshow :: GriddedCorrectionHeaderDepA -> String
showsPrec :: Int -> GriddedCorrectionHeaderDepA -> ShowS
$cshowsPrec :: Int -> GriddedCorrectionHeaderDepA -> ShowS
Show, ReadPrec [GriddedCorrectionHeaderDepA]
ReadPrec GriddedCorrectionHeaderDepA
Int -> ReadS GriddedCorrectionHeaderDepA
ReadS [GriddedCorrectionHeaderDepA]
(Int -> ReadS GriddedCorrectionHeaderDepA)
-> ReadS [GriddedCorrectionHeaderDepA]
-> ReadPrec GriddedCorrectionHeaderDepA
-> ReadPrec [GriddedCorrectionHeaderDepA]
-> Read GriddedCorrectionHeaderDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GriddedCorrectionHeaderDepA]
$creadListPrec :: ReadPrec [GriddedCorrectionHeaderDepA]
readPrec :: ReadPrec GriddedCorrectionHeaderDepA
$creadPrec :: ReadPrec GriddedCorrectionHeaderDepA
readList :: ReadS [GriddedCorrectionHeaderDepA]
$creadList :: ReadS [GriddedCorrectionHeaderDepA]
readsPrec :: Int -> ReadS GriddedCorrectionHeaderDepA
$creadsPrec :: Int -> ReadS GriddedCorrectionHeaderDepA
Read, GriddedCorrectionHeaderDepA -> GriddedCorrectionHeaderDepA -> Bool
(GriddedCorrectionHeaderDepA
 -> GriddedCorrectionHeaderDepA -> Bool)
-> (GriddedCorrectionHeaderDepA
    -> GriddedCorrectionHeaderDepA -> Bool)
-> Eq GriddedCorrectionHeaderDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GriddedCorrectionHeaderDepA -> GriddedCorrectionHeaderDepA -> Bool
$c/= :: GriddedCorrectionHeaderDepA -> GriddedCorrectionHeaderDepA -> Bool
== :: GriddedCorrectionHeaderDepA -> GriddedCorrectionHeaderDepA -> Bool
$c== :: GriddedCorrectionHeaderDepA -> GriddedCorrectionHeaderDepA -> Bool
Eq )

instance Binary GriddedCorrectionHeaderDepA where
  get :: Get GriddedCorrectionHeaderDepA
get = do
    GpsTimeSec
_griddedCorrectionHeaderDepA_time <- Get GpsTimeSec
forall t. Binary t => Get t
get
    Word16
_griddedCorrectionHeaderDepA_num_msgs <- Get Word16
getWord16le
    Word16
_griddedCorrectionHeaderDepA_seq_num <- Get Word16
getWord16le
    Word8
_griddedCorrectionHeaderDepA_update_interval <- Get Word8
getWord8
    Word8
_griddedCorrectionHeaderDepA_iod_atmo <- Get Word8
getWord8
    Word8
_griddedCorrectionHeaderDepA_tropo_quality_indicator <- Get Word8
getWord8
    GriddedCorrectionHeaderDepA -> Get GriddedCorrectionHeaderDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure GriddedCorrectionHeaderDepA :: GpsTimeSec
-> Word16
-> Word16
-> Word8
-> Word8
-> Word8
-> GriddedCorrectionHeaderDepA
GriddedCorrectionHeaderDepA {Word8
Word16
GpsTimeSec
_griddedCorrectionHeaderDepA_tropo_quality_indicator :: Word8
_griddedCorrectionHeaderDepA_iod_atmo :: Word8
_griddedCorrectionHeaderDepA_update_interval :: Word8
_griddedCorrectionHeaderDepA_seq_num :: Word16
_griddedCorrectionHeaderDepA_num_msgs :: Word16
_griddedCorrectionHeaderDepA_time :: GpsTimeSec
_griddedCorrectionHeaderDepA_tropo_quality_indicator :: Word8
_griddedCorrectionHeaderDepA_iod_atmo :: Word8
_griddedCorrectionHeaderDepA_update_interval :: Word8
_griddedCorrectionHeaderDepA_seq_num :: Word16
_griddedCorrectionHeaderDepA_num_msgs :: Word16
_griddedCorrectionHeaderDepA_time :: GpsTimeSec
..}

  put :: GriddedCorrectionHeaderDepA -> Put
put GriddedCorrectionHeaderDepA {Word8
Word16
GpsTimeSec
_griddedCorrectionHeaderDepA_tropo_quality_indicator :: Word8
_griddedCorrectionHeaderDepA_iod_atmo :: Word8
_griddedCorrectionHeaderDepA_update_interval :: Word8
_griddedCorrectionHeaderDepA_seq_num :: Word16
_griddedCorrectionHeaderDepA_num_msgs :: Word16
_griddedCorrectionHeaderDepA_time :: GpsTimeSec
_griddedCorrectionHeaderDepA_tropo_quality_indicator :: GriddedCorrectionHeaderDepA -> Word8
_griddedCorrectionHeaderDepA_iod_atmo :: GriddedCorrectionHeaderDepA -> Word8
_griddedCorrectionHeaderDepA_update_interval :: GriddedCorrectionHeaderDepA -> Word8
_griddedCorrectionHeaderDepA_seq_num :: GriddedCorrectionHeaderDepA -> Word16
_griddedCorrectionHeaderDepA_num_msgs :: GriddedCorrectionHeaderDepA -> Word16
_griddedCorrectionHeaderDepA_time :: GriddedCorrectionHeaderDepA -> GpsTimeSec
..} = do
    GpsTimeSec -> Put
forall t. Binary t => t -> Put
put GpsTimeSec
_griddedCorrectionHeaderDepA_time
    Word16 -> Put
putWord16le Word16
_griddedCorrectionHeaderDepA_num_msgs
    Word16 -> Put
putWord16le Word16
_griddedCorrectionHeaderDepA_seq_num
    Word8 -> Put
putWord8 Word8
_griddedCorrectionHeaderDepA_update_interval
    Word8 -> Put
putWord8 Word8
_griddedCorrectionHeaderDepA_iod_atmo
    Word8 -> Put
putWord8 Word8
_griddedCorrectionHeaderDepA_tropo_quality_indicator

$(makeJSON "_griddedCorrectionHeaderDepA_" ''GriddedCorrectionHeaderDepA)
$(makeLenses ''GriddedCorrectionHeaderDepA)

-- | GridDefinitionHeaderDepA.
--
-- Defines the grid for MSG_SSR_GRIDDED_CORRECTION messages. Also includes an
-- RLE encoded validity list.
data GridDefinitionHeaderDepA = GridDefinitionHeaderDepA
  { GridDefinitionHeaderDepA -> Word8
_gridDefinitionHeaderDepA_region_size_inverse :: !Word8
    -- ^ region_size (deg) = 10 / region_size_inverse 0 is an invalid value.
  , GridDefinitionHeaderDepA -> Word16
_gridDefinitionHeaderDepA_area_width        :: !Word16
    -- ^ grid height (deg) = grid width (deg) = area_width / region_size 0 is an
    -- invalid value.
  , GridDefinitionHeaderDepA -> Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc :: !Word16
    -- ^ North-West corner latitude (deg) = region_size * lat_nw_corner_enc - 90
  , GridDefinitionHeaderDepA -> Word16
_gridDefinitionHeaderDepA_lon_nw_corner_enc :: !Word16
    -- ^ North-West corner longitude (deg) = region_size * lon_nw_corner_enc -
    -- 180
  , GridDefinitionHeaderDepA -> Word8
_gridDefinitionHeaderDepA_num_msgs          :: !Word8
    -- ^ Number of messages in the dataset
  , GridDefinitionHeaderDepA -> Word8
_gridDefinitionHeaderDepA_seq_num           :: !Word8
    -- ^ Position of this message in the dataset
  } deriving ( Int -> GridDefinitionHeaderDepA -> ShowS
[GridDefinitionHeaderDepA] -> ShowS
GridDefinitionHeaderDepA -> String
(Int -> GridDefinitionHeaderDepA -> ShowS)
-> (GridDefinitionHeaderDepA -> String)
-> ([GridDefinitionHeaderDepA] -> ShowS)
-> Show GridDefinitionHeaderDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GridDefinitionHeaderDepA] -> ShowS
$cshowList :: [GridDefinitionHeaderDepA] -> ShowS
show :: GridDefinitionHeaderDepA -> String
$cshow :: GridDefinitionHeaderDepA -> String
showsPrec :: Int -> GridDefinitionHeaderDepA -> ShowS
$cshowsPrec :: Int -> GridDefinitionHeaderDepA -> ShowS
Show, ReadPrec [GridDefinitionHeaderDepA]
ReadPrec GridDefinitionHeaderDepA
Int -> ReadS GridDefinitionHeaderDepA
ReadS [GridDefinitionHeaderDepA]
(Int -> ReadS GridDefinitionHeaderDepA)
-> ReadS [GridDefinitionHeaderDepA]
-> ReadPrec GridDefinitionHeaderDepA
-> ReadPrec [GridDefinitionHeaderDepA]
-> Read GridDefinitionHeaderDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GridDefinitionHeaderDepA]
$creadListPrec :: ReadPrec [GridDefinitionHeaderDepA]
readPrec :: ReadPrec GridDefinitionHeaderDepA
$creadPrec :: ReadPrec GridDefinitionHeaderDepA
readList :: ReadS [GridDefinitionHeaderDepA]
$creadList :: ReadS [GridDefinitionHeaderDepA]
readsPrec :: Int -> ReadS GridDefinitionHeaderDepA
$creadsPrec :: Int -> ReadS GridDefinitionHeaderDepA
Read, GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool
(GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool)
-> (GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool)
-> Eq GridDefinitionHeaderDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool
$c/= :: GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool
== :: GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool
$c== :: GridDefinitionHeaderDepA -> GridDefinitionHeaderDepA -> Bool
Eq )

instance Binary GridDefinitionHeaderDepA where
  get :: Get GridDefinitionHeaderDepA
get = do
    Word8
_gridDefinitionHeaderDepA_region_size_inverse <- Get Word8
getWord8
    Word16
_gridDefinitionHeaderDepA_area_width <- Get Word16
getWord16le
    Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc <- Get Word16
getWord16le
    Word16
_gridDefinitionHeaderDepA_lon_nw_corner_enc <- Get Word16
getWord16le
    Word8
_gridDefinitionHeaderDepA_num_msgs <- Get Word8
getWord8
    Word8
_gridDefinitionHeaderDepA_seq_num <- Get Word8
getWord8
    GridDefinitionHeaderDepA -> Get GridDefinitionHeaderDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure GridDefinitionHeaderDepA :: Word8
-> Word16
-> Word16
-> Word16
-> Word8
-> Word8
-> GridDefinitionHeaderDepA
GridDefinitionHeaderDepA {Word8
Word16
_gridDefinitionHeaderDepA_seq_num :: Word8
_gridDefinitionHeaderDepA_num_msgs :: Word8
_gridDefinitionHeaderDepA_lon_nw_corner_enc :: Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc :: Word16
_gridDefinitionHeaderDepA_area_width :: Word16
_gridDefinitionHeaderDepA_region_size_inverse :: Word8
_gridDefinitionHeaderDepA_seq_num :: Word8
_gridDefinitionHeaderDepA_num_msgs :: Word8
_gridDefinitionHeaderDepA_lon_nw_corner_enc :: Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc :: Word16
_gridDefinitionHeaderDepA_area_width :: Word16
_gridDefinitionHeaderDepA_region_size_inverse :: Word8
..}

  put :: GridDefinitionHeaderDepA -> Put
put GridDefinitionHeaderDepA {Word8
Word16
_gridDefinitionHeaderDepA_seq_num :: Word8
_gridDefinitionHeaderDepA_num_msgs :: Word8
_gridDefinitionHeaderDepA_lon_nw_corner_enc :: Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc :: Word16
_gridDefinitionHeaderDepA_area_width :: Word16
_gridDefinitionHeaderDepA_region_size_inverse :: Word8
_gridDefinitionHeaderDepA_seq_num :: GridDefinitionHeaderDepA -> Word8
_gridDefinitionHeaderDepA_num_msgs :: GridDefinitionHeaderDepA -> Word8
_gridDefinitionHeaderDepA_lon_nw_corner_enc :: GridDefinitionHeaderDepA -> Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc :: GridDefinitionHeaderDepA -> Word16
_gridDefinitionHeaderDepA_area_width :: GridDefinitionHeaderDepA -> Word16
_gridDefinitionHeaderDepA_region_size_inverse :: GridDefinitionHeaderDepA -> Word8
..} = do
    Word8 -> Put
putWord8 Word8
_gridDefinitionHeaderDepA_region_size_inverse
    Word16 -> Put
putWord16le Word16
_gridDefinitionHeaderDepA_area_width
    Word16 -> Put
putWord16le Word16
_gridDefinitionHeaderDepA_lat_nw_corner_enc
    Word16 -> Put
putWord16le Word16
_gridDefinitionHeaderDepA_lon_nw_corner_enc
    Word8 -> Put
putWord8 Word8
_gridDefinitionHeaderDepA_num_msgs
    Word8 -> Put
putWord8 Word8
_gridDefinitionHeaderDepA_seq_num

$(makeJSON "_gridDefinitionHeaderDepA_" ''GridDefinitionHeaderDepA)
$(makeLenses ''GridDefinitionHeaderDepA)

msgSsrStecCorrectionDepA :: Word16
msgSsrStecCorrectionDepA :: Word16
msgSsrStecCorrectionDepA = Word16
0x05EB

data MsgSsrStecCorrectionDepA = MsgSsrStecCorrectionDepA
  { MsgSsrStecCorrectionDepA -> STECHeaderDepA
_msgSsrStecCorrectionDepA_header      :: !STECHeaderDepA
    -- ^ Header of a STEC message
  , MsgSsrStecCorrectionDepA -> [STECSatElement]
_msgSsrStecCorrectionDepA_stec_sat_list :: ![STECSatElement]
    -- ^ Array of STEC information for each space vehicle
  } deriving ( Int -> MsgSsrStecCorrectionDepA -> ShowS
[MsgSsrStecCorrectionDepA] -> ShowS
MsgSsrStecCorrectionDepA -> String
(Int -> MsgSsrStecCorrectionDepA -> ShowS)
-> (MsgSsrStecCorrectionDepA -> String)
-> ([MsgSsrStecCorrectionDepA] -> ShowS)
-> Show MsgSsrStecCorrectionDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrStecCorrectionDepA] -> ShowS
$cshowList :: [MsgSsrStecCorrectionDepA] -> ShowS
show :: MsgSsrStecCorrectionDepA -> String
$cshow :: MsgSsrStecCorrectionDepA -> String
showsPrec :: Int -> MsgSsrStecCorrectionDepA -> ShowS
$cshowsPrec :: Int -> MsgSsrStecCorrectionDepA -> ShowS
Show, ReadPrec [MsgSsrStecCorrectionDepA]
ReadPrec MsgSsrStecCorrectionDepA
Int -> ReadS MsgSsrStecCorrectionDepA
ReadS [MsgSsrStecCorrectionDepA]
(Int -> ReadS MsgSsrStecCorrectionDepA)
-> ReadS [MsgSsrStecCorrectionDepA]
-> ReadPrec MsgSsrStecCorrectionDepA
-> ReadPrec [MsgSsrStecCorrectionDepA]
-> Read MsgSsrStecCorrectionDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrStecCorrectionDepA]
$creadListPrec :: ReadPrec [MsgSsrStecCorrectionDepA]
readPrec :: ReadPrec MsgSsrStecCorrectionDepA
$creadPrec :: ReadPrec MsgSsrStecCorrectionDepA
readList :: ReadS [MsgSsrStecCorrectionDepA]
$creadList :: ReadS [MsgSsrStecCorrectionDepA]
readsPrec :: Int -> ReadS MsgSsrStecCorrectionDepA
$creadsPrec :: Int -> ReadS MsgSsrStecCorrectionDepA
Read, MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool
(MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool)
-> (MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool)
-> Eq MsgSsrStecCorrectionDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool
$c/= :: MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool
== :: MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool
$c== :: MsgSsrStecCorrectionDepA -> MsgSsrStecCorrectionDepA -> Bool
Eq )

instance Binary MsgSsrStecCorrectionDepA where
  get :: Get MsgSsrStecCorrectionDepA
get = do
    STECHeaderDepA
_msgSsrStecCorrectionDepA_header <- Get STECHeaderDepA
forall t. Binary t => Get t
get
    [STECSatElement]
_msgSsrStecCorrectionDepA_stec_sat_list <- Get Bool -> Get STECSatElement -> Get [STECSatElement]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get STECSatElement
forall t. Binary t => Get t
get
    MsgSsrStecCorrectionDepA -> Get MsgSsrStecCorrectionDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrStecCorrectionDepA :: STECHeaderDepA -> [STECSatElement] -> MsgSsrStecCorrectionDepA
MsgSsrStecCorrectionDepA {[STECSatElement]
STECHeaderDepA
_msgSsrStecCorrectionDepA_stec_sat_list :: [STECSatElement]
_msgSsrStecCorrectionDepA_header :: STECHeaderDepA
_msgSsrStecCorrectionDepA_stec_sat_list :: [STECSatElement]
_msgSsrStecCorrectionDepA_header :: STECHeaderDepA
..}

  put :: MsgSsrStecCorrectionDepA -> Put
put MsgSsrStecCorrectionDepA {[STECSatElement]
STECHeaderDepA
_msgSsrStecCorrectionDepA_stec_sat_list :: [STECSatElement]
_msgSsrStecCorrectionDepA_header :: STECHeaderDepA
_msgSsrStecCorrectionDepA_stec_sat_list :: MsgSsrStecCorrectionDepA -> [STECSatElement]
_msgSsrStecCorrectionDepA_header :: MsgSsrStecCorrectionDepA -> STECHeaderDepA
..} = do
    STECHeaderDepA -> Put
forall t. Binary t => t -> Put
put STECHeaderDepA
_msgSsrStecCorrectionDepA_header
    (STECSatElement -> Put) -> [STECSatElement] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ STECSatElement -> Put
forall t. Binary t => t -> Put
put [STECSatElement]
_msgSsrStecCorrectionDepA_stec_sat_list

$(makeSBP 'msgSsrStecCorrectionDepA ''MsgSsrStecCorrectionDepA)
$(makeJSON "_msgSsrStecCorrectionDepA_" ''MsgSsrStecCorrectionDepA)
$(makeLenses ''MsgSsrStecCorrectionDepA)

msgSsrGriddedCorrectionNoStdDepA :: Word16
msgSsrGriddedCorrectionNoStdDepA :: Word16
msgSsrGriddedCorrectionNoStdDepA = Word16
0x05F0

data MsgSsrGriddedCorrectionNoStdDepA = MsgSsrGriddedCorrectionNoStdDepA
  { MsgSsrGriddedCorrectionNoStdDepA -> GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_header               :: !GriddedCorrectionHeaderDepA
    -- ^ Header of a Gridded Correction message
  , MsgSsrGriddedCorrectionNoStdDepA -> Word16
_msgSsrGriddedCorrectionNoStdDepA_index                :: !Word16
    -- ^ Index of the grid point
  , MsgSsrGriddedCorrectionNoStdDepA
-> TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction :: !TroposphericDelayCorrectionNoStd
    -- ^ Wet and hydrostatic vertical delays
  , MsgSsrGriddedCorrectionNoStdDepA -> [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals       :: ![STECResidualNoStd]
    -- ^ STEC residuals for each satellite
  } deriving ( Int -> MsgSsrGriddedCorrectionNoStdDepA -> ShowS
[MsgSsrGriddedCorrectionNoStdDepA] -> ShowS
MsgSsrGriddedCorrectionNoStdDepA -> String
(Int -> MsgSsrGriddedCorrectionNoStdDepA -> ShowS)
-> (MsgSsrGriddedCorrectionNoStdDepA -> String)
-> ([MsgSsrGriddedCorrectionNoStdDepA] -> ShowS)
-> Show MsgSsrGriddedCorrectionNoStdDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrGriddedCorrectionNoStdDepA] -> ShowS
$cshowList :: [MsgSsrGriddedCorrectionNoStdDepA] -> ShowS
show :: MsgSsrGriddedCorrectionNoStdDepA -> String
$cshow :: MsgSsrGriddedCorrectionNoStdDepA -> String
showsPrec :: Int -> MsgSsrGriddedCorrectionNoStdDepA -> ShowS
$cshowsPrec :: Int -> MsgSsrGriddedCorrectionNoStdDepA -> ShowS
Show, ReadPrec [MsgSsrGriddedCorrectionNoStdDepA]
ReadPrec MsgSsrGriddedCorrectionNoStdDepA
Int -> ReadS MsgSsrGriddedCorrectionNoStdDepA
ReadS [MsgSsrGriddedCorrectionNoStdDepA]
(Int -> ReadS MsgSsrGriddedCorrectionNoStdDepA)
-> ReadS [MsgSsrGriddedCorrectionNoStdDepA]
-> ReadPrec MsgSsrGriddedCorrectionNoStdDepA
-> ReadPrec [MsgSsrGriddedCorrectionNoStdDepA]
-> Read MsgSsrGriddedCorrectionNoStdDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrGriddedCorrectionNoStdDepA]
$creadListPrec :: ReadPrec [MsgSsrGriddedCorrectionNoStdDepA]
readPrec :: ReadPrec MsgSsrGriddedCorrectionNoStdDepA
$creadPrec :: ReadPrec MsgSsrGriddedCorrectionNoStdDepA
readList :: ReadS [MsgSsrGriddedCorrectionNoStdDepA]
$creadList :: ReadS [MsgSsrGriddedCorrectionNoStdDepA]
readsPrec :: Int -> ReadS MsgSsrGriddedCorrectionNoStdDepA
$creadsPrec :: Int -> ReadS MsgSsrGriddedCorrectionNoStdDepA
Read, MsgSsrGriddedCorrectionNoStdDepA
-> MsgSsrGriddedCorrectionNoStdDepA -> Bool
(MsgSsrGriddedCorrectionNoStdDepA
 -> MsgSsrGriddedCorrectionNoStdDepA -> Bool)
-> (MsgSsrGriddedCorrectionNoStdDepA
    -> MsgSsrGriddedCorrectionNoStdDepA -> Bool)
-> Eq MsgSsrGriddedCorrectionNoStdDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrGriddedCorrectionNoStdDepA
-> MsgSsrGriddedCorrectionNoStdDepA -> Bool
$c/= :: MsgSsrGriddedCorrectionNoStdDepA
-> MsgSsrGriddedCorrectionNoStdDepA -> Bool
== :: MsgSsrGriddedCorrectionNoStdDepA
-> MsgSsrGriddedCorrectionNoStdDepA -> Bool
$c== :: MsgSsrGriddedCorrectionNoStdDepA
-> MsgSsrGriddedCorrectionNoStdDepA -> Bool
Eq )

instance Binary MsgSsrGriddedCorrectionNoStdDepA where
  get :: Get MsgSsrGriddedCorrectionNoStdDepA
get = do
    GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_header <- Get GriddedCorrectionHeaderDepA
forall t. Binary t => Get t
get
    Word16
_msgSsrGriddedCorrectionNoStdDepA_index <- Get Word16
getWord16le
    TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction <- Get TroposphericDelayCorrectionNoStd
forall t. Binary t => Get t
get
    [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals <- Get Bool -> Get STECResidualNoStd -> Get [STECResidualNoStd]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get STECResidualNoStd
forall t. Binary t => Get t
get
    MsgSsrGriddedCorrectionNoStdDepA
-> Get MsgSsrGriddedCorrectionNoStdDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrGriddedCorrectionNoStdDepA :: GriddedCorrectionHeaderDepA
-> Word16
-> TroposphericDelayCorrectionNoStd
-> [STECResidualNoStd]
-> MsgSsrGriddedCorrectionNoStdDepA
MsgSsrGriddedCorrectionNoStdDepA {[STECResidualNoStd]
Word16
TroposphericDelayCorrectionNoStd
GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals :: [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction :: TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_index :: Word16
_msgSsrGriddedCorrectionNoStdDepA_header :: GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals :: [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction :: TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_index :: Word16
_msgSsrGriddedCorrectionNoStdDepA_header :: GriddedCorrectionHeaderDepA
..}

  put :: MsgSsrGriddedCorrectionNoStdDepA -> Put
put MsgSsrGriddedCorrectionNoStdDepA {[STECResidualNoStd]
Word16
TroposphericDelayCorrectionNoStd
GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals :: [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction :: TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_index :: Word16
_msgSsrGriddedCorrectionNoStdDepA_header :: GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals :: MsgSsrGriddedCorrectionNoStdDepA -> [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction :: MsgSsrGriddedCorrectionNoStdDepA
-> TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_index :: MsgSsrGriddedCorrectionNoStdDepA -> Word16
_msgSsrGriddedCorrectionNoStdDepA_header :: MsgSsrGriddedCorrectionNoStdDepA -> GriddedCorrectionHeaderDepA
..} = do
    GriddedCorrectionHeaderDepA -> Put
forall t. Binary t => t -> Put
put GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionNoStdDepA_header
    Word16 -> Put
putWord16le Word16
_msgSsrGriddedCorrectionNoStdDepA_index
    TroposphericDelayCorrectionNoStd -> Put
forall t. Binary t => t -> Put
put TroposphericDelayCorrectionNoStd
_msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction
    (STECResidualNoStd -> Put) -> [STECResidualNoStd] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ STECResidualNoStd -> Put
forall t. Binary t => t -> Put
put [STECResidualNoStd]
_msgSsrGriddedCorrectionNoStdDepA_stec_residuals

$(makeSBP 'msgSsrGriddedCorrectionNoStdDepA ''MsgSsrGriddedCorrectionNoStdDepA)
$(makeJSON "_msgSsrGriddedCorrectionNoStdDepA_" ''MsgSsrGriddedCorrectionNoStdDepA)
$(makeLenses ''MsgSsrGriddedCorrectionNoStdDepA)

msgSsrGriddedCorrectionDepA :: Word16
msgSsrGriddedCorrectionDepA :: Word16
msgSsrGriddedCorrectionDepA = Word16
0x05FA

data MsgSsrGriddedCorrectionDepA = MsgSsrGriddedCorrectionDepA
  { MsgSsrGriddedCorrectionDepA -> GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_header               :: !GriddedCorrectionHeaderDepA
    -- ^ Header of a Gridded Correction message
  , MsgSsrGriddedCorrectionDepA -> Word16
_msgSsrGriddedCorrectionDepA_index                :: !Word16
    -- ^ Index of the grid point
  , MsgSsrGriddedCorrectionDepA -> TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_tropo_delay_correction :: !TroposphericDelayCorrection
    -- ^ Wet and hydrostatic vertical delays (mean, stddev)
  , MsgSsrGriddedCorrectionDepA -> [STECResidual]
_msgSsrGriddedCorrectionDepA_stec_residuals       :: ![STECResidual]
    -- ^ STEC residuals for each satellite (mean, stddev)
  } deriving ( Int -> MsgSsrGriddedCorrectionDepA -> ShowS
[MsgSsrGriddedCorrectionDepA] -> ShowS
MsgSsrGriddedCorrectionDepA -> String
(Int -> MsgSsrGriddedCorrectionDepA -> ShowS)
-> (MsgSsrGriddedCorrectionDepA -> String)
-> ([MsgSsrGriddedCorrectionDepA] -> ShowS)
-> Show MsgSsrGriddedCorrectionDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrGriddedCorrectionDepA] -> ShowS
$cshowList :: [MsgSsrGriddedCorrectionDepA] -> ShowS
show :: MsgSsrGriddedCorrectionDepA -> String
$cshow :: MsgSsrGriddedCorrectionDepA -> String
showsPrec :: Int -> MsgSsrGriddedCorrectionDepA -> ShowS
$cshowsPrec :: Int -> MsgSsrGriddedCorrectionDepA -> ShowS
Show, ReadPrec [MsgSsrGriddedCorrectionDepA]
ReadPrec MsgSsrGriddedCorrectionDepA
Int -> ReadS MsgSsrGriddedCorrectionDepA
ReadS [MsgSsrGriddedCorrectionDepA]
(Int -> ReadS MsgSsrGriddedCorrectionDepA)
-> ReadS [MsgSsrGriddedCorrectionDepA]
-> ReadPrec MsgSsrGriddedCorrectionDepA
-> ReadPrec [MsgSsrGriddedCorrectionDepA]
-> Read MsgSsrGriddedCorrectionDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrGriddedCorrectionDepA]
$creadListPrec :: ReadPrec [MsgSsrGriddedCorrectionDepA]
readPrec :: ReadPrec MsgSsrGriddedCorrectionDepA
$creadPrec :: ReadPrec MsgSsrGriddedCorrectionDepA
readList :: ReadS [MsgSsrGriddedCorrectionDepA]
$creadList :: ReadS [MsgSsrGriddedCorrectionDepA]
readsPrec :: Int -> ReadS MsgSsrGriddedCorrectionDepA
$creadsPrec :: Int -> ReadS MsgSsrGriddedCorrectionDepA
Read, MsgSsrGriddedCorrectionDepA -> MsgSsrGriddedCorrectionDepA -> Bool
(MsgSsrGriddedCorrectionDepA
 -> MsgSsrGriddedCorrectionDepA -> Bool)
-> (MsgSsrGriddedCorrectionDepA
    -> MsgSsrGriddedCorrectionDepA -> Bool)
-> Eq MsgSsrGriddedCorrectionDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrGriddedCorrectionDepA -> MsgSsrGriddedCorrectionDepA -> Bool
$c/= :: MsgSsrGriddedCorrectionDepA -> MsgSsrGriddedCorrectionDepA -> Bool
== :: MsgSsrGriddedCorrectionDepA -> MsgSsrGriddedCorrectionDepA -> Bool
$c== :: MsgSsrGriddedCorrectionDepA -> MsgSsrGriddedCorrectionDepA -> Bool
Eq )

instance Binary MsgSsrGriddedCorrectionDepA where
  get :: Get MsgSsrGriddedCorrectionDepA
get = do
    GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_header <- Get GriddedCorrectionHeaderDepA
forall t. Binary t => Get t
get
    Word16
_msgSsrGriddedCorrectionDepA_index <- Get Word16
getWord16le
    TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_tropo_delay_correction <- Get TroposphericDelayCorrection
forall t. Binary t => Get t
get
    [STECResidual]
_msgSsrGriddedCorrectionDepA_stec_residuals <- Get Bool -> Get STECResidual -> Get [STECResidual]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get STECResidual
forall t. Binary t => Get t
get
    MsgSsrGriddedCorrectionDepA -> Get MsgSsrGriddedCorrectionDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrGriddedCorrectionDepA :: GriddedCorrectionHeaderDepA
-> Word16
-> TroposphericDelayCorrection
-> [STECResidual]
-> MsgSsrGriddedCorrectionDepA
MsgSsrGriddedCorrectionDepA {[STECResidual]
Word16
TroposphericDelayCorrection
GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_stec_residuals :: [STECResidual]
_msgSsrGriddedCorrectionDepA_tropo_delay_correction :: TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_index :: Word16
_msgSsrGriddedCorrectionDepA_header :: GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_stec_residuals :: [STECResidual]
_msgSsrGriddedCorrectionDepA_tropo_delay_correction :: TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_index :: Word16
_msgSsrGriddedCorrectionDepA_header :: GriddedCorrectionHeaderDepA
..}

  put :: MsgSsrGriddedCorrectionDepA -> Put
put MsgSsrGriddedCorrectionDepA {[STECResidual]
Word16
TroposphericDelayCorrection
GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_stec_residuals :: [STECResidual]
_msgSsrGriddedCorrectionDepA_tropo_delay_correction :: TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_index :: Word16
_msgSsrGriddedCorrectionDepA_header :: GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_stec_residuals :: MsgSsrGriddedCorrectionDepA -> [STECResidual]
_msgSsrGriddedCorrectionDepA_tropo_delay_correction :: MsgSsrGriddedCorrectionDepA -> TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_index :: MsgSsrGriddedCorrectionDepA -> Word16
_msgSsrGriddedCorrectionDepA_header :: MsgSsrGriddedCorrectionDepA -> GriddedCorrectionHeaderDepA
..} = do
    GriddedCorrectionHeaderDepA -> Put
forall t. Binary t => t -> Put
put GriddedCorrectionHeaderDepA
_msgSsrGriddedCorrectionDepA_header
    Word16 -> Put
putWord16le Word16
_msgSsrGriddedCorrectionDepA_index
    TroposphericDelayCorrection -> Put
forall t. Binary t => t -> Put
put TroposphericDelayCorrection
_msgSsrGriddedCorrectionDepA_tropo_delay_correction
    (STECResidual -> Put) -> [STECResidual] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ STECResidual -> Put
forall t. Binary t => t -> Put
put [STECResidual]
_msgSsrGriddedCorrectionDepA_stec_residuals

$(makeSBP 'msgSsrGriddedCorrectionDepA ''MsgSsrGriddedCorrectionDepA)
$(makeJSON "_msgSsrGriddedCorrectionDepA_" ''MsgSsrGriddedCorrectionDepA)
$(makeLenses ''MsgSsrGriddedCorrectionDepA)

msgSsrGridDefinitionDepA :: Word16
msgSsrGridDefinitionDepA :: Word16
msgSsrGridDefinitionDepA = Word16
0x05F5

data MsgSsrGridDefinitionDepA = MsgSsrGridDefinitionDepA
  { MsgSsrGridDefinitionDepA -> GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_header :: !GridDefinitionHeaderDepA
    -- ^ Header of a Gridded Correction message
  , MsgSsrGridDefinitionDepA -> [Word8]
_msgSsrGridDefinitionDepA_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 ( Int -> MsgSsrGridDefinitionDepA -> ShowS
[MsgSsrGridDefinitionDepA] -> ShowS
MsgSsrGridDefinitionDepA -> String
(Int -> MsgSsrGridDefinitionDepA -> ShowS)
-> (MsgSsrGridDefinitionDepA -> String)
-> ([MsgSsrGridDefinitionDepA] -> ShowS)
-> Show MsgSsrGridDefinitionDepA
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrGridDefinitionDepA] -> ShowS
$cshowList :: [MsgSsrGridDefinitionDepA] -> ShowS
show :: MsgSsrGridDefinitionDepA -> String
$cshow :: MsgSsrGridDefinitionDepA -> String
showsPrec :: Int -> MsgSsrGridDefinitionDepA -> ShowS
$cshowsPrec :: Int -> MsgSsrGridDefinitionDepA -> ShowS
Show, ReadPrec [MsgSsrGridDefinitionDepA]
ReadPrec MsgSsrGridDefinitionDepA
Int -> ReadS MsgSsrGridDefinitionDepA
ReadS [MsgSsrGridDefinitionDepA]
(Int -> ReadS MsgSsrGridDefinitionDepA)
-> ReadS [MsgSsrGridDefinitionDepA]
-> ReadPrec MsgSsrGridDefinitionDepA
-> ReadPrec [MsgSsrGridDefinitionDepA]
-> Read MsgSsrGridDefinitionDepA
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrGridDefinitionDepA]
$creadListPrec :: ReadPrec [MsgSsrGridDefinitionDepA]
readPrec :: ReadPrec MsgSsrGridDefinitionDepA
$creadPrec :: ReadPrec MsgSsrGridDefinitionDepA
readList :: ReadS [MsgSsrGridDefinitionDepA]
$creadList :: ReadS [MsgSsrGridDefinitionDepA]
readsPrec :: Int -> ReadS MsgSsrGridDefinitionDepA
$creadsPrec :: Int -> ReadS MsgSsrGridDefinitionDepA
Read, MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool
(MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool)
-> (MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool)
-> Eq MsgSsrGridDefinitionDepA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool
$c/= :: MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool
== :: MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool
$c== :: MsgSsrGridDefinitionDepA -> MsgSsrGridDefinitionDepA -> Bool
Eq )

instance Binary MsgSsrGridDefinitionDepA where
  get :: Get MsgSsrGridDefinitionDepA
get = do
    GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_header <- Get GridDefinitionHeaderDepA
forall t. Binary t => Get t
get
    [Word8]
_msgSsrGridDefinitionDepA_rle_list <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrGridDefinitionDepA -> Get MsgSsrGridDefinitionDepA
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrGridDefinitionDepA :: GridDefinitionHeaderDepA -> [Word8] -> MsgSsrGridDefinitionDepA
MsgSsrGridDefinitionDepA {[Word8]
GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_rle_list :: [Word8]
_msgSsrGridDefinitionDepA_header :: GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_rle_list :: [Word8]
_msgSsrGridDefinitionDepA_header :: GridDefinitionHeaderDepA
..}

  put :: MsgSsrGridDefinitionDepA -> Put
put MsgSsrGridDefinitionDepA {[Word8]
GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_rle_list :: [Word8]
_msgSsrGridDefinitionDepA_header :: GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_rle_list :: MsgSsrGridDefinitionDepA -> [Word8]
_msgSsrGridDefinitionDepA_header :: MsgSsrGridDefinitionDepA -> GridDefinitionHeaderDepA
..} = do
    GridDefinitionHeaderDepA -> Put
forall t. Binary t => t -> Put
put GridDefinitionHeaderDepA
_msgSsrGridDefinitionDepA_header
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrGridDefinitionDepA_rle_list

$(makeSBP 'msgSsrGridDefinitionDepA ''MsgSsrGridDefinitionDepA)
$(makeJSON "_msgSsrGridDefinitionDepA_" ''MsgSsrGridDefinitionDepA)
$(makeLenses ''MsgSsrGridDefinitionDepA)

msgSsrOrbitClockBounds :: Word16
msgSsrOrbitClockBounds :: Word16
msgSsrOrbitClockBounds = Word16
0x05DE

data MsgSsrOrbitClockBounds = MsgSsrOrbitClockBounds
  { MsgSsrOrbitClockBounds -> [Word8]
_msgSsrOrbitClockBounds_stub :: ![Word8]
  } deriving ( Int -> MsgSsrOrbitClockBounds -> ShowS
[MsgSsrOrbitClockBounds] -> ShowS
MsgSsrOrbitClockBounds -> String
(Int -> MsgSsrOrbitClockBounds -> ShowS)
-> (MsgSsrOrbitClockBounds -> String)
-> ([MsgSsrOrbitClockBounds] -> ShowS)
-> Show MsgSsrOrbitClockBounds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrOrbitClockBounds] -> ShowS
$cshowList :: [MsgSsrOrbitClockBounds] -> ShowS
show :: MsgSsrOrbitClockBounds -> String
$cshow :: MsgSsrOrbitClockBounds -> String
showsPrec :: Int -> MsgSsrOrbitClockBounds -> ShowS
$cshowsPrec :: Int -> MsgSsrOrbitClockBounds -> ShowS
Show, ReadPrec [MsgSsrOrbitClockBounds]
ReadPrec MsgSsrOrbitClockBounds
Int -> ReadS MsgSsrOrbitClockBounds
ReadS [MsgSsrOrbitClockBounds]
(Int -> ReadS MsgSsrOrbitClockBounds)
-> ReadS [MsgSsrOrbitClockBounds]
-> ReadPrec MsgSsrOrbitClockBounds
-> ReadPrec [MsgSsrOrbitClockBounds]
-> Read MsgSsrOrbitClockBounds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrOrbitClockBounds]
$creadListPrec :: ReadPrec [MsgSsrOrbitClockBounds]
readPrec :: ReadPrec MsgSsrOrbitClockBounds
$creadPrec :: ReadPrec MsgSsrOrbitClockBounds
readList :: ReadS [MsgSsrOrbitClockBounds]
$creadList :: ReadS [MsgSsrOrbitClockBounds]
readsPrec :: Int -> ReadS MsgSsrOrbitClockBounds
$creadsPrec :: Int -> ReadS MsgSsrOrbitClockBounds
Read, MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool
(MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool)
-> (MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool)
-> Eq MsgSsrOrbitClockBounds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool
$c/= :: MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool
== :: MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool
$c== :: MsgSsrOrbitClockBounds -> MsgSsrOrbitClockBounds -> Bool
Eq )

instance Binary MsgSsrOrbitClockBounds where
  get :: Get MsgSsrOrbitClockBounds
get = do
    [Word8]
_msgSsrOrbitClockBounds_stub <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrOrbitClockBounds -> Get MsgSsrOrbitClockBounds
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrOrbitClockBounds :: [Word8] -> MsgSsrOrbitClockBounds
MsgSsrOrbitClockBounds {[Word8]
_msgSsrOrbitClockBounds_stub :: [Word8]
_msgSsrOrbitClockBounds_stub :: [Word8]
..}

  put :: MsgSsrOrbitClockBounds -> Put
put MsgSsrOrbitClockBounds {[Word8]
_msgSsrOrbitClockBounds_stub :: [Word8]
_msgSsrOrbitClockBounds_stub :: MsgSsrOrbitClockBounds -> [Word8]
..} = do
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrOrbitClockBounds_stub

$(makeSBP 'msgSsrOrbitClockBounds ''MsgSsrOrbitClockBounds)
$(makeJSON "_msgSsrOrbitClockBounds_" ''MsgSsrOrbitClockBounds)
$(makeLenses ''MsgSsrOrbitClockBounds)

msgSsrCodePhaseBiasesBounds :: Word16
msgSsrCodePhaseBiasesBounds :: Word16
msgSsrCodePhaseBiasesBounds = Word16
0x05EC

data MsgSsrCodePhaseBiasesBounds = MsgSsrCodePhaseBiasesBounds
  { MsgSsrCodePhaseBiasesBounds -> [Word8]
_msgSsrCodePhaseBiasesBounds_stub :: ![Word8]
  } deriving ( Int -> MsgSsrCodePhaseBiasesBounds -> ShowS
[MsgSsrCodePhaseBiasesBounds] -> ShowS
MsgSsrCodePhaseBiasesBounds -> String
(Int -> MsgSsrCodePhaseBiasesBounds -> ShowS)
-> (MsgSsrCodePhaseBiasesBounds -> String)
-> ([MsgSsrCodePhaseBiasesBounds] -> ShowS)
-> Show MsgSsrCodePhaseBiasesBounds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrCodePhaseBiasesBounds] -> ShowS
$cshowList :: [MsgSsrCodePhaseBiasesBounds] -> ShowS
show :: MsgSsrCodePhaseBiasesBounds -> String
$cshow :: MsgSsrCodePhaseBiasesBounds -> String
showsPrec :: Int -> MsgSsrCodePhaseBiasesBounds -> ShowS
$cshowsPrec :: Int -> MsgSsrCodePhaseBiasesBounds -> ShowS
Show, ReadPrec [MsgSsrCodePhaseBiasesBounds]
ReadPrec MsgSsrCodePhaseBiasesBounds
Int -> ReadS MsgSsrCodePhaseBiasesBounds
ReadS [MsgSsrCodePhaseBiasesBounds]
(Int -> ReadS MsgSsrCodePhaseBiasesBounds)
-> ReadS [MsgSsrCodePhaseBiasesBounds]
-> ReadPrec MsgSsrCodePhaseBiasesBounds
-> ReadPrec [MsgSsrCodePhaseBiasesBounds]
-> Read MsgSsrCodePhaseBiasesBounds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrCodePhaseBiasesBounds]
$creadListPrec :: ReadPrec [MsgSsrCodePhaseBiasesBounds]
readPrec :: ReadPrec MsgSsrCodePhaseBiasesBounds
$creadPrec :: ReadPrec MsgSsrCodePhaseBiasesBounds
readList :: ReadS [MsgSsrCodePhaseBiasesBounds]
$creadList :: ReadS [MsgSsrCodePhaseBiasesBounds]
readsPrec :: Int -> ReadS MsgSsrCodePhaseBiasesBounds
$creadsPrec :: Int -> ReadS MsgSsrCodePhaseBiasesBounds
Read, MsgSsrCodePhaseBiasesBounds -> MsgSsrCodePhaseBiasesBounds -> Bool
(MsgSsrCodePhaseBiasesBounds
 -> MsgSsrCodePhaseBiasesBounds -> Bool)
-> (MsgSsrCodePhaseBiasesBounds
    -> MsgSsrCodePhaseBiasesBounds -> Bool)
-> Eq MsgSsrCodePhaseBiasesBounds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrCodePhaseBiasesBounds -> MsgSsrCodePhaseBiasesBounds -> Bool
$c/= :: MsgSsrCodePhaseBiasesBounds -> MsgSsrCodePhaseBiasesBounds -> Bool
== :: MsgSsrCodePhaseBiasesBounds -> MsgSsrCodePhaseBiasesBounds -> Bool
$c== :: MsgSsrCodePhaseBiasesBounds -> MsgSsrCodePhaseBiasesBounds -> Bool
Eq )

instance Binary MsgSsrCodePhaseBiasesBounds where
  get :: Get MsgSsrCodePhaseBiasesBounds
get = do
    [Word8]
_msgSsrCodePhaseBiasesBounds_stub <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrCodePhaseBiasesBounds -> Get MsgSsrCodePhaseBiasesBounds
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrCodePhaseBiasesBounds :: [Word8] -> MsgSsrCodePhaseBiasesBounds
MsgSsrCodePhaseBiasesBounds {[Word8]
_msgSsrCodePhaseBiasesBounds_stub :: [Word8]
_msgSsrCodePhaseBiasesBounds_stub :: [Word8]
..}

  put :: MsgSsrCodePhaseBiasesBounds -> Put
put MsgSsrCodePhaseBiasesBounds {[Word8]
_msgSsrCodePhaseBiasesBounds_stub :: [Word8]
_msgSsrCodePhaseBiasesBounds_stub :: MsgSsrCodePhaseBiasesBounds -> [Word8]
..} = do
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrCodePhaseBiasesBounds_stub

$(makeSBP 'msgSsrCodePhaseBiasesBounds ''MsgSsrCodePhaseBiasesBounds)
$(makeJSON "_msgSsrCodePhaseBiasesBounds_" ''MsgSsrCodePhaseBiasesBounds)
$(makeLenses ''MsgSsrCodePhaseBiasesBounds)

msgSsrOrbitClockBoundsDegradation :: Word16
msgSsrOrbitClockBoundsDegradation :: Word16
msgSsrOrbitClockBoundsDegradation = Word16
0x05DF

data MsgSsrOrbitClockBoundsDegradation = MsgSsrOrbitClockBoundsDegradation
  { MsgSsrOrbitClockBoundsDegradation -> [Word8]
_msgSsrOrbitClockBoundsDegradation_stub :: ![Word8]
  } deriving ( Int -> MsgSsrOrbitClockBoundsDegradation -> ShowS
[MsgSsrOrbitClockBoundsDegradation] -> ShowS
MsgSsrOrbitClockBoundsDegradation -> String
(Int -> MsgSsrOrbitClockBoundsDegradation -> ShowS)
-> (MsgSsrOrbitClockBoundsDegradation -> String)
-> ([MsgSsrOrbitClockBoundsDegradation] -> ShowS)
-> Show MsgSsrOrbitClockBoundsDegradation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsgSsrOrbitClockBoundsDegradation] -> ShowS
$cshowList :: [MsgSsrOrbitClockBoundsDegradation] -> ShowS
show :: MsgSsrOrbitClockBoundsDegradation -> String
$cshow :: MsgSsrOrbitClockBoundsDegradation -> String
showsPrec :: Int -> MsgSsrOrbitClockBoundsDegradation -> ShowS
$cshowsPrec :: Int -> MsgSsrOrbitClockBoundsDegradation -> ShowS
Show, ReadPrec [MsgSsrOrbitClockBoundsDegradation]
ReadPrec MsgSsrOrbitClockBoundsDegradation
Int -> ReadS MsgSsrOrbitClockBoundsDegradation
ReadS [MsgSsrOrbitClockBoundsDegradation]
(Int -> ReadS MsgSsrOrbitClockBoundsDegradation)
-> ReadS [MsgSsrOrbitClockBoundsDegradation]
-> ReadPrec MsgSsrOrbitClockBoundsDegradation
-> ReadPrec [MsgSsrOrbitClockBoundsDegradation]
-> Read MsgSsrOrbitClockBoundsDegradation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsgSsrOrbitClockBoundsDegradation]
$creadListPrec :: ReadPrec [MsgSsrOrbitClockBoundsDegradation]
readPrec :: ReadPrec MsgSsrOrbitClockBoundsDegradation
$creadPrec :: ReadPrec MsgSsrOrbitClockBoundsDegradation
readList :: ReadS [MsgSsrOrbitClockBoundsDegradation]
$creadList :: ReadS [MsgSsrOrbitClockBoundsDegradation]
readsPrec :: Int -> ReadS MsgSsrOrbitClockBoundsDegradation
$creadsPrec :: Int -> ReadS MsgSsrOrbitClockBoundsDegradation
Read, MsgSsrOrbitClockBoundsDegradation
-> MsgSsrOrbitClockBoundsDegradation -> Bool
(MsgSsrOrbitClockBoundsDegradation
 -> MsgSsrOrbitClockBoundsDegradation -> Bool)
-> (MsgSsrOrbitClockBoundsDegradation
    -> MsgSsrOrbitClockBoundsDegradation -> Bool)
-> Eq MsgSsrOrbitClockBoundsDegradation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsgSsrOrbitClockBoundsDegradation
-> MsgSsrOrbitClockBoundsDegradation -> Bool
$c/= :: MsgSsrOrbitClockBoundsDegradation
-> MsgSsrOrbitClockBoundsDegradation -> Bool
== :: MsgSsrOrbitClockBoundsDegradation
-> MsgSsrOrbitClockBoundsDegradation -> Bool
$c== :: MsgSsrOrbitClockBoundsDegradation
-> MsgSsrOrbitClockBoundsDegradation -> Bool
Eq )

instance Binary MsgSsrOrbitClockBoundsDegradation where
  get :: Get MsgSsrOrbitClockBoundsDegradation
get = do
    [Word8]
_msgSsrOrbitClockBoundsDegradation_stub <- Get Bool -> Get Word8 -> Get [Word8]
forall (m :: * -> *) a. Monad m => m Bool -> m a -> m [a]
whileM (Bool -> Bool
not (Bool -> Bool) -> Get Bool -> Get Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Get Bool
isEmpty) Get Word8
getWord8
    MsgSsrOrbitClockBoundsDegradation
-> Get MsgSsrOrbitClockBoundsDegradation
forall (f :: * -> *) a. Applicative f => a -> f a
pure MsgSsrOrbitClockBoundsDegradation :: [Word8] -> MsgSsrOrbitClockBoundsDegradation
MsgSsrOrbitClockBoundsDegradation {[Word8]
_msgSsrOrbitClockBoundsDegradation_stub :: [Word8]
_msgSsrOrbitClockBoundsDegradation_stub :: [Word8]
..}

  put :: MsgSsrOrbitClockBoundsDegradation -> Put
put MsgSsrOrbitClockBoundsDegradation {[Word8]
_msgSsrOrbitClockBoundsDegradation_stub :: [Word8]
_msgSsrOrbitClockBoundsDegradation_stub :: MsgSsrOrbitClockBoundsDegradation -> [Word8]
..} = do
    (Word8 -> Put) -> [Word8] -> Put
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Word8 -> Put
putWord8 [Word8]
_msgSsrOrbitClockBoundsDegradation_stub

$(makeSBP 'msgSsrOrbitClockBoundsDegradation ''MsgSsrOrbitClockBoundsDegradation)
$(makeJSON "_msgSsrOrbitClockBoundsDegradation_" ''MsgSsrOrbitClockBoundsDegradation)
$(makeLenses ''MsgSsrOrbitClockBoundsDegradation)