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); }
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); }
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); }
/// <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); }
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); }
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); }
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); }
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); }
/// <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); }
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); }
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); }
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); }
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); }
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); }
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); }
public static Message1059 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); Message1059 msg = new Message1059(); //Satellite Specific Part of the SSR GPS Satellite Code Bias msg.SatelliteID = BitConvertUtil.GetUInt(sequence.DeQueue(6)); msg.NoofCodeBiasProcess = BitConvertUtil.GetUInt(sequence.DeQueue(5)); //Code Spoecific Part of the SSR GPS Satellite Code Bias for (int i = 0; i < (int)msg.NoofCodeBiasProcess; i++) { } msg.SignalandTrackingModeIndicator = BitConvertUtil.GetUInt(sequence.DeQueue(5)); msg.CodeBias = BitConvertUtil.GetInt(sequence.DeQueue(14)); return(msg); }
public static Message1011 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); Message1011 msg = new Message1011(); 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 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 return(msg); }
public static MSM6 Parse(string binStr, int Nsat, int Ncell) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); MSM6 msg = new MSM6(); for (int i = 0; i < Nsat; i++) { msg.NumberOfIntegerMsInSatRoughRange.Add(BitConvertUtil.GetUInt(sequence.DeQueue(8))); } for (int i = 0; i < Nsat; i++) { msg.SatelliteRoughRangesModulo1ms.Add(BitConvertUtil.GetUInt(sequence.DeQueue(10))); } 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))); } return(msg); }
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); }
/// <summary> /// 解析报文头文件 /// </summary> /// <param name="binStr"></param> /// <returns></returns> public static SSRQZSSHeader68 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); SSRQZSSHeader68 header = new SSRQZSSHeader68(); 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.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)); return(header); }
public static Message1026 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); Message1026 msg = new Message1026(); msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12)); msg.SystemIdentificationNumber = BitConvertUtil.GetUInt(sequence.DeQueue(8)); msg.ProjectionType = BitConvertUtil.GetUInt(sequence.DeQueue(6)); msg.LaFO = BitConvertUtil.GetInt(sequence.DeQueue(34)); msg.LoFO = BitConvertUtil.GetInt(sequence.DeQueue(35)); msg.LaSP1 = BitConvertUtil.GetInt(sequence.DeQueue(34)); msg.LaSP2 = BitConvertUtil.GetInt(sequence.DeQueue(34)); msg.EFO = BitConvertUtil.GetUInt(sequence.DeQueue(36)); msg.NFO = BitConvertUtil.GetInt(sequence.DeQueue(35)); return(msg); }
public new static Message1258 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); Message1258 msg = new Message1258(); msg.SatelliteID = BitConvertUtil.GetUInt(sequence.DeQueue(6)); msg.IODE = BitConvertUtil.GetUInt(sequence.DeQueue(10)); msg.IodCrc = BitConvertUtil.GetUInt(sequence.DeQueue(24)); 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); }
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); }
/// <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); }
public static Message1010 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); Message1010 msg = new Message1010(); 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 msg.GlonassIntegerL1PseudorangeModulusAmbiguity = BitConvertUtil.GetUInt(sequence.DeQueue(7)); //uint7 msg.GlonassCnr = BitConvertUtil.GetUInt(sequence.DeQueue(8)); //uint8 return(msg); }
/// <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); }
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); }
public static GlonassMessageHeader Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); GlonassMessageHeader header = new GlonassMessageHeader(); header.MessageNumber = (MessageType)BitConvertUtil.GetInt(sequence.DeQueue(12)); //uint12 header.ReferenceStationID = BitConvertUtil.GetInt(sequence.DeQueue(12)); //uint12 header.GlonassEpochTimeTk = BitConvertUtil.GetInt(sequence.DeQueue(27)) * 0.001 + LeapSecondOfUtcToGps; //uint27 ,question:这里是加17还是18还是19? header.SyncGnssMessageFlag = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1; //bit(1) header.MessageCount = BitConvertUtil.GetInt(sequence.DeQueue(5)); //uint5 header.GlonassDivergencefreeSmoothingIndicator = BitConvertUtil.GetInt(sequence.DeQueue(1)) == 1; //bit(1) header.GlonassSmoothingInterval = BitConvertUtil.GetInt(sequence.DeQueue(3)); //bit(3) //if (header.GlonassEpochTimeTk > 10800) // header.GlonassEpochTimeTk -= 10800; //else header.GlonassEpochTimeTk += 21 * 3600; header.GlonassEpochTimeTk -= 10800; return(header); }
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); }
public static Message1013 Parse(string binStr) { StringSequence sequence = new StringSequence(); sequence.EnQuence(binStr); Message1013 msg = new Message1013(); msg.MessageNumber = BitConvertUtil.GetUInt(sequence.DeQueue(12)); //uint12 msg.ReferenceStationID = BitConvertUtil.GetUInt(sequence.DeQueue(12)); //uint12 msg.MJDNumber = BitConvertUtil.GetUInt(sequence.DeQueue(16)); //uint16 msg.SecondsofDayUTC = BitConvertUtil.GetUInt(sequence.DeQueue(17)); //uint17 msg.NoofMessageIDAnnouncementstoFollow_Nm = BitConvertUtil.GetUInt(sequence.DeQueue(5)); //uint5 msg.LeapSecondsGPS_UTC = BitConvertUtil.GetUInt(sequence.DeQueue(8)); //uint8 //29 * for (int i = 0; i < msg.NoofMessageIDAnnouncementstoFollow_Nm; i++) { msg.Msgs.Add(MsgItem.Parse(sequence.DeQueue(29))); } msg.Length = 70 + (int)msg.NoofMessageIDAnnouncementstoFollow_Nm * 29; return(msg); }