"""
sbftypes_get.py

SBF Protocol GET output payload definitions.

THESE ARE THE PAYLOAD DEFINITIONS FOR _GET_ MESSAGES _FROM_ THE RECEIVER
(e.g. Periodic Navigation Data; Poll Responses; Info messages).

Created on 19 May 2025

Information sourced from mosaic-X5 Reference Guide v4.14.10

:author: semuadmin
"""

from pysbf2.sbftypes_core import (
    C2,
    C6,
    C10,
    C30,
    C32,
    CH,
    F4,
    F8,
    I1,
    I2,
    I4,
    I8,
    U1,
    U2,
    U4,
    U8,
)

SBF_PAYLOADS_GET = {
    "ASCIIIn": {},
    "AttCovEuler": {},
    "AttEuler": {},
    "BaseStation": {},
    "BaseVectorCart": {
        "TOW": U4,
        "WNc": U2,
        "NBlocks": U1,
        "SBLength": U1,
        "group": (
            "NBlocks",
            {  # repeating group * NBlocks
                "nrSv": U1,
                "Error": U1,
                "Mode": U1,
                "Misc": U1,
                "DeltaX": F8,
                "DeltaY": F8,
                "DeltaZ": F8,
                "DeltaVx": F4,
                "DeltaVy": F4,
                "DeltaYz": F4,
                "Azimuth": U2,
                "Elevation": I2,
                "ReferenceID": U2,
                "CorrAge": U2,
                "SignalInfo": U4,
            },
        ),
    },
    "BaseVectorGeod": {},
    "BBSamples": {},
    "BDSAlm": {},
    "BDSIon": {},
    "BDSNav": {},
    "BDSRaw": {},
    "BDSRawB1C": {},
    "BDSRawB2a": {},
    "BDSRawB2b": {},
    "BDSUtc": {},
    "ChannelStatus": {},
    "Commands": {},
    "Comment": {},
    "DiffCorrIn": {},
    "DiskStatus": {},
    "DOP": {},
    "DynDNSStatus": {},
    "EncapsulatedOutput": {},
    "EndOfAtt": {},
    "EndOfMeas": {},
    "EndOfPVT": {},
    "ExtEvent": {},
    "ExtEventAttEuler": {},
    "ExtEventBaseVectGeod": {},
    "ExtEventPVTCartesian": {},
    "ExtEventPVTGeodetic": {},
    "FugroDDS": {},
    "FugroStatus": {},
    "GALAlm": {},
    "GALAuthStatus": {},
    "GALGstGps": {},
    "GALIon": {},
    "GALNav": {},
    "GALRawCNAV": {},
    "GALRawFNAV": {},
    "GALRawINAV": {},
    "GALSARRLM": {},
    "GALUtc": {},
    "GEOAlm": {},
    "GEOClockEphCovMatrix": {},
    "GEODegrFactors": {},
    "GEOFastCorr": {},
    "GEOFastCorrDegr": {},
    "GEOIGPMask": {},
    "GEOIntegrity": {},
    "GEOIonoDelay": {},
    "GEOLongTermCorr": {},
    "GEOMT00": {},
    "GEONav": {},
    "GEONetworkTime": {},
    "GEOPRNMask": {},
    "GEORawL1": {},
    "GEORawL5": {},
    "GEOServiceLevel": {},
    "GLOAlm": {},
    "GLONav": {},
    "GLORawCA": {},
    "GLOTime": {},
    "GPSAlm": {},
    "GPSCNav": {},
    "GPSIon": {},
    "GPSNav": {},
    "GPSRawCA": {},
    "GPSRawL2C": {},
    "GPSRawL5": {},
    "GPSUtc": {},
    "InputLink": {},
    "IPStatus": {},
    "LBandBeams": {},
    "LBandRaw": {},
    "LBandTrackerStatus": {},
    "Meas3CN0HiRes": {},
    "Meas3Doppler": {},
    "Meas3MP": {},
    "Meas3PP": {},
    "Meas3Ranges": {},
    "MeasEpoch": {},
    "MeasExtra": {},
    "NAVICRaw": {},
    "NTRIPClientStatus": {},
    "NTRIPServerStatus": {},
    "OutputLink": {},
    "P2PPStatus": {},
    "PosCart": {},
    "PosCovCartesian": {
        "TOW": U4,
        "WNc": U2,
        "Mode": U1,
        "Error": U1,
        "Cov_xx": F4,
        "Cov_yy": F4,
        "Cov_zz": F4,
        "Cov_bb": F4,
        "Cov_xy": F4,
        "Cov_xz": F4,
        "Cov_xb": F4,
        "Cov_yz": F4,
        "Cov_yb": F4,
        "Cov_zb": F4,
    },
    "PosCovGeodetic": {},
    "PosLocal": {},
    "PosProjected": {},
    "PVTCartesian": {
        "TOW": U4,
        "WNc": U2,
        "Mode": U1,
        "Error": U1,
        "X": F8,
        "Y": F8,
        "Z": F8,
        "Undulation": F4,
        "Vx": F4,
        "Vy": F4,
        "Vz": F4,
        "COG": F4,
        "RxClkBias": F8,
        "RxClkDrift": F4,
        "TimeSystem": U1,
        "Datum": U1,
        "NrSV": U1,
        "WACorrInfo": U1,
        "ReferenceID": U2,
        "MeanCorrAge": [U2, 0.01],
        "SignalInfo": U4,
        "AlertFlag": U1,
        "NrBases": U1,
        "PPPInfo": U2,
        "Latency": [U2, 0.0001],
        "HAccuracy": [U2, 0.01],
        "VAccuracy": [U2, 0.01],
        "Misc": U1,
    },
    "PVTGeodetic": {},
    "PVTSupport": {},
    "PVTSupportA": {},
    "QualityInd": {},
    "QZSAlm": {},
    "QZSNav": {},
    "QZSRawL1CA": {},
    "QZSRawL2C": {},
    "QZSRawL5": {},
    "ReceiverSetup": {},
    "ReceiverStatus": {},
    "ReceiverTime": {},
    "RFStatus": {},
    "RTCMDatum": {},
    "RxMessage": {},
    "SatVisibility": {},
    "VelCovCartesian": {
        "TOW": U4,
        "WNc": U2,
        "Mode": U1,
        "Error": U1,
        "Cov_VxVx": F4,
        "Cov_VyVy": F4,
        "Cov_VzVz": F4,
        "Cov_DtDt": F4,
        "Cov_VxVy": F4,
        "Cov_VxVz": F4,
        "Cov_VxDt": F4,
        "Cov_VyVz": F4,
        "Cov_VyDt": F4,
        "Cov_VzDt": F4,
    },
    "VelCovGeodetic": {},
    "xPPSOffset": {},
}
