Esempio n. 1
0
        public static Message1008 Parse(List <byte> data)
        {
            //首先化为二进制字符串
            string binStr = BitConvertUtil.GetBinString(data);

            return(Parse(binStr));
        }
Esempio n. 2
0
        public static Message1007 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1007 msg = new Message1007();

            msg.MessageNumber      = BitConvertUtil.GetUInt(sequence.DeQueue(12)); //uint12
            msg.ReferenceStationID = BitConvertUtil.GetUInt(sequence.DeQueue(12)); //uint12
            msg.DescriptorCounterN = BitConvertUtil.GetUInt(sequence.DeQueue(8));  //uint8

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < (int)msg.DescriptorCounterN; i++)
            {
                var ch = BitConvertUtil.GetChar(sequence.DeQueue(8));//char8
                sb.Append(ch);
            }//char8(N)
            msg.AntennaDescriptor = sb.ToString();

            msg.AntennaSetupID = BitConvertUtil.GetUInt(sequence.DeQueue(8));//uint8
            msg.Length         = 40 + (int)msg.DescriptorCounterN * 8;
            return(msg);
        }
Esempio n. 3
0
        public static Message1006 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1006 msg = new Message1006();

            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));//int38
            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));//int38
            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));//int38
            msg.AntennaReferencePointECEF_Z = BitConvertUtil.GetLong(sequence.DeQueue(38)) * 0.0001;       //int38
            msg.AntennaHeight = BitConvertUtil.GetUInt(sequence.DeQueue(16)) * 0.0001;                     //uint16

            return(msg);
        }
Esempio n. 4
0
        public static MSM2 Parse(string binStr, int Nsat, int Ncell)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            MSM2 msg = new MSM2();

            for (int i = 0; i < Nsat; i++)
            {
                msg.SatelliteRoughRangesModulo1ms.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10)));
            }
            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);
        }
Esempio n. 5
0
        public static MSM2 Parse(List <byte> data, int Nsat, int Ncell)
        {
            //首先化为二进制字符串
            string binStr = BitConvertUtil.GetBinString(data);

            return(Parse(binStr, Nsat, Ncell));
        }
Esempio n. 6
0
        public static Message1008 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1008 msg = new Message1008();

            msg.MessageNumber      = BitConvertUtil.GetUInt(sequence.DeQueue(12)); //uint12
            msg.ReferenceStationID = BitConvertUtil.GetUInt(sequence.DeQueue(12)); //uint12
            msg.DescriptorCounterN = BitConvertUtil.GetUInt(sequence.DeQueue(8));  //uint8

            int len = (int)msg.DescriptorCounterN;
            var str = BitConvertUtil.GetCharString(sequence, len);//char8(N)

            msg.AntennaDescriptor = str;

            msg.AntennaSetupID       = BitConvertUtil.GetUInt(sequence.DeQueue(8)); //uint8
            msg.SerialNumberCounterM = BitConvertUtil.GetUInt(sequence.DeQueue(8)); //uint8


            msg.AntennaSerialNumber = BitConvertUtil.GetCharString(sequence, (int)msg.SerialNumberCounterM); //char8(M)

            msg.Length = 48 + (int)msg.DescriptorCounterN * 8 + (int)msg.SerialNumberCounterM * 8;

            return(msg);
        }
Esempio n. 7
0
        public static HeaderOfMSM Parse(List <byte> data)
        {
            //首先化为二进制字符串
            string binStr = BitConvertUtil.GetBinString(data);

            return(Parse(binStr));
        }
