@@ -324,62 +324,6 @@ instance Binary STECResidual where
324324$ (makeJSON " _sTECResidual_" ''STECResidual)
325325$ (makeLenses ''STECResidual)
326326
327- -- | GridElementNoStd.
328- --
329- -- Contains one tropo delay, plus STEC residuals for each satellite at the
330- -- grid point.
331- data GridElementNoStd = GridElementNoStd
332- { _gridElementNoStd_index :: ! Word16
333- -- ^ Index of the grid point
334- , _gridElementNoStd_tropo_delay_correction :: ! TroposphericDelayCorrectionNoStd
335- -- ^ Wet and hydrostatic vertical delays
336- , _gridElementNoStd_stec_residuals :: ! [STECResidualNoStd ]
337- -- ^ STEC residuals for each satellite
338- } deriving ( Show , Read , Eq )
339-
340- instance Binary GridElementNoStd where
341- get = do
342- _gridElementNoStd_index <- getWord16le
343- _gridElementNoStd_tropo_delay_correction <- get
344- _gridElementNoStd_stec_residuals <- whileM (not <$> isEmpty) get
345- pure GridElementNoStd {.. }
346-
347- put GridElementNoStd {.. } = do
348- putWord16le _gridElementNoStd_index
349- put _gridElementNoStd_tropo_delay_correction
350- mapM_ put _gridElementNoStd_stec_residuals
351-
352- $ (makeJSON " _gridElementNoStd_" ''GridElementNoStd)
353- $ (makeLenses ''GridElementNoStd)
354-
355- -- | GridElement.
356- --
357- -- Contains one tropo delay (mean and stddev), plus STEC residuals (mean and
358- -- stddev) for each satellite at the grid point.
359- data GridElement = GridElement
360- { _gridElement_index :: ! Word16
361- -- ^ Index of the grid point
362- , _gridElement_tropo_delay_correction :: ! TroposphericDelayCorrection
363- -- ^ Wet and hydrostatic vertical delays (mean, stddev)
364- , _gridElement_stec_residuals :: ! [STECResidual ]
365- -- ^ STEC residuals for each satellite (mean, stddev)
366- } deriving ( Show , Read , Eq )
367-
368- instance Binary GridElement where
369- get = do
370- _gridElement_index <- getWord16le
371- _gridElement_tropo_delay_correction <- get
372- _gridElement_stec_residuals <- whileM (not <$> isEmpty) get
373- pure GridElement {.. }
374-
375- put GridElement {.. } = do
376- putWord16le _gridElement_index
377- put _gridElement_tropo_delay_correction
378- mapM_ put _gridElement_stec_residuals
379-
380- $ (makeJSON " _gridElement_" ''GridElement)
381- $ (makeLenses ''GridElement)
382-
383327msgSsrOrbitClock :: Word16
384328msgSsrOrbitClock = 0x05DD
385329
@@ -604,21 +548,29 @@ msgSsrGriddedCorrection = 0x05FC
604548--
605549-- It is typically equivalent to the QZSS CLAS Sub Type 9 messages.
606550data MsgSsrGriddedCorrection = MsgSsrGriddedCorrection
607- { _msgSsrGriddedCorrection_header :: ! GriddedCorrectionHeader
551+ { _msgSsrGriddedCorrection_header :: ! GriddedCorrectionHeader
608552 -- ^ Header of a gridded correction message
609- , _msgSsrGriddedCorrection_element :: ! GridElement
610- -- ^ Tropo and STEC residuals for the given grid point.
553+ , _msgSsrGriddedCorrection_index :: ! Word16
554+ -- ^ Index of the grid point.
555+ , _msgSsrGriddedCorrection_tropo_delay_correction :: ! TroposphericDelayCorrection
556+ -- ^ Wet and hydrostatic vertical delays (mean, stddev).
557+ , _msgSsrGriddedCorrection_stec_residuals :: ! [STECResidual ]
558+ -- ^ STEC residuals for each satellite (mean, stddev).
611559 } deriving ( Show , Read , Eq )
612560
613561instance Binary MsgSsrGriddedCorrection where
614562 get = do
615563 _msgSsrGriddedCorrection_header <- get
616- _msgSsrGriddedCorrection_element <- get
564+ _msgSsrGriddedCorrection_index <- getWord16le
565+ _msgSsrGriddedCorrection_tropo_delay_correction <- get
566+ _msgSsrGriddedCorrection_stec_residuals <- whileM (not <$> isEmpty) get
617567 pure MsgSsrGriddedCorrection {.. }
618568
619569 put MsgSsrGriddedCorrection {.. } = do
620570 put _msgSsrGriddedCorrection_header
621- put _msgSsrGriddedCorrection_element
571+ putWord16le _msgSsrGriddedCorrection_index
572+ put _msgSsrGriddedCorrection_tropo_delay_correction
573+ mapM_ put _msgSsrGriddedCorrection_stec_residuals
622574
623575$ (makeSBP 'msgSsrGriddedCorrection ''MsgSsrGriddedCorrection)
624576$ (makeJSON " _msgSsrGriddedCorrection_" ''MsgSsrGriddedCorrection)
@@ -1005,21 +957,29 @@ msgSsrGriddedCorrectionNoStdDepA :: Word16
1005957msgSsrGriddedCorrectionNoStdDepA = 0x05F0
1006958
1007959data MsgSsrGriddedCorrectionNoStdDepA = MsgSsrGriddedCorrectionNoStdDepA
1008- { _msgSsrGriddedCorrectionNoStdDepA_header :: ! GriddedCorrectionHeaderDepA
960+ { _msgSsrGriddedCorrectionNoStdDepA_header :: ! GriddedCorrectionHeaderDepA
1009961 -- ^ Header of a Gridded Correction message
1010- , _msgSsrGriddedCorrectionNoStdDepA_element :: ! GridElementNoStd
1011- -- ^ Tropo and STEC residuals for the given grid point
962+ , _msgSsrGriddedCorrectionNoStdDepA_index :: ! Word16
963+ -- ^ Index of the grid point
964+ , _msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction :: ! TroposphericDelayCorrectionNoStd
965+ -- ^ Wet and hydrostatic vertical delays
966+ , _msgSsrGriddedCorrectionNoStdDepA_stec_residuals :: ! [STECResidualNoStd ]
967+ -- ^ STEC residuals for each satellite
1012968 } deriving ( Show , Read , Eq )
1013969
1014970instance Binary MsgSsrGriddedCorrectionNoStdDepA where
1015971 get = do
1016972 _msgSsrGriddedCorrectionNoStdDepA_header <- get
1017- _msgSsrGriddedCorrectionNoStdDepA_element <- get
973+ _msgSsrGriddedCorrectionNoStdDepA_index <- getWord16le
974+ _msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction <- get
975+ _msgSsrGriddedCorrectionNoStdDepA_stec_residuals <- whileM (not <$> isEmpty) get
1018976 pure MsgSsrGriddedCorrectionNoStdDepA {.. }
1019977
1020978 put MsgSsrGriddedCorrectionNoStdDepA {.. } = do
1021979 put _msgSsrGriddedCorrectionNoStdDepA_header
1022- put _msgSsrGriddedCorrectionNoStdDepA_element
980+ putWord16le _msgSsrGriddedCorrectionNoStdDepA_index
981+ put _msgSsrGriddedCorrectionNoStdDepA_tropo_delay_correction
982+ mapM_ put _msgSsrGriddedCorrectionNoStdDepA_stec_residuals
1023983
1024984$ (makeSBP 'msgSsrGriddedCorrectionNoStdDepA ''MsgSsrGriddedCorrectionNoStdDepA)
1025985$ (makeJSON " _msgSsrGriddedCorrectionNoStdDepA_" ''MsgSsrGriddedCorrectionNoStdDepA)
@@ -1029,22 +989,29 @@ msgSsrGriddedCorrectionDepA :: Word16
1029989msgSsrGriddedCorrectionDepA = 0x05FA
1030990
1031991data MsgSsrGriddedCorrectionDepA = MsgSsrGriddedCorrectionDepA
1032- { _msgSsrGriddedCorrectionDepA_header :: ! GriddedCorrectionHeaderDepA
992+ { _msgSsrGriddedCorrectionDepA_header :: ! GriddedCorrectionHeaderDepA
1033993 -- ^ Header of a Gridded Correction message
1034- , _msgSsrGriddedCorrectionDepA_element :: ! GridElement
1035- -- ^ Tropo and STEC residuals for the given grid point (mean and standard
1036- -- deviation)
994+ , _msgSsrGriddedCorrectionDepA_index :: ! Word16
995+ -- ^ Index of the grid point
996+ , _msgSsrGriddedCorrectionDepA_tropo_delay_correction :: ! TroposphericDelayCorrection
997+ -- ^ Wet and hydrostatic vertical delays (mean, stddev)
998+ , _msgSsrGriddedCorrectionDepA_stec_residuals :: ! [STECResidual ]
999+ -- ^ STEC residuals for each satellite (mean, stddev)
10371000 } deriving ( Show , Read , Eq )
10381001
10391002instance Binary MsgSsrGriddedCorrectionDepA where
10401003 get = do
10411004 _msgSsrGriddedCorrectionDepA_header <- get
1042- _msgSsrGriddedCorrectionDepA_element <- get
1005+ _msgSsrGriddedCorrectionDepA_index <- getWord16le
1006+ _msgSsrGriddedCorrectionDepA_tropo_delay_correction <- get
1007+ _msgSsrGriddedCorrectionDepA_stec_residuals <- whileM (not <$> isEmpty) get
10431008 pure MsgSsrGriddedCorrectionDepA {.. }
10441009
10451010 put MsgSsrGriddedCorrectionDepA {.. } = do
10461011 put _msgSsrGriddedCorrectionDepA_header
1047- put _msgSsrGriddedCorrectionDepA_element
1012+ putWord16le _msgSsrGriddedCorrectionDepA_index
1013+ put _msgSsrGriddedCorrectionDepA_tropo_delay_correction
1014+ mapM_ put _msgSsrGriddedCorrectionDepA_stec_residuals
10481015
10491016$ (makeSBP 'msgSsrGriddedCorrectionDepA ''MsgSsrGriddedCorrectionDepA)
10501017$ (makeJSON " _msgSsrGriddedCorrectionDepA_" ''MsgSsrGriddedCorrectionDepA)
0 commit comments