Exemplo n.º 1
0
        public static Message1005 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1005 msg = new Message1005();

            msg.MessageNumber                  = BitConvertUtil.GetUInt(sequence.DeQueue(12));             //uint12
            msg.ReferenceStationID             = BitConvertUtil.GetUInt(sequence.DeQueue(12));             //uint12
            msg.ReservedforITRFRealizationYear = BitConvertUtil.GetUInt(sequence.DeQueue(6));              //uint6
            msg.GpsIndicator                      = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;       //bit(1)
            msg.GLONASSIndicator                  = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;       //bit(1)
            msg.ReservedforGalileoIndicator       = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;       //bit(1)
            msg.ReferenceStationIndicator         = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;       //bit(1)
            msg.AntennaReferencePointECEF_X       = BitConvertUtil.GetLong(sequence.DeQueue(38)) * 0.0001; //int38
            msg.SingleReceiverOscillatorIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;       //bit(1)
            msg.Reserved1 = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;                               //bit(1)
            msg.AntennaReferencePointECEF_Y = BitConvertUtil.GetLong(sequence.DeQueue(38)) * 0.0001;       //int38
            //msg.Reserved2 = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;//bit(1)
            msg.quartercycleindicator       = BitConvertUtil.GetUInt(sequence.DeQueue(2));                 //bit(2)
            msg.AntennaReferencePointECEF_Z = BitConvertUtil.GetLong(sequence.DeQueue(38)) * 0.0001;       //int38

            return(msg);
        }