Esempio n. 8
0
        public static Message1033 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1033 msg = new Message1033();

            msg.MessageNumber                   = BitConvertUtil.GetUInt(sequence.DeQueue(12));                  //uint12
            msg.ReferenceStationID              = BitConvertUtil.GetUInt(sequence.DeQueue(12));                  //uint12
            msg.AntennaDescriptorCounterN       = BitConvertUtil.GetUInt(sequence.DeQueue(8));                   //uint8
            msg.AntennaDescriptor               = GetString(sequence, (int)msg.AntennaDescriptorCounterN);       //char 8*N
            msg.AntennaSetupID                  = BitConvertUtil.GetUInt(sequence.DeQueue(8));                   //uint8
            msg.AntennaSerialNumberCounterM     = BitConvertUtil.GetUInt(sequence.DeQueue(8));                   //uint8
            msg.AntennaSerialNumber             = GetString(sequence, (int)msg.AntennaSerialNumberCounterM);     //char 8*M
            msg.ReceiverTypeDescriptorCounterI  = BitConvertUtil.GetUInt(sequence.DeQueue(8));                   //uint8
            msg.ReceiverTypeDescriptor          = GetString(sequence, (int)msg.ReceiverTypeDescriptorCounterI);  //char 8*I
            msg.ReceiverFirmwareVersionCounterJ = BitConvertUtil.GetUInt(sequence.DeQueue(8));                   //uint8
            msg.ReceiverFirmwareVersion         = GetString(sequence, (int)msg.ReceiverFirmwareVersionCounterJ); //char 8*J
            msg.ReceiverSerialNumberCounterK    = BitConvertUtil.GetUInt(sequence.DeQueue(8));                   //uint8
            msg.ReceiverSerialNumber            = GetString(sequence, (int)msg.ReceiverSerialNumberCounterK);    //char 8*K

            msg.Length = 72 +
                         ((int)msg.AntennaDescriptorCounterN
                          + (int)msg.AntennaSerialNumberCounterM
                          + (int)msg.ReceiverTypeDescriptorCounterI
                          + (int)msg.ReceiverFirmwareVersionCounterJ
                          + (int)msg.ReceiverSerialNumberCounterK
                         )
                         * 8;

            return(msg);
        }
Esempio n. 9
0
        public static GlonassNetworkRTKHeader Parse(List <byte> data)
        {
            //首先化为二进制字符串
            string binStr = BitConvertUtil.GetBinString(data);

            return(Parse(binStr));
        }
Esempio n. 10
0
        public static SSRGalileoHeader68 Parse(List <byte> data)
        {
            //首先化为二进制字符串
            string binStr = BitConvertUtil.GetBinString(data);

            return(Parse(binStr));
        }
Esempio n. 11
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();
        }
Esempio n. 12
0
        public static Message1024 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1024 msg = new Message1024();

            msg.SystemIdentificationNumber = BitConvertUtil.GetUInt(sequence.DeQueue(8));
            msg.HorizontalShiftIndicator   = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.VerticalShiftIndicator     = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1;
            msg.N0         = BitConvertUtil.GetInt(sequence.DeQueue(25));
            msg.E0         = BitConvertUtil.GetUInt(sequence.DeQueue(26));
            msg.DeltaN     = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.DeltaE     = BitConvertUtil.GetUInt(sequence.DeQueue(12));
            msg.MeanDeltaN = BitConvertUtil.GetInt(sequence.DeQueue(10));
            msg.MeanDeltaE = BitConvertUtil.GetInt(sequence.DeQueue(10));
            msg.MeanDeltah = BitConvertUtil.GetInt(sequence.DeQueue(15));
            for (int i = 0; i < 16; i++)
            {
                msg.SegmaN = BitConvertUtil.GetInt(sequence.DeQueue(9));
                msg.SegmaE = 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);
        }
Esempio n. 13
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);
        }
Esempio n. 14
0
        public static Message1250 Parse(string binStr)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            Message1250 msg = new Message1250();

            msg.SatelliteID = BitConvertUtil.GetUInt(sequence.DeQueue(4));
            msg.SSRURA      = BitConvertUtil.GetUInt(sequence.DeQueue(6));

            return(msg);
        }
Esempio n. 15
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);
        }
Esempio n. 16
0
        private static string GetString(StringSequence sequence, int count)
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < count; i++)
            {
                var ch = BitConvertUtil.GetChar(sequence.DeQueue(8));//uint12
                sb.Append(ch);
            }
            var str = sb.ToString();

            return(str);
        }
Esempio n. 17
0
        public static MSM5 Parse(string binStr, int Nsat, int Ncell)
        {
            StringSequence sequence = new StringSequence();

            sequence.EnQuence(binStr);

            MSM5 msg = new MSM5();

            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.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)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalCnr.Add(BitConvertUtil.GetUInt(sequence.DeQueue(6)));
            }
            for (int i = 0; i < Ncell; i++)
            {
                msg.SignalFinePhaseRangeRate.Add(BitConvertUtil.GetInt(sequence.DeQueue(15)));
            }

            return(msg);
        }
Esempio n. 18
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);
        }
Esempio n. 19
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);
        }
Esempio n. 20
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);
        }
Esempio n. 21
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);
        }
Esempio n. 22
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);
        }
Esempio n. 23
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);
        }
Esempio n. 24
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);
        }
Esempio n. 25
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);
        }
Esempio n. 26
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);
        }
Esempio n. 27
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);
        }
Esempio n. 28
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);
        }
Esempio n. 29
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);
        }
Esempio n. 30
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);
        }