@@ -782,16 +782,19 @@ type alias GNSSInputType =
782782 { flags : Int
783783 }
784784
785- {- | Contains one tropo delay, plus STEC residuals for each satellite at the grid point. -}
786- type alias GridElementNoStd =
785+ {- | Contains one tropo delay (mean and stddev), plus STEC residuals (mean and stddev) for
786+ each satellite at the grid point.
787+ -}
788+ type alias GridElement =
787789 { index : Int
788- , stecResiduals : Array STECResidualNoStd
789- , tropoDelayCorrection : TroposphericDelayCorrectionNoStd
790+ , stecResiduals : Array STECResidual
791+ , tropoDelayCorrection : TroposphericDelayCorrection
790792 }
791793
792- {- | STEC residual for the given satellite at the grid point. -}
793- type alias STECResidualNoStd =
794+ {- | STEC residual (mean and standard deviation) for the given satellite at the grid point. -}
795+ type alias STECResidual =
794796 { residual : Int
797+ , stddev : Int
795798 , svID : SvID
796799 }
797800
@@ -801,6 +804,26 @@ type alias SvID =
801804 , satID : Int
802805 }
803806
807+ {- | Troposphere vertical delays (mean and standard deviation) at the grid point. -}
808+ type alias TroposphericDelayCorrection =
809+ { hydro : Int
810+ , stddev : Int
811+ , wet : Int
812+ }
813+
814+ {- | Contains one tropo delay, plus STEC residuals for each satellite at the grid point. -}
815+ type alias GridElementNoStd =
816+ { index : Int
817+ , stecResiduals : Array STECResidualNoStd
818+ , tropoDelayCorrection : TroposphericDelayCorrectionNoStd
819+ }
820+
821+ {- | STEC residual for the given satellite at the grid point. -}
822+ type alias STECResidualNoStd =
823+ { residual : Int
824+ , svID : SvID
825+ }
826+
804827{- | Troposphere vertical delays at the grid point. -}
805828type alias TroposphericDelayCorrectionNoStd =
806829 { hydro : Int
@@ -2356,33 +2379,12 @@ type alias CodeBiasesContent =
23562379It is typically equivalent to the QZSS CLAS Sub Type 9 messages.
23572380-}
23582381type alias MsgSsrGriddedCorrection =
2359- { element : GridElement
2360- , header : GriddedCorrectionHeader
2361- }
2362-
2363- {- | Contains one tropo delay (mean and stddev), plus STEC residuals (mean and stddev) for
2364- each satellite at the grid point.
2365- -}
2366- type alias GridElement =
2367- { index : Int
2382+ { header : GriddedCorrectionHeader
2383+ , index : Int
23682384 , stecResiduals : Array STECResidual
23692385 , tropoDelayCorrection : TroposphericDelayCorrection
23702386 }
23712387
2372- {- | STEC residual (mean and standard deviation) for the given satellite at the grid point. -}
2373- type alias STECResidual =
2374- { residual : Int
2375- , stddev : Int
2376- , svID : SvID
2377- }
2378-
2379- {- | Troposphere vertical delays (mean and standard deviation) at the grid point. -}
2380- type alias TroposphericDelayCorrection =
2381- { hydro : Int
2382- , stddev : Int
2383- , wet : Int
2384- }
2385-
23862388{- | The LPP message contains nested variable length arrays which are not supported in SBP, so
23872389each grid point will be identified by the index.
23882390-}
@@ -3485,6 +3487,64 @@ encodeGNSSInputType x =
34853487 [ ( " flags" , Jenc . int x. flags)
34863488 ]
34873489
3490+ gridElement : Jdec .Decoder GridElement
3491+ gridElement =
3492+ Jpipe . decode GridElement
3493+ |> Jpipe . required " index" Jdec . int
3494+ |> Jpipe . required " stec_residuals" ( Jdec . array stecResidual)
3495+ |> Jpipe . required " tropo_delay_correction" troposphericDelayCorrection
3496+
3497+ encodeGridElement : GridElement -> Jenc .Value
3498+ encodeGridElement x =
3499+ Jenc . object
3500+ [ ( " index" , Jenc . int x. index)
3501+ , ( " stec_residuals" , makeArrayEncoder encodeSTECResidual x. stecResiduals)
3502+ , ( " tropo_delay_correction" , encodeTroposphericDelayCorrection x. tropoDelayCorrection)
3503+ ]
3504+
3505+ stecResidual : Jdec .Decoder STECResidual
3506+ stecResidual =
3507+ Jpipe . decode STECResidual
3508+ |> Jpipe . required " residual" Jdec . int
3509+ |> Jpipe . required " stddev" Jdec . int
3510+ |> Jpipe . required " sv_id" svID
3511+
3512+ encodeSTECResidual : STECResidual -> Jenc .Value
3513+ encodeSTECResidual x =
3514+ Jenc . object
3515+ [ ( " residual" , Jenc . int x. residual)
3516+ , ( " stddev" , Jenc . int x. stddev)
3517+ , ( " sv_id" , encodeSvID x. svID)
3518+ ]
3519+
3520+ svID : Jdec .Decoder SvID
3521+ svID =
3522+ Jpipe . decode SvID
3523+ |> Jpipe . required " constellation" Jdec . int
3524+ |> Jpipe . required " satId" Jdec . int
3525+
3526+ encodeSvID : SvID -> Jenc .Value
3527+ encodeSvID x =
3528+ Jenc . object
3529+ [ ( " constellation" , Jenc . int x. constellation)
3530+ , ( " satId" , Jenc . int x. satID)
3531+ ]
3532+
3533+ troposphericDelayCorrection : Jdec .Decoder TroposphericDelayCorrection
3534+ troposphericDelayCorrection =
3535+ Jpipe . decode TroposphericDelayCorrection
3536+ |> Jpipe . required " hydro" Jdec . int
3537+ |> Jpipe . required " stddev" Jdec . int
3538+ |> Jpipe . required " wet" Jdec . int
3539+
3540+ encodeTroposphericDelayCorrection : TroposphericDelayCorrection -> Jenc .Value
3541+ encodeTroposphericDelayCorrection x =
3542+ Jenc . object
3543+ [ ( " hydro" , Jenc . int x. hydro)
3544+ , ( " stddev" , Jenc . int x. stddev)
3545+ , ( " wet" , Jenc . int x. wet)
3546+ ]
3547+
34883548gridElementNoStd : Jdec .Decoder GridElementNoStd
34893549gridElementNoStd =
34903550 Jpipe . decode GridElementNoStd
@@ -3513,19 +3573,6 @@ encodeSTECResidualNoStd x =
35133573 , ( " sv_id" , encodeSvID x. svID)
35143574 ]
35153575
3516- svID : Jdec .Decoder SvID
3517- svID =
3518- Jpipe . decode SvID
3519- |> Jpipe . required " constellation" Jdec . int
3520- |> Jpipe . required " satId" Jdec . int
3521-
3522- encodeSvID : SvID -> Jenc .Value
3523- encodeSvID x =
3524- Jenc . object
3525- [ ( " constellation" , Jenc . int x. constellation)
3526- , ( " satId" , Jenc . int x. satID)
3527- ]
3528-
35293576troposphericDelayCorrectionNoStd : Jdec .Decoder TroposphericDelayCorrectionNoStd
35303577troposphericDelayCorrectionNoStd =
35313578 Jpipe . decode TroposphericDelayCorrectionNoStd
@@ -5922,61 +5969,20 @@ encodeCodeBiasesContent x =
59225969msgSsrGriddedCorrection : Jdec .Decoder MsgSsrGriddedCorrection
59235970msgSsrGriddedCorrection =
59245971 Jpipe . decode MsgSsrGriddedCorrection
5925- |> Jpipe . required " element" gridElement
59265972 |> Jpipe . required " header" griddedCorrectionHeader
5927-
5928- encodeMsgSsrGriddedCorrection : MsgSsrGriddedCorrection -> Jenc .Value
5929- encodeMsgSsrGriddedCorrection x =
5930- Jenc . object
5931- [ ( " element" , encodeGridElement x. element)
5932- , ( " header" , encodeGriddedCorrectionHeader x. header)
5933- ]
5934-
5935- gridElement : Jdec .Decoder GridElement
5936- gridElement =
5937- Jpipe . decode GridElement
59385973 |> Jpipe . required " index" Jdec . int
59395974 |> Jpipe . required " stec_residuals" ( Jdec . array stecResidual)
59405975 |> Jpipe . required " tropo_delay_correction" troposphericDelayCorrection
59415976
5942- encodeGridElement : GridElement -> Jenc .Value
5943- encodeGridElement x =
5977+ encodeMsgSsrGriddedCorrection : MsgSsrGriddedCorrection -> Jenc .Value
5978+ encodeMsgSsrGriddedCorrection x =
59445979 Jenc . object
5945- [ ( " index" , Jenc . int x. index)
5980+ [ ( " header" , encodeGriddedCorrectionHeader x. header)
5981+ , ( " index" , Jenc . int x. index)
59465982 , ( " stec_residuals" , makeArrayEncoder encodeSTECResidual x. stecResiduals)
59475983 , ( " tropo_delay_correction" , encodeTroposphericDelayCorrection x. tropoDelayCorrection)
59485984 ]
59495985
5950- stecResidual : Jdec .Decoder STECResidual
5951- stecResidual =
5952- Jpipe . decode STECResidual
5953- |> Jpipe . required " residual" Jdec . int
5954- |> Jpipe . required " stddev" Jdec . int
5955- |> Jpipe . required " sv_id" svID
5956-
5957- encodeSTECResidual : STECResidual -> Jenc .Value
5958- encodeSTECResidual x =
5959- Jenc . object
5960- [ ( " residual" , Jenc . int x. residual)
5961- , ( " stddev" , Jenc . int x. stddev)
5962- , ( " sv_id" , encodeSvID x. svID)
5963- ]
5964-
5965- troposphericDelayCorrection : Jdec .Decoder TroposphericDelayCorrection
5966- troposphericDelayCorrection =
5967- Jpipe . decode TroposphericDelayCorrection
5968- |> Jpipe . required " hydro" Jdec . int
5969- |> Jpipe . required " stddev" Jdec . int
5970- |> Jpipe . required " wet" Jdec . int
5971-
5972- encodeTroposphericDelayCorrection : TroposphericDelayCorrection -> Jenc .Value
5973- encodeTroposphericDelayCorrection x =
5974- Jenc . object
5975- [ ( " hydro" , Jenc . int x. hydro)
5976- , ( " stddev" , Jenc . int x. stddev)
5977- , ( " wet" , Jenc . int x. wet)
5978- ]
5979-
59805986griddedCorrectionHeader : Jdec .Decoder GriddedCorrectionHeader
59815987griddedCorrectionHeader =
59825988 Jpipe . decode GriddedCorrectionHeader
0 commit comments