Exemplo n.º 2
0
        public static MSM3 Parse(string binStr, int Nsat, int Ncell)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            MSM3 msg = new MSM3();

            for (int i = 0; i < Nsat; i++)
            {
                msg.SatelliteRoughRangesModulo1ms.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePseudorange.Add(BitConvertUtil.GetInt(sequence.DeQueue(15)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePhaseRange.Add(BitConvertUtil.GetInt(sequence.DeQueue(22)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.PhaseRangeLockTimeIndicator.Add(BitConvertUtil.GetUInt(sequence.DeQueue(4)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.HalfCycleAmbiguityIndicator.Add(BitConvertUtil.GetInt(sequence.DeQueue(1)));
            }



            return(msg);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 解析一个帧
        /// </summary>
        /// <param name="satData"></param>
        public void ParseFrame(List <byte> data)
        {
            var binStr = BitConvertUtil.GetBinString(data);

            BinStringSequence.EnQuence(binStr);

            //首先获取并判断消息类型
            int msgTypeNum = 0;

            while (BinStringSequence.Capacity > 0 && msgTypeNum < 200)
            {
                int msgNumber = BitConvertUtil.GetInt(BinStringSequence.GetQueue(12));

                if (msgNumber == 0)
                {
                    break;
                }

                //log.Debug("正在解析:" + msgNumber);

                ParseOneMessage(msgNumber, data);
                msgTypeNum++;
            }
            BinStringSequence.Clear();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 解析报文头文件
        /// </summary>
        /// <param name="binStr"></param>
        /// <returns></returns>
        public static SSRGlonassHeader65 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            SSRGlonassHeader65 header = new SSRGlonassHeader65();

            header.MessageNumber            = (MessageType)BitConvertUtil.GetInt(sequence.DeQueue(12));
            header.EpochTime1s              = BitConvertUtil.GetUInt(sequence.DeQueue(17)) + 17;
            header.SSRUpdateInterval        = BitConvertUtil.GetInt(sequence.DeQueue(4)) == 4;
            header.MultipleMessageIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            header.SatlliteReferenceDatum   = BitConvertUtil.GetInt(sequence.DeQueue(1));
            header.IODSSR        = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            header.SSRProviderID = BitConvertUtil.GetUInt(sequence.DeQueue(16));
            header.SSRSolutionID = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            header.NoofSatellite = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            if (header.EpochTime1s >= 3 * 3600)
            {
                header.EpochTime1s -= 3 * 3600;
            }
            else
            {
                header.EpochTime1s += 21 * 3600;
            }
            return(header);
        }
Exemplo n.º 5
0
        public static Message1023 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1023 msg = new Message1023();

            msg.SystemIdentificationNumber = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.HorizontalShiftIndicator   = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.VerticalShiftIndicator     = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.fai0           = BitConvertUtil.GetInt(sequence.DeQueue(21));
            msg.lamda0         = BitConvertUtil.GetInt(sequence.DeQueue(22));
            msg.Deltafai       = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.Deltalamda     = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.MeanDeltafai   = BitConvertUtil.GetInt(sequence.DeQueue(8));
            msg.MeanDeltalamda = BitConvertUtil.GetInt(sequence.DeQueue(8));
            msg.MeanDeltaH     = BitConvertUtil.GetInt(sequence.DeQueue(15));
            for (int i = 0; i < 16; i++)
            {
                msg.Segmafai   = BitConvertUtil.GetInt(sequence.DeQueue(9));
                msg.Segmalamda = BitConvertUtil.GetInt(sequence.DeQueue(9));
                msg.Segmah     = BitConvertUtil.GetInt(sequence.DeQueue(9));
            }
            msg.HorizontalInterpolationMethodIndicator = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.VerticalInterpolationMethodIndicator   = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.HorizontalGridQualityIndicator         = BitConvertUtil.GetUInt(sequence.DeQueue(3));
            msg.VerticalGridQualityIndicator           = BitConvertUtil.GetUInt(sequence.DeQueue(3));
            msg.MJDNumber = BitConvertUtil.GetUInt(sequence.DeQueue(16));
            return(msg);
        }
Exemplo n.º 6
0
        public static MsgItem Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);
            MsgItem msg = new Rtcm.MsgItem();

            msg.MessageID1                   = BitConvertUtil.GetUInt(sequence.DeQueue(12));    //uint12
            msg.Message1SyncFlag             = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1; //uint12
            msg.Message1TransmissionInterval = BitConvertUtil.GetUInt(sequence.DeQueue(16));    //uint12
            return(msg);
        }
Exemplo n.º 7
0
        public static Message1251 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1251 msg = new Message1251();

            msg.SatelliteID             = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.HighRateClockCorrection = BitConvertUtil.GetInt(sequence.DeQueue(22));

            return(msg);
        }
Exemplo n.º 8
0
        public static Message1020 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1020 msg = new Message1020();

            msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SatelliteID   = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.SatelliteFrequencyChannelNumber = BitConvertUtil.GetUInt(sequence.DeQueue(5)) - 7;
            msg.AlmanacHealth = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.AlmanacHealthAvailabilityIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1));
            msg.P1 = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            //Tk 分为时、分、秒,各自所占字符数不等
            msg.Tkh                = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.Tkm                = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.Tks                = BitConvertUtil.GetInt(sequence.DeQueue(1)) * 30;
            msg.MsbOfBnWord        = BitConvertUtil.GetInt(sequence.DeQueue(1));
            msg.P2                 = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.Tb                 = BitConvertUtil.GetUInt(sequence.DeQueue(7)) * 900;
            msg.XnfFirstDerivative = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(24)) * GnssConst.P2_20 * 1E3;
            msg.Xn                 = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(27)) * GnssConst.P2_11 * 1E3;
            msg.XnSecondDerivative = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(5)) * GnssConst.P2_30 * 1E3;
            msg.YnfFirstDerivative = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(24)) * GnssConst.P2_20 * 1E3;
            msg.Yn                 = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(27)) * GnssConst.P2_11 * 1E3;
            msg.YnSecondDerivative = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(5)) * GnssConst.P2_30 * 1E3;
            msg.ZnfFirstDerivative = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(24)) * GnssConst.P2_20 * 1E3;
            msg.Zn                 = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(27)) * GnssConst.P2_11 * 1E3;
            msg.ZnSecondDerivative = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(5)) * GnssConst.P2_30 * 1E3;
            msg.P3                 = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.GamaN              = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(11)) * GnssConst.P2_40;
            msg.Mp                 = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.Mln                = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.TaoN               = BitConvertUtil.GetInt(sequence.DeQueue(22)) * GnssConst.P2_30;
            msg.MDeltaTaoN         = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(5));
            msg.En                 = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.Mp4                = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.Mft                = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.Mnt                = BitConvertUtil.GetUInt(sequence.DeQueue(11));
            msg.Mm                 = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.TheAvailabilityOfAdditionalData = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.Na             = BitConvertUtil.GetUInt(sequence.DeQueue(11));
            msg.TaoC           = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(32));
            msg.Mn4            = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.MtaoGps        = BitConvertUtil.ConvertToInt64WithInverseCode(sequence.DeQueue(22));
            msg.MlnFifthString = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.Reserved       = BitConvertUtil.GetUInt(sequence.DeQueue(7));

            return(msg);
        }
Exemplo n.º 9
0
        public static MSM7 Parse(string binStr, int Nsat, int Ncell)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            MSM7 msg = new MSM7();

            for (int i = 0; i < Nsat; i++)
            {
                msg.NumberOfIntegerMsInSatRoughRange.Add(BitConvertUtil.GetUInt(sequence.DeQueue(8)));
            }
            for (int i = 0; i < Nsat; i++)
            {
                msg.ExtendedSatInfo.Add(BitConvertUtil.GetUInt(sequence.DeQueue(4)));
            }
            for (int i = 0; i < Nsat; i++)
            {
                msg.SatelliteRoughRangesModulo1ms.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10)));
            }
            for (int i = 0; i < Nsat; i++)
            {
                msg.SatRoughPhaseRangeRate.Add(BitConvertUtil.GetInt(sequence.DeQueue(14)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePseudorangeWithExtendedResolution.Add(BitConvertUtil.GetInt(sequence.DeQueue(20)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePhaseRangeWithExtendedResolution.Add(BitConvertUtil.GetInt(sequence.DeQueue(24)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.PhaseRangeLockTimeIndicatorWithExtendedRangeAndResolution.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.HalfCycleAmbiguityIndicator.Add(BitConvertUtil.GetInt(sequence.DeQueue(1)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalCnrWithExtendedResolution.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePhaseRangeRate.Add(BitConvertUtil.GetInt(sequence.DeQueue(15)));
            }
            return(msg);
        }
Exemplo n.º 10
0
        public static Message1037 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1037 msg = new Message1037();

            msg.GlonassSatelliteID         = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.GlonassAmbiguityStatusFlag = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.GlonassNonSyncCount        = BitConvertUtil.GetUInt(sequence.DeQueue(3));
            msg.GlonassIonosphericCarrierPhaseCorrectionDifference = BitConvertUtil.GetInt(sequence.DeQueue(17));

            return(msg);
        }
Exemplo n.º 11
0
        /// <summary>
        /// 解析报文头文件
        /// </summary>
        /// <param name="binStr"></param>
        /// <returns></returns>
        public static GpsNetworkFKPGradientHeader Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            GpsNetworkFKPGradientHeader header = new GpsNetworkFKPGradientHeader();

            header.MessageNumber      = (MessageType)BitConvertUtil.GetInt(sequence.DeQueue(12));
            header.ReferenceStationID = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            header.GpsFKPEpochTime    = BitConvertUtil.GetUInt(sequence.DeQueue(20));
            header.NoofGpsSatelliteSignalsProcessed = BitConvertUtil.GetUInt(sequence.DeQueue(5));

            return(header);
        }
Exemplo n.º 12
0
        public new static Message1247 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1247 msg = new Message1247();

            msg.SatelliteID  = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.DeltaClockC0 = BitConvertUtil.GetInt(sequence.DeQueue(22));
            msg.DeltaClockC1 = BitConvertUtil.GetInt(sequence.DeQueue(21));
            msg.DeltaClockC2 = BitConvertUtil.GetInt(sequence.DeQueue(27));

            return(msg);
        }
Exemplo n.º 13
0
        public static Message1001 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1001 msg = new Message1001();

            msg.GpsSatelliteID     = BitConvertUtil.GetUInt(sequence.DeQueue(6));              //uint6
            msg.GpsL1CodeIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;          //bit(1)
            msg.GpsL1Pseudorange   = BitConvertUtil.GetUInt(sequence.DeQueue(24));             //uint24
            msg.GpsL1PhaseRangeMinusPseudorange = BitConvertUtil.GetInt(sequence.DeQueue(20)); //uint20
            msg.GpsL1LocktimeIndicator          = BitConvertUtil.GetUInt(sequence.DeQueue(7)); //uint7

            return(msg);
        }
Exemplo n.º 14
0
        public static Message63 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message63 msg = new Message63();

            msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SatelliteID   = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.WeekNumber    = BitConvertUtil.GetUInt(sequence.DeQueue(13));
            msg.BeiDOuURAI    = BitConvertUtil.GetInt(sequence.DeQueue(4));
            msg.Idot          = BitConvertUtil.GetInt(sequence.DeQueue(14));
            msg.Aode          = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.Toc           = BitConvertUtil.GetUInt(sequence.DeQueue(17));
            msg.a2            = BitConvertUtil.GetInt(sequence.DeQueue(11));
            msg.a1            = BitConvertUtil.GetInt(sequence.DeQueue(22));
            msg.a0            = BitConvertUtil.GetInt(sequence.DeQueue(24));
            msg.Aodc          = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            //??
            msg.Crs    = BitConvertUtil.GetInt(sequence.DeQueue(18));
            msg.DeltaN = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.M0     = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            //??
            msg.Cuc          = BitConvertUtil.GetInt(sequence.DeQueue(18));
            msg.Eccentricity = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Cus          = BitConvertUtil.GetInt(sequence.DeQueue(18));
            msg.SqrtA        = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Toe          = BitConvertUtil.GetUInt(sequence.DeQueue(17));
            //??
            msg.Cic    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Omega0 = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.Cis = BitConvertUtil.GetInt(sequence.DeQueue(18));
            msg.I0  = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.Crc = BitConvertUtil.GetInt(sequence.DeQueue(18));
            msg.ArgumentOfPerigee = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.OmegaDot = BitConvertUtil.GetInt(sequence.DeQueue(24));
            msg.Tgd1     = BitConvertUtil.GetInt(sequence.DeQueue(10));
            msg.Tgd2     = BitConvertUtil.GetInt(sequence.DeQueue(10));
            //msg.SvHealth = BitConvertUtil.GetInt(sequence.DeQueue(9));
            msg.SatH1 = BitConvertUtil.GetInt(sequence.DeQueue(1));
            //msg.Reserved = BitConvertUtil.GetInt(sequence.DeQueue(17));

            return(msg);
        }
Exemplo n.º 15
0
        public static Message1012 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1012 msg = new Message1012();

            msg.GlonassSatelliteID     = BitConvertUtil.GetUInt(sequence.DeQueue(6));                      //uint6
            msg.GlonassL1CodeIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;                  //bit(1)
            msg.GlonassSatelliteFrequencyChannelNumber = BitConvertUtil.GetUInt(sequence.DeQueue(5));      //uint5
            msg.GlonassL1Pseudorange = BitConvertUtil.GetInt(sequence.DeQueue(25));                        //uint25
            msg.GlonassL1PhaseRangeMinusPseudorange         = BitConvertUtil.GetInt(sequence.DeQueue(20)); //int20
            msg.GlonassL1LocktimeIndicator                  = BitConvertUtil.GetUInt(sequence.DeQueue(7)); //uint7
            msg.GlonassIntegerL1PseudorangeModulusAmbiguity = BitConvertUtil.GetUInt(sequence.DeQueue(7)); //uint7
            msg.GlonassL1Cnr = BitConvertUtil.GetUInt(sequence.DeQueue(8));                                //uint8


            msg.GlonassL2CodeIndicator = BitConvertUtil.GetUInt(sequence.DeQueue(2));                 //bit(2)
            msg.GlonassL2MinusL1PseudorangeDifference = BitConvertUtil.GetUInt(sequence.DeQueue(14)); //uint14
            msg.GlonassL2PhaseRangeMinusL1Pseudorange = BitConvertUtil.GetInt(sequence.DeQueue(20));  //int20
            msg.GlonassL2LocktimeIndicator            = BitConvertUtil.GetUInt(sequence.DeQueue(7));  //uint7
            msg.GlonassL2Cnr         = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.GlonassL1Pseudorange = msg.GlonassL1Pseudorange * 0.02 + msg.GlonassIntegerL1PseudorangeModulusAmbiguity * GnssConst.LightSpeedPerMillisecond;
            uint a1 = 0xFFF80000;

            if (msg.GlonassL1PhaseRangeMinusPseudorange != a1)
            {
                msg.GlonassL1PhaseRangeMinusPseudorange1 = msg.GlonassL1PhaseRangeMinusPseudorange * 0.0005 / Frequence.GetGlonassG1(1).WaveLength;
            }
            msg.GlonassL1PhaseRange = msg.GlonassL1Pseudorange + msg.GlonassL1PhaseRangeMinusPseudorange * 0.0005;
            uint a2 = 0xFFFFE000;

            if (msg.GlonassL2MinusL1PseudorangeDifference != a2)
            {
                msg.GlonassL2Pseudorange = msg.GlonassL1Pseudorange + msg.GlonassL2MinusL1PseudorangeDifference * 0.02;
            }
            if (msg.GlonassL2PhaseRangeMinusL1Pseudorange != a1)
            {
                msg.GlonassL2PhaseRangeMinusL1Pseudorange1 = msg.GlonassL2PhaseRangeMinusL1Pseudorange * 0.0005 / Frequence.GetGlonassG2(1).WaveLength;
            }
            msg.GlonassL2PhaseRange = msg.GlonassL1Pseudorange + msg.GlonassL2PhaseRangeMinusL1Pseudorange * 0.0005;



            return(msg);
        }
Exemplo n.º 16
0
        public static Message1044 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1044 msg = new Message1044();

            msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SatelliteID   = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.WeekNumber    = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.Toc           = BitConvertUtil.GetUInt(sequence.DeQueue(14));
            msg.af2           = BitConvertUtil.GetInt(sequence.DeQueue(6));
            msg.af1           = BitConvertUtil.GetInt(sequence.DeQueue(21));
            msg.af0           = BitConvertUtil.GetInt(sequence.DeQueue(31));
            msg.Iode          = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            //??
            msg.Crs    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.DeltaN = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.M0     = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            //??
            msg.Cuc          = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Eccentricity = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Cus          = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.SqrtA        = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Toe          = BitConvertUtil.GetUInt(sequence.DeQueue(16));
            //??
            msg.Cic    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Omega0 = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.Cis = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.I0  = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.Crc = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.ArgumentOfPerigee = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.OmegaDot = BitConvertUtil.GetInt(sequence.DeQueue(24));

            msg.i0DOT         = BitConvertUtil.GetInt(sequence.DeQueue(14));
            msg.CodeOnL2      = BitConvertUtil.GetInt(sequence.DeQueue(2));
            msg.WeekNumber    = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.URA           = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.SVHealthState = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.Tgd           = BitConvertUtil.GetInt(sequence.DeQueue(8));
            msg.Iodc          = BitConvertUtil.GetUInt(sequence.DeQueue(10));
            msg.FitInterval   = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            return(msg);
        }
Exemplo n.º 17
0
        public static Message1019 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1019 msg = new Message1019();

            msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SatelliteID   = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.WeekNumber    = BitConvertUtil.GetUInt(sequence.DeQueue(10));
            msg.SvAccuracy    = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.CodeOnL2      = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.Idot          = BitConvertUtil.GetInt(sequence.DeQueue(14));
            msg.Iode          = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.Toc           = BitConvertUtil.GetUInt(sequence.DeQueue(16));
            msg.Af2           = BitConvertUtil.GetInt(sequence.DeQueue(8));
            msg.Af1           = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Af0           = BitConvertUtil.GetInt(sequence.DeQueue(22));
            msg.Iodc          = BitConvertUtil.GetUInt(sequence.DeQueue(10));
            //??
            msg.Crs    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.DeltaN = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.M0     = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.Cuc          = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Eccentricity = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Cus          = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.SqrtA        = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Toe          = BitConvertUtil.GetUInt(sequence.DeQueue(16));
            //??
            msg.Cic    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Omega0 = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.Cis = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.I0  = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.Crc = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.ArgumentOfPerigee = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.OmegaDot    = BitConvertUtil.GetInt(sequence.DeQueue(24));
            msg.Tgd         = BitConvertUtil.GetInt(sequence.DeQueue(8));
            msg.SvHealth    = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.L2PDataFlag = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.FitInterval = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;

            return(msg);
        }
Exemplo n.º 18
0
        public static Message1248 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1248 msg = new Message1248();

            //Satellite Specific Part of the SSR QZSS Satellite Code Bias
            msg.SatelliteID         = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.NoofCodeBiasProcess = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            //Code Spoecific Part of the SSR QZSS Satellite Code Bias
            msg.SignalandTrackingModeIndicator = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.CodeBias = BitConvertUtil.GetInt(sequence.DeQueue(14));

            return(msg);
        }
Exemplo n.º 19
0
        public new static Message1058 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1058 msg = new Message1058();

            msg.SatelliteID  = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.DeltaClockC0 = BitConvertUtil.GetInt(sequence.DeQueue(22));
            msg.DeltaClockC1 = BitConvertUtil.GetInt(sequence.DeQueue(21));
            msg.DeltaClockC2 = BitConvertUtil.GetInt(sequence.DeQueue(27));
            if (msg.DeltaClockC1 != 0 || msg.DeltaClockC2 != 0)
            {
            }
            return(msg);
        }
Exemplo n.º 20
0
        public static Message1034 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1034 msg = new Message1034();

            msg.GpsSatelliteID = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.GpsIODE        = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.N0             = BitConvertUtil.GetInt(sequence.DeQueue(12));
            msg.E0             = BitConvertUtil.GetInt(sequence.DeQueue(12));
            msg.NI             = BitConvertUtil.GetInt(sequence.DeQueue(14));
            msg.EI             = BitConvertUtil.GetInt(sequence.DeQueue(14));

            return(msg);
        }
Exemplo n.º 21
0
        public static Message1009 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1009 msg = new Message1009();

            msg.GlonassSatelliteID     = BitConvertUtil.GetUInt(sequence.DeQueue(6));                 //uint6
            msg.GlonassL1CodeIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;             //bit(1)
            msg.GlonassSatelliteFrequencyChannelNumber = BitConvertUtil.GetUInt(sequence.DeQueue(5)); //uint5
            msg.GlonassL1Pseudorange = BitConvertUtil.GetUInt(sequence.DeQueue(25));                  //uint25
            msg.GlonassL1PhaseRangeMinusPseudorange = BitConvertUtil.GetInt(sequence.DeQueue(20));    //int20
            msg.GlonassL1LocktimeIndicator          = BitConvertUtil.GetUInt(sequence.DeQueue(7));    //uint7

            return(msg);
        }
Exemplo n.º 22
0
        public static Message1045 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1045 msg = new Message1045();

            msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SatelliteID   = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.WeekNumber    = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.Iodn          = BitConvertUtil.GetUInt(sequence.DeQueue(10));
            msg.GalileoSVSISA = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.Idot          = BitConvertUtil.GetInt(sequence.DeQueue(14));
            msg.Toc           = BitConvertUtil.GetUInt(sequence.DeQueue(14));
            msg.af2           = BitConvertUtil.GetInt(sequence.DeQueue(6));
            msg.af1           = BitConvertUtil.GetInt(sequence.DeQueue(21));
            msg.af0           = BitConvertUtil.GetInt(sequence.DeQueue(31));
            //??
            msg.Crs    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.DeltaN = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.M0     = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            //??
            msg.Cuc          = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Eccentricity = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Cus          = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.SqrtA        = BitConvertUtil.GetUInt(sequence.DeQueue(32));
            msg.Toe          = BitConvertUtil.GetUInt(sequence.DeQueue(14));
            //??
            msg.Cic    = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.Omega0 = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.Cis = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.I0  = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.Crc = BitConvertUtil.GetInt(sequence.DeQueue(16));
            msg.ArgumentOfPerigee = BitConvertUtil.GetInt(sequence.DeQueue(32));
            //??
            msg.OmegaDot        = BitConvertUtil.GetInt(sequence.DeQueue(24));
            msg.GalileoBGD      = BitConvertUtil.GetInt(sequence.DeQueue(10));
            msg.E5aSignalHealth = BitConvertUtil.GetInt(sequence.DeQueue(2));
            msg.E5aDataUse      = BitConvertUtil.GetInt(sequence.DeQueue(1));
            msg.Reserved        = BitConvertUtil.GetInt(sequence.DeQueue(7));

            return(msg);
        }
Exemplo n.º 23
0
        public static Message1002 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1002 msg = new Message1002();

            msg.GpsSatelliteID     = BitConvertUtil.GetUInt(sequence.DeQueue(6));                      //uint6
            msg.GpsL1CodeIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;                  //bit(1)
            msg.GpsL1Pseudorange   = BitConvertUtil.GetUInt(sequence.DeQueue(24));                     //uint24
            msg.GpsL1PhaseRangeMinusPseudorange = BitConvertUtil.GetInt(sequence.DeQueue(20));         //int20
            //msg.GpsL1LocktimeIndicator = BitConvertUtil.GetInt(sequence.DeQueue(7));//uint7
            msg.GpsIntegerL1PseudorangeModulusAmbiguity = BitConvertUtil.GetUInt(sequence.DeQueue(8)); //uint8
            msg.GpsL1Cnr = BitConvertUtil.GetUInt(sequence.DeQueue(8));                                //uint8

            return(msg);
        }
Exemplo n.º 24
0
        /// <summary>
        /// 解析报文头文件
        /// </summary>
        /// <param name="binStr"></param>
        /// <returns></returns>
        public static GpsMessageHeader Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            GpsMessageHeader header = new GpsMessageHeader();

            header.MessageNumber      = (MessageType)BitConvertUtil.GetInt(sequence.DeQueue(12));         //uint12
            header.ReferenceStationID = BitConvertUtil.GetInt(sequence.DeQueue(12));                      //uint12
            //var GpsEpochTimeInMs = BitConvertUtil.GetUInt(sequence.DeQueue(30));//uint30
            header.GpsEpochTimeInMs    = BitConvertUtil.GetUInt(sequence.DeQueue(30));                    //uint30
            header.SyncGnssMessageFlag = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;                 //bit(1)
            header.MessageCount        = BitConvertUtil.GetInt(sequence.DeQueue(5));                      //uint5
            header.GpsDivergencefreeSmoothingIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1; //bit(1)
            header.GpsSmoothingInterval = BitConvertUtil.GetInt(sequence.DeQueue(3));                     //bit(3)

            return(header);
        }
Exemplo n.º 25
0
        public new static Message1246 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1246 msg = new Message1246();

            msg.SatelliteID        = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.IODE               = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.DeltaRadial        = BitConvertUtil.GetInt(sequence.DeQueue(22));
            msg.DeltaAlongTrack    = BitConvertUtil.GetInt(sequence.DeQueue(20));
            msg.DeltaCrossTrack    = BitConvertUtil.GetInt(sequence.DeQueue(20));
            msg.DotDeltaRadial     = BitConvertUtil.GetInt(sequence.DeQueue(21));
            msg.DotDeltaAlongTrack = BitConvertUtil.GetInt(sequence.DeQueue(19));
            msg.DotDeltaCrossTrack = BitConvertUtil.GetInt(sequence.DeQueue(19));

            return(msg);
        }
Exemplo n.º 26
0
        public static MSM1 Parse(string binStr, int Nsat, int Ncell)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            MSM1 msg = new MSM1();

            for (int i = 0; i < Nsat; i++)
            {
                msg.SatelliteRoughRangesModulo1ms.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePseudorange.Add(BitConvertUtil.GetInt(sequence.DeQueue(15)));
            }

            return(msg);
        }
Exemplo n.º 27
0
        /// <summary>
        /// 解析报文头文件
        /// </summary>
        /// <param name="binStr"></param>
        /// <returns></returns>
        public static GlonassNetworkRTKHeader Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            GlonassNetworkRTKHeader header = new GlonassNetworkRTKHeader();

            header.MessageNumber               = (MessageType)BitConvertUtil.GetInt(sequence.DeQueue(12));
            header.NetworkID                   = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            header.SubnetworkID                = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            header.GlonassNetworkEpochTime     = BitConvertUtil.GetUInt(sequence.DeQueue(20));
            header.MultipleMessageIndicator    = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            header.MasterReferenceStationID    = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            header.AuxiliaryReferenceStationID = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            header.ofGlonassDataEntries        = BitConvertUtil.GetUInt(sequence.DeQueue(4));

            return(header);
        }
Exemplo n.º 28
0
        /// <summary>
        /// 解析报文头文件
        /// </summary>
        /// <param name="binStr"></param>
        /// <returns></returns>
        public static SSRQZSSHeader67 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            SSRQZSSHeader67 header = new SSRQZSSHeader67();

            header.MessageNumber            = (MessageType)BitConvertUtil.GetInt(sequence.DeQueue(12));
            header.EpochTime1s              = BitConvertUtil.GetUInt(sequence.DeQueue(20));
            header.SSRUpdateInterval        = BitConvertUtil.GetInt(sequence.DeQueue(4)) == 4;
            header.MultipleMessageIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            header.IODSSR        = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            header.SSRProviderID = BitConvertUtil.GetUInt(sequence.DeQueue(16));
            header.SSRSolutionID = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            header.NoofSatellite = BitConvertUtil.GetUInt(sequence.DeQueue(6));

            return(header);
        }
Exemplo n.º 29
0
        public static Message1025 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1025 msg = new Message1025();

            msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SystemIdentificationNumber = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.ProjectionType             = BitConvertUtil.GetUInt(sequence.DeQueue(6));
            msg.LaNO   = BitConvertUtil.GetInt(sequence.DeQueue(34));
            msg.LoNO   = BitConvertUtil.GetInt(sequence.DeQueue(35));
            msg.addSNO = BitConvertUtil.GetUInt(sequence.DeQueue(30));
            msg.FE     = BitConvertUtil.GetUInt(sequence.DeQueue(36));
            msg.FN     = BitConvertUtil.GetInt(sequence.DeQueue(35));

            return(msg);
        }
Exemplo n.º 30
0
        public static Message1022 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1022 msg = new Message1022();

            msg.MessageNumber                          = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.SourceNameCounter                      = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.SourceName                             = BitConvertUtil.GetCharString(sequence, (int)msg.SourceNameCounter);
            msg.TargetNameCounter                      = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.TargetName                             = BitConvertUtil.GetCharString(sequence, (int)msg.TargetNameCounter);
            msg.SystemIdentificationNumber             = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.UtilizedTransformationMessageIndicator = BitConvertUtil.GetUInt(sequence.DeQueue(10));
            msg.PlateNumber                            = BitConvertUtil.GetUInt(sequence.DeQueue(5));
            msg.ComputationIndicator                   = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.HeightIndicator                        = BitConvertUtil.GetUInt(sequence.DeQueue(2));
            msg.LatitudeOfOrigin                       = BitConvertUtil.GetInt(sequence.DeQueue(19));
            msg.LongitudeOfOrigin                      = BitConvertUtil.GetInt(sequence.DeQueue(20));
            msg.deltaLatitudeOfOrigin                  = BitConvertUtil.GetUInt(sequence.DeQueue(14));
            msg.deltaLongitudeOfOrigin                 = BitConvertUtil.GetUInt(sequence.DeQueue(14));
            msg.dX    = BitConvertUtil.GetInt(sequence.DeQueue(23));
            msg.dY    = BitConvertUtil.GetInt(sequence.DeQueue(23));
            msg.dZ    = BitConvertUtil.GetInt(sequence.DeQueue(23));
            msg.R1    = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.R2    = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.R3    = BitConvertUtil.GetInt(sequence.DeQueue(32));
            msg.dS    = BitConvertUtil.GetInt(sequence.DeQueue(25));
            msg.XP    = BitConvertUtil.GetInt(sequence.DeQueue(35));
            msg.YP    = BitConvertUtil.GetInt(sequence.DeQueue(35));
            msg.ZP    = BitConvertUtil.GetInt(sequence.DeQueue(35));
            msg.addaS = BitConvertUtil.GetUInt(sequence.DeQueue(24));
            msg.addbS = BitConvertUtil.GetUInt(sequence.DeQueue(25));
            msg.addaT = BitConvertUtil.GetUInt(sequence.DeQueue(24));
            msg.addbT = BitConvertUtil.GetUInt(sequence.DeQueue(25));
            msg.HorizontalHelmertMolodenskiQualityIndicator = BitConvertUtil.GetUInt(sequence.DeQueue(3));
            msg.VerticalHelmertMolodenskiQualityIndicator   = BitConvertUtil.GetUInt(sequence.DeQueue(3));

            msg.Length = 517 + (int)msg.SourceNameCounter * 8 + (int)msg.TargetNameCounter * 8;
            return(msg);
        }