public void CheckAndPosition(RinexEpochObservation obj) { if (CheckIfCanPosition()) { Positioning(obj); } }
/// <summary> /// 构建观测历元。 /// </summary> /// <param name="row"></param> /// <param name="indexColName"></param> /// <returns></returns> public RinexEpochObservation BuildObs(Dictionary <String, object> row, string indexColName) { var obs = new RinexEpochObservation(); obs.ReceiverTime = new Geo.Times.Time((DateTime)row[indexColName]); foreach (var item in row) { var name = item.Key; if (name == indexColName) { continue; } var code = name.Substring(4); var prn = SatelliteNumber.Parse(name); if (!obs.Contains(prn)) { obs[prn] = new RinexSatObsData(prn); } var obsValue = new RinexObsValue((double)item.Value, code); obs[prn].Add(code, obsValue); } return(obs); }
protected void OnEpochObservationReceived(RinexEpochObservation obj) { if (obj == null || obj.Count == 0) { return; } if (EpochObservationReceived != null) { EpochObservationReceived(obj); } }
/// <summary> /// 过滤掉小历元时段,在缓存中操作,确保缓存大于断裂数量 /// </summary> /// <param name="info"></param> private void CheckAndFiltSmallSpan(RinexEpochObservation info) { //添加 foreach (var sat in info) { WindowDataManager.GetOrCreate(sat.Prn).Add(info.ReceiverTime); } ////保证有足够的数量 //if (!WindowDataManager.HasFull) { return; } JudgeAndFiltSmallSpanInBuffer(info.ReceiverTime, info.ReceiverTime == LastEpoch); }
/// <summary> /// 已接收历元数据 /// </summary> /// <param name="obj"></param> public void WriteEpochObservation(RinexEpochObservation obj) { if (!IsObsHeaderWrited && obj.Header != null) { this.WriteHeader(obj.Header); } if (obj.Header == null) { return; } RinexObsFileWriter.WriteEpochObservation(obj); RinexObsFileWriter.Flush(); }
private void button_exclude_Click(object sender, EventArgs e) { string sourseDir1 = this.textBox_dir.Text; string[] files = Directory.GetFiles(sourseDir1, "*.13O"); string P1 = "P1"; progressBar1.Maximum = files.Length; progressBar1.Minimum = 1; progressBar1.Step = 1; progressBar1.Value = progressBar1.Minimum; for (int i = 0; i < files.Length; i++) { obsFile = new RinexObsFileReader(files[i]).ReadObsFile(); progressBar1.PerformStep(); progressBar1.Refresh(); throw new Exception("to be fiexd"); //if (!obsFile.Header.ObserTypes.Contains(P1)) //{ // File.Delete(files[time]); // continue; //} RinexEpochObservation firstobservation = obsFile.GetEpochObservation(obsFile.StartTime); //获取GPS卫星 List <SatelliteNumber> firstsats = firstobservation.Prns; List <SatelliteNumber> gpssats = new List <SatelliteNumber>(); foreach (var item in firstsats) { if (item.SatelliteType == SatelliteType.G) { gpssats.Add(item); } } bool hasp1p2 = false; foreach (var prn in gpssats) { if (firstobservation[prn][P1].Value != 0) { hasp1p2 = true; } } if (!hasp1p2) { File.Delete(files[i]); } } }
/// <summary> /// 单系统的观测数据 /// </summary> /// <param name="obj"></param> protected override void dataProvider_EpochObservationReceived(RinexEpochObservation obj) { if (obj == null || obj.Count == 0 || obj.Prns[0].SatelliteType != SatelliteType.G) { return; } ObsFile.Add(obj); currentTime = obj.ReceiverTime; RTSp3InfoCorrected(obj); if (NavFile.Count != 0) { CheckAndPosition(obj); } }
public RinexEpochObservation GetEpochObservation(GlonassEpochMessage EpochMessage) { RinexEpochObservation rinex = new RinexEpochObservation(); rinex.ReceiverTime = EpochMessage.Header.Time; foreach (var item in EpochMessage) { var msg = item as GlonassNormalMessage1012; RinexSatObsData satData = GetSatObsData(msg); rinex.Add(satData.Prn, satData); } return(rinex); }
public void Positioning(RinexEpochObservation obj) { // this.ObsFile.Header = obj.Header; if (obj == null || obj.Count == 0) { return; } var EpochInfoBuilder = new RinexEpochInfoBuilder(obj.Header.ObsInfo.SatelliteTypes); var epochInfo = EpochInfoBuilder.Build(obj); if (epochInfo.First.FrequencyCount < 2) { return; } //RTSp3InfoCorrected(obj.Time); Solver.RawRevise(epochInfo); Solver.PreProcess(epochInfo); Solver.Run(epochInfo); if (Solver.CurrentGnssResult is BaseGnssResult) { var result = ((BaseGnssResult)Solver.CurrentGnssResult); if (obj.Header.ApproxXyz == null || obj.Header.ApproxXyz.IsZero) { obj.Header.ApproxXyz = result.EstimatedXyz; Solver.RawRevise(epochInfo); Solver.PreProcess(epochInfo); Solver.Run(epochInfo); } if (Solver.CurrentGnssResult != null) { log.Info(obj.Name + "\t" + obj.ReceiverTime + ":\t" + result.XyzCorrection + ":\t" + result.EstimatedXyzRms + ""); } else { log.Info(obj + "结果为空。"); } } }
/// <summary> /// 转换一个历元 /// </summary> /// <param name="table"></param> /// <param name="epochInfo"></param> private static void ObsToRow(ObjectTableStorage table, RinexEpochObservation epochInfo) { table.NewRow(); //加下划线,确保排序为第一个 table.AddItem("Epoch", epochInfo.ReceiverTime.DateTime); foreach (var sat in epochInfo) { foreach (var phase in sat) { var satprn = phase.Key; var val = phase.Value.Value; if (Geo.Utils.DoubleUtil.IsValid(val)) { table.AddItem(sat.Prn + "_" + phase.Key, val); } } } table.EndRow(); }
/// <summary> /// 已接收历元数据 /// </summary> /// <param name="obj"></param> void RtcmDataParser_EpochObservationReceived(RinexEpochObservation obj) { // RtGnssDataWriter.WriteEpochObservation(obj); }
/// <summary> /// 实时星历改正。 /// </summary> /// <param name="obs"></param> /// <param name="maxCorrectionSecond">允许的最大改正秒数,是否该每颗卫星单独考虑</param> protected void RTSp3InfoCorrected(RinexEpochObservation obs, double maxCorrectionSecond = 60)//Time time, SatelliteType satType) { Time time = obs.ReceiverTime; if (SSRSp3Section.Count == 0) { return; } if (time - SSRSp3Section.GetMaxTime() > maxCorrectionSecond) { return; } Sp3Section Sp3Section = new Sp3Section(); var keys = SSRSp3Section.Keys; foreach (var key in keys) { var obj = SSRSp3Section[key]; foreach (var item in obj) { if (!NavFile.Prns.Contains(item.Prn)) { continue; } var ss = new SingleParamNavFileEphService(NavFile); var unkown = NavFile.GetEphemerisParams(item.Prn).Find(b => Math.Abs(b.Time.TickTime.TotalSeconds - time.TickTime.TotalSeconds) < 3 * 3600); if (unkown == null) { continue; } if (ss == null) { continue; } Ephemeris ss1 = ss.Get(item.Prn, time); XYZ eA = ss1.XyzDot / ss1.XyzDot.Length; XYZ eC = ss1.XYZ.Cross(ss1.XyzDot) / (ss1.XYZ.Cross(ss1.XyzDot)).Length; XYZ eR = eA.Cross(eC) / (eA.Cross(eC)).Length; XYZ deltaO = item.XYZ + item.XyzDot * (time.TickTime.TotalSeconds - item.Time.TickTime.TotalSeconds); double x = eR.X * deltaO.X + eA.X * deltaO.Y + eC.X * deltaO.Z; double y = eR.Y * deltaO.X + eA.Y * deltaO.Y + eC.Y * deltaO.Z; double z = eR.Z * deltaO.X + eA.Z * deltaO.Y + eC.Z * deltaO.Z; if (x * x + y * y + z * z > 100) { } Ephemeris Sp3Record = new Ephemeris(); Sp3Record.Prn = item.Prn; Sp3Record.XYZ = ss1.XYZ - new XYZ(x, y, z); Sp3Record.Time = time; if (item.Prn.SatelliteType == SatelliteType.R) { Sp3Record.ClockBias = ss1.ClockBias + item.ClockBias; } else { double relativetime = 2 * ss1.XYZ.Dot(ss1.XyzDot) / (GnssConst.LIGHT_SPEED * GnssConst.LIGHT_SPEED); Sp3Record.ClockBias = ss1.ClockBias - ss1.RelativeCorrection - item.ClockBias; //relativetime + key.ClockBias; } Sp3Section.Add(Sp3Record.Prn, Sp3Record); } } if (Sp3Section.Count != 0) { Sp3Section.Time = time; Sp3File.Add(Sp3Section); } else { int a = 0; } if (Sp3File.Count > 11) { // Sp3File.Header = new Sp3Header(); Sp3File.Header.EpochInterval = 1; //Sp3File.TimePeriod = new BufferedTimePeriod(Sp3File.First.Time, Sp3File.Last.Time, 60); if (EphemerisService == null) { EphemerisService = new SingleSp3FileEphService(this.Sp3File.GetSatEphemerisCollection(), 10); } else { ((SingleSp3FileEphService)EphemerisService).SetSp3File(Sp3File.GetSatEphemerisCollection()); } } if (Sp3File.Count > 20) { Sp3File.RemoveFirst(); } }
/// <summary> /// RTCM MSM文件信息转换为观测文件信息.此处返回的是RINEX3.0的数据类型。 /// </summary> /// <param name="msg"></param> /// <param name="HeaderOfMSM"></param> /// <returns></returns> public RinexEpochObservation GetRinexEpochObservation(BaseMSM msg, HeaderOfMSM HeaderOfMSM) { RinexEpochObservation RinexEpochObservation = new RinexEpochObservation(); uint messageNumber = HeaderOfMSM.MessageNumber; double wavelength = 0; int frequencyBand = 0; string str = null; string attribute = null; double P = 0, L = 0, D = 0, S = 0; int j = 0; int index = 0; double p = 0; SatelliteType satType = SatelliteType.G; for (int i = 0; i < HeaderOfMSM.SatCount; i++) { RinexSatObsData SatObsData = new RinexSatObsData(); for (int k = 0; k < HeaderOfMSM.Nsig; k++) { if (HeaderOfMSM.CellMask[index++] == 0) { continue; } if (messageNumber >= 1071 && messageNumber <= 1077)//GPS { satType = SatelliteType.G; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.G); str = msm_sig_gps[HeaderOfMSM.SignalMask[k] - 1]; frequencyBand = int.Parse(str.Substring(0, 1)); attribute = str.Substring(1, 1); if (frequencyBand == 1) { wavelength = Frequence.GpsL1.WaveLength; } else if (frequencyBand == 2) { wavelength = Frequence.GpsL2.WaveLength; } else if (frequencyBand == 5) { wavelength = Frequence.GpsL5.WaveLength; } } else if (messageNumber >= 1081 && messageNumber <= 1087)//GLONASS { satType = SatelliteType.R; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.R); } else if (messageNumber >= 1091 && messageNumber <= 1097)//GALILEO { satType = SatelliteType.E; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.E); } else if (messageNumber >= 1101 && messageNumber <= 1017)//SBS { satType = SatelliteType.S; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.S); } else if (messageNumber >= 1111 && messageNumber <= 1117)//QZS { satType = SatelliteType.J; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.J); } else if (messageNumber >= 1121 && messageNumber <= 1127)//BDS { satType = SatelliteType.C; SatObsData.Prn = new SatelliteNumber(HeaderOfMSM.SatlliteMask[i], SatelliteType.C); str = msm_sig_gps[HeaderOfMSM.SignalMask[k] - 1]; frequencyBand = int.Parse(str.Substring(0, 1)); attribute = str.Substring(1, 1); if (frequencyBand == 2) { wavelength = Frequence.CompassB1.WaveLength; } else if (frequencyBand == 6) { wavelength = Frequence.CompassB3.WaveLength; } else if (frequencyBand == 7) { wavelength = Frequence.CompassB2.WaveLength; } } var ObservationCodeOfC = new ObservationCode(ObservationType.C, frequencyBand, attribute); var ObservationCodeOfL = new ObservationCode(ObservationType.L, frequencyBand, attribute); var ObservationCodeOfS = new ObservationCode(ObservationType.S, frequencyBand, attribute); var ObservationCodeOfD = new ObservationCode(ObservationType.D, frequencyBand, attribute); if (msg.NumberOfIntegerMsInSatRoughRange.Count != 0) { p = msg.NumberOfIntegerMsInSatRoughRange[i] * 0.001 + msg.SatelliteRoughRangesModulo1ms[i] * Math.Pow(2, -13); } else { p = msg.SatelliteRoughRangesModulo1ms[i] * Math.Pow(2, -13); } if (msg.SignalFinePseudorange.Count != 0) { P = msg.SignalFinePseudorange[j] * Math.Pow(2, -24) + p; } else if (msg.SignalFinePseudorangeWithExtendedResolution.Count != 0) { P = msg.SignalFinePseudorangeWithExtendedResolution[j] * Math.Pow(2, -29) + p; } P = P * RtcmConst.LightSpeedPerMillisecond; if (msg.SignalFinePhaseRange.Count != 0) { L = msg.SignalFinePhaseRange[j] * Math.Pow(2, -29) + p; } else if (msg.SignalFinePhaseRangeWithExtendedResolution.Count != 0) { L = msg.SignalFinePhaseRangeWithExtendedResolution[j] * Math.Pow(2, -31) + p; } L = L * RtcmConst.LightSpeedPerMillisecond / wavelength; if (msg.PhaseRangeLockTimeIndicator.Count != 0) { S = msg.PhaseRangeLockTimeIndicator[j]; } else if (msg.PhaseRangeLockTimeIndicatorWithExtendedRangeAndResolution[j] != 0) { S = msg.PhaseRangeLockTimeIndicatorWithExtendedRangeAndResolution[j]; } if (messageNumber % 10 == 5 || messageNumber % 10 == 7 && msg.SatRoughPhaseRangeRate.Count != 0) { if (msg.SatRoughPhaseRangeRate[i] > -1638.4) { D = -(msg.SatRoughPhaseRangeRate[i] * 0.001 + msg.SignalFinePhaseRangeRate[j] * 0.0001) / wavelength; } } SatObsData.Add(ObservationCodeOfC.ToString(), P); SatObsData.Add(ObservationCodeOfL.ToString(), L); SatObsData.Add(ObservationCodeOfS.ToString(), S); SatObsData.Add(ObservationCodeOfD.ToString(), D); //更新头部信息 var obsCodes = new List <string>(); obsCodes.Add(ObservationCodeOfC.ToString()); obsCodes.Add(ObservationCodeOfL.ToString()); obsCodes.Add(ObservationCodeOfS.ToString()); obsCodes.Add(ObservationCodeOfD.ToString()); if (ObsHeader != null) { ObsHeader.ObsCodes[satType] = obsCodes; } j++; } RinexEpochObservation.Add(SatObsData.Prn, SatObsData); } RinexEpochObservation.Header = ObsHeader; RinexEpochObservation.ReceiverTime = HeaderOfMSM.EpochTime; return(RinexEpochObservation); }
protected virtual void dataProvider_EpochObservationReceived(RinexEpochObservation obj) { }
protected override void dataProvider_EpochObservationReceived(RinexEpochObservation obj) { this.WriteEpochObservation(obj); }
/// <summary> /// 判断是否是新历元 /// </summary> /// <param name="currentEpochInfo"></param> /// <param name="currentTimeNanos"></param> /// <param name="timeNanos"></param> /// <returns></returns> private bool IsNewEpoch(RinexEpochObservation currentEpochInfo, long currentTimeNanos, long timeNanos) { return(currentTimeNanos != timeNanos || currentEpochInfo == null); }
/// <summary> /// 解析一行数据。 /// </summary> /// <param name="item"></param> /// <returns></returns> private RinexSatObsData ParseOneRecord(Dictionary <string, object> item) { RinexSatObsData satData = null; #region 赋值 long timeNanos = ParseLong(item, TimeNanos); //当前时间到GPS起始时间的纳秒数,为负数。 long fullBiasNanos = ParseLong(item, FullBiasNanos); double biasNanos = ParseDouble(item, BiasNanos); double timeOffsetNanos = ParseDouble(item, TimeOffsetNanos); long receivedSvTimeNanos = ParseLong(item, ReceivedSvTimeNanos); long receivedSvTimeUncertaintyNanos = ParseLong(item, ReceivedSvTimeUncertaintyNanos); int hardwareClockDiscontinuityCount = ParseInt(item, HardwareClockDiscontinuityCount); int accumulatedDeltaRangeState = ParseInt(item, AccumulatedDeltaRangeState); double cn0DbHz = ParseDouble(item, Cn0DbHz); double accumulatedDeltaRangeMeters = ParseDouble(item, AccumulatedDeltaRangeMeters); #endregion SatelliteNumber prn = ParsePrn(item); //伪距不确定度太大,本数据作废 if (receivedSvTimeUncertaintyNanos > 1e8) { log.Debug(prn + " 卫星时间不确定度太大,忽略本数据 " + receivedSvTimeUncertaintyNanos); return(satData); }//简单判断伪距 //如果钟跳发生了,或指定的被减伪距值无效,则重置被减伪距 bool isClockDisCountChanged = (_prevHardwareClockDisCount != hardwareClockDiscontinuityCount); _prevHardwareClockDisCount = hardwareClockDiscontinuityCount; //决定是否新建时间计算器。 if (TimeConverter == null || !TimeConverter.IsEpochValid) { TimeConverter = new AndroidGnssTimeConverter(fullBiasNanos, Option.IsFromFirstEpoch);//fullBiasNanos值并不准确,含有偏差,不能用于计算所有伪距。 if (!TimeConverter.IsEpochValid) { log.Debug("当前历元时间不合法," + TimeConverter.FirstEpochOfUtc + ",将重试。"); return(satData); } } TimeConverter.SetFullBias(fullBiasNanos) .SetTimeNanos(timeNanos) .SeBiasNanos(biasNanos) .SetTimeOffsetNanos(timeOffsetNanos); Time currentUtcTime = TimeConverter.GetReceiverUtcTime(); TimeConverter.SetSatelliteType(prn.SatelliteType); //若是新历元 if (IsNewEpoch(CurrentEpochInfo, _currentTimeNanos, timeNanos)) //新历元 { _currentTimeNanos = timeNanos; //记录当接收机时间,用于判断是否是同一个历元 CurrentEpochInfo = new RinexEpochObservation(currentUtcTime); RinexOFile.Add(CurrentEpochInfo); } //计算伪距 double transTime = TimeConverter.GetTransmissionTime(receivedSvTimeNanos); double C1 = transTime * GnssConst.LIGHT_SPEED; bool isPassed = CheckPsuedorange(ref prn, C1); if (!isPassed) { C1 = 0; } if (C1 == 0 && Option.IsSkipZeroPseudorange) { log.Debug(currentUtcTime + ", " + prn + "伪距为0,忽略本数据 "); return(satData); } if (accumulatedDeltaRangeMeters == 0 && Option.IsSkipZeroPhase) { log.Debug(currentUtcTime + ", " + prn + "载波为 0,忽略本数据 "); return(satData); } //时间积累差,带来的近距离变化差 double timeErrorDistance = TimeConverter.GetDifferDistance(); var phaseRange = accumulatedDeltaRangeMeters - timeErrorDistance;//相位距离 var aligner = NumericalAlignerManager.GetOrCreate(prn); if (isClockDisCountChanged) //如果钟跳发生,则将第一个差分伪距设置为当前伪距值。 { aligner.IsReset = true; } phaseRange = aligner.GetAlignedValue(currentUtcTime, phaseRange, C1); double L1 = GetL1(phaseRange, prn, Option.IsToCylePhase); double S1 = cn0DbHz; double D1 = phaseRange; //test for range satData = BuildRinexSatObsData(prn, C1, L1, S1, D1); return(satData); }
/// <summary> /// 解析一个信息。 /// </summary> /// <param name="satData">传入的数据,包含一条完整帧的数据。</param> /// <param name="msgNumber">信息编号</param> private void ParseOneMessage(int msgNumber, List <byte> data) { #region 1001 - 1004 GPS 观测量相关 if (msgNumber >= 1001 && msgNumber <= 1004) { var gpsHeaderData = BinStringSequence.DeQueue(64); GpsMessageHeader RtcmHeader = GpsMessageHeader.Parse(gpsHeaderData); EpochMessage EpochMessage = new EpochMessage { Header = new NormalHeader(RtcmHeader) }; //本地时间同步 Setting.ReceivingTimeOfNtripData = EpochMessage.Header.Time; for (int i = 0; i < RtcmHeader.MessageCount; i++) { switch (msgNumber) { case 1001: Message1001 Message1001 = Message1001.Parse(BinStringSequence.DeQueue(58)); break; case 1002: Message1002 Message1002 = Message1002.Parse(BinStringSequence.DeQueue(74)); break; case 1003: Message1003 Message1003 = Message1003.Parse(BinStringSequence.DeQueue(101)); break; case 1004: Message1004 Message1004 = Message1004.Parse(BinStringSequence.DeQueue(125)); NormalMessage1004 msg = new NormalMessage1004(RtcmHeader, Message1004); #region 测试用,可删除 //name = Path.Combine(LocalDirectory, @"Rtcm3\Raw\Mormal_1004_" + msg.Prn + ".xls"); //Geo.Utils.FileUtil.CheckOrCreateDirectory(System.IO.Path.GetDirectoryName(name)); //if (!System.IO.File.Exists(name)) //{ // System.IO.File.AppendAllText(name, msg.GetTabTitles() + "\r\n"); //} //System.IO.File.AppendAllText(name, msg.GetTabValues() + "\r\n"); #endregion EpochMessage.Add(msg.Prn, msg); break; } } var EpochObservation = Rtcm3Converter.GetEpochObservation(EpochMessage); EpochObservation.Header = ObsHeader; EpochObservation.Name = SiteName; OnEpochObservationReceived(EpochObservation); } #endregion #region 1005-1013,1033,天线相关 int parsedLen = 0; //Antenna Description Messages switch (msgNumber) { case 1005: Message1005 Message1005 = Message1005.Parse(BinStringSequence.DeQueue(152)); break; case 1006: //测站参考点信息 Message1006 Message1006 = Message1006.Parse(BinStringSequence.DeQueue(168)); UpdateOFileHeader(Message1006); break; case 1007: Message1007 Message1007 = Message1007.Parse(data); parsedLen = 40 + (int)Message1007.DescriptorCounterN * 8; BinStringSequence.DeQueue(parsedLen); break; case 1008: Message1008 Message1008 = Message1008.Parse(data); parsedLen = 48 + (int)Message1008.DescriptorCounterN * 8 + (int)Message1008.SerialNumberCounterM * 8; BinStringSequence.DeQueue(parsedLen); break; case 1013: Message1013 Message1013 = Message1013.Parse(data); parsedLen = 70 + (int)Message1013.NoofMessageIDAnnouncementstoFollow_Nm * 29; BinStringSequence.DeQueue(parsedLen); break; case 1033: //天线信息 Message1033 Message1033 = Message1033.Parse(data); UpdateOFileHeader(Message1033); parsedLen = Message1033.Length; //parsedLen = 72 + // (Message1033.AntennaDescriptorCounterN // + Message1033.AntennaSerialNumberCounterM // + Message1033.ReceiverTypeDescriptorCounterI // + Message1033.ReceiverFirmwareVersionCounterJ // + Message1033.ReceiverSerialNumberCounterK // ) // * 8; BinStringSequence.DeQueue(parsedLen); break; } #endregion #region 1009 - 1012 Glonass 观测量相关 //Glonass if (msgNumber >= 1009 && msgNumber <= 1012) { var gpsHeaderData = BinStringSequence.DeQueue(61); GlonassMessageHeader RtcmHeader = GlonassMessageHeader.Parse(gpsHeaderData); GlonassEpochMessage EpochMessage = new GlonassEpochMessage { Header = new GlonassNormalHeader(RtcmHeader) }; //本地时间同步 Setting.ReceivingTimeOfNtripData = EpochMessage.Header.Time; for (int i = 0; i < RtcmHeader.MessageCount; i++) { switch (msgNumber) { case 1009: Message1009 Message1009 = Message1009.Parse(BinStringSequence.DeQueue(64)); break; case 1010: Message1010 Message1010 = Message1010.Parse(BinStringSequence.DeQueue(79)); break; case 1011: Message1011 Message1011 = Message1011.Parse(BinStringSequence.DeQueue(107)); break; case 1012: Message1012 Message1012 = Message1012.Parse(BinStringSequence.DeQueue(130)); GlonassNormalMessage1012 msg = new GlonassNormalMessage1012(RtcmHeader, Message1012); EpochMessage.Add(msg.Prn, msg); break; default: break; } } var EpochObservation = Rtcm3Converter.GetEpochObservation(EpochMessage); EpochObservation.Header = ObsHeader; EpochObservation.Name = SiteName; OnEpochObservationReceived(EpochObservation); } #endregion #region 1019、1020、1044-1046 各系统星历数据 #region message1019 GPS 星历数据 if (msgNumber == 1019) { Message1019 msg = Message1019.Parse(BinStringSequence.DeQueue(488)); var EphemerisObs = EphMessageConverter.GetEphemerisParam(msg); OnEphemerisInfoReceived(EphemerisObs); } #endregion #region message1020 GLONASS 星历数据 if (msgNumber == 1020) { Message1020 msg = Message1020.Parse(BinStringSequence.DeQueue(360)); RtcmEphMessageConverter EphMessageConverter = new RtcmEphMessageConverter(); var EphemerisObs = EphMessageConverter.GlonassNavRecord(msg); OnGlonassNavRecordReceived(EphemerisObs); } #endregion #region message63 BDS 星历数据 if (msgNumber == 63) { Message63 msg = Message63.Parse(BinStringSequence.DeQueue(511)); var EphemerisObs = EphMessageConverter.GetEphemerisParam(msg); OnEphemerisInfoReceived(EphemerisObs); } #endregion #region message1044 QZSS 星历数据 if (msgNumber == 1044) { Message1044 msg = Message1044.Parse(BinStringSequence.DeQueue(485)); var EphemerisObs = EphMessageConverter.GetEphemerisParam(msg); OnEphemerisInfoReceived(EphemerisObs); } #endregion #region message1045 Galileo 星历数据 if (msgNumber == 1045) { Message1045 msg = Message1045.Parse(BinStringSequence.DeQueue(496)); var EphemerisObs = EphMessageConverter.GetEphemerisParam(msg); OnEphemerisInfoReceived(EphemerisObs); } #endregion #endregion #region message1057 - 1062 GPS SSR SSRMessageConverter = new RtcmSSRMessageConverter(); if (msgNumber == 1057)//SSR GPS Orbit Correction { var SSRGpsOrbitHeaderData = BinStringSequence.DeQueue(68); SSRGpsHeader68 SSRGpsOrbitHeader = SSRGpsHeader68.Parse(SSRGpsOrbitHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGpsOrbitHeader.NoofSatellite; i++) { var Sp3Record = new Ephemeris(); Message1057 Message1057 = Message1057.Parse(BinStringSequence.DeQueue(135)); Sp3Record = SSRMessageConverter.GetSp3Param(Message1057, SSRGpsOrbitHeader); Sp3Section.Add(Sp3Record.Prn, Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1058) { var SSRGpsClockCorrectionHeaderData = BinStringSequence.DeQueue(67); SSRGpsHeader67 SSRGpsClockCorrectionHeader = SSRGpsHeader67.Parse(SSRGpsClockCorrectionHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGpsClockCorrectionHeader.NoofSatellite; i++) { Message1058 Message1058 = Message1058.Parse(BinStringSequence.DeQueue(76)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1058, SSRGpsClockCorrectionHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } //if (Sp3Section.Count != 0 && msgNumber == 1058) if (msgNumber == 1059) { var SSRGpsSatelliteCodeBiasHeaderData = BinStringSequence.DeQueue(67); SSRGpsHeader67 SSRGpsSatelliteCodeBiasHeader = SSRGpsHeader67.Parse(SSRGpsSatelliteCodeBiasHeaderData); Message1059 Message1059 = Message1059.Parse(BinStringSequence.DeQueue(30)); } if (msgNumber == 1060) { var SSRGpsCombinedHeaderData = BinStringSequence.DeQueue(68); SSRGpsHeader68 SSRGpsCombinedHeader = SSRGpsHeader68.Parse(SSRGpsCombinedHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGpsCombinedHeader.NoofSatellite; i++) { Message1060 Message1060 = Message1060.Parse(BinStringSequence.DeQueue(205)); NormalMessage1060 msg = new NormalMessage1060(Message1060); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1060, SSRGpsCombinedHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1061) { var SSRGpsURAHeaderData = BinStringSequence.DeQueue(67); SSRGpsHeader67 SSRGpsURAHeader = SSRGpsHeader67.Parse(SSRGpsURAHeaderData); Message1061 Message1061 = Message1061.Parse(BinStringSequence.DeQueue(12)); } if (msgNumber == 1062) { var SSRGpsHighRateClockHeaderData = BinStringSequence.DeQueue(67); SSRGpsHeader67 SSRGpsHighRateClockHeader = SSRGpsHeader67.Parse(SSRGpsHighRateClockHeaderData); Message1062 Message1062 = Message1062.Parse(BinStringSequence.DeQueue(28)); } #endregion #region message1063 - 1068 GLONASS SSR if (msgNumber == 1063)//SSR GLONASS Orbit Correction { var SSRGlonassOrbitHeaderData = BinStringSequence.DeQueue(65); SSRGlonassHeader65 SSRGlonassOrbitHeader = SSRGlonassHeader65.Parse(SSRGlonassOrbitHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGlonassOrbitHeader.NoofSatellite; i++) { Message1063 Message1063 = Message1063.Parse(BinStringSequence.DeQueue(134)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1063, SSRGlonassOrbitHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } //OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1064) { var SSRGlonassClockCorrectionHeaderData = BinStringSequence.DeQueue(64); SSRGlonassHeader64 SSRGlonassClockCorrectionHeader = SSRGlonassHeader64.Parse(SSRGlonassClockCorrectionHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGlonassClockCorrectionHeader.NoofSatellite; i++) { Message1064 Message1064 = Message1064.Parse(BinStringSequence.DeQueue(75)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1064, SSRGlonassClockCorrectionHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } //OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1065) { var SSRGlonassSatelliteCodeBiasHeaderData = BinStringSequence.DeQueue(64); SSRGlonassHeader64 SSRGlonassSatelliteCodeBiasHeader = SSRGlonassHeader64.Parse(SSRGlonassSatelliteCodeBiasHeaderData); for (int i = 0; i < SSRGlonassSatelliteCodeBiasHeader.NoofSatellite; i++) { Message1065 Message1065 = Message1065.Parse(BinStringSequence.DeQueue(30)); } } if (msgNumber == 1066) { var SSRGlonassCombinedHeaderData = BinStringSequence.DeQueue(65); SSRGlonassHeader65 SSRGlonassCombinedHeader = SSRGlonassHeader65.Parse(SSRGlonassCombinedHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGlonassCombinedHeader.NoofSatellite; i++) { Message1066 Message1066 = Message1066.Parse(BinStringSequence.DeQueue(204)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1066, SSRGlonassCombinedHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } //OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1067) { var SSRGlonassURAHeaderData = BinStringSequence.DeQueue(64); SSRGlonassHeader64 SSRGlonassURAHeader = SSRGlonassHeader64.Parse(SSRGlonassURAHeaderData); for (int i = 0; i < SSRGlonassURAHeader.NoofSatellite; i++) { Message1067 Message1067 = Message1067.Parse(BinStringSequence.DeQueue(11)); } } if (msgNumber == 1068) { var SSRGlonassHighRateClockHeaderData = BinStringSequence.DeQueue(64); SSRGlonassHeader64 SSRGlonassHighRateClockHeader = SSRGlonassHeader64.Parse(SSRGlonassHighRateClockHeaderData); for (int i = 0; i < SSRGlonassHighRateClockHeader.NoofSatellite; i++) { Message1068 Message1068 = Message1068.Parse(BinStringSequence.DeQueue(27)); } } #endregion #region message1258 - 1263 BeiDou SSR //var Sp3Record = new Sp3Record(); SSRMessageConverter = new RtcmSSRMessageConverter(); if (msgNumber == 1258)//SSR BeiDou Orbit Correction { var SSRBeiDouOrbitHeaderData = BinStringSequence.DeQueue(68); SSRBeiDouHeader68 SSRBeiDouOrbitHeader = SSRBeiDouHeader68.Parse(SSRBeiDouOrbitHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRBeiDouOrbitHeader.NoofSatellite; i++) { Message1258 Message1258 = Message1258.Parse(BinStringSequence.DeQueue(161)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1258, SSRBeiDouOrbitHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1259) { var SSRBeiDouClockCorrectionHeaderData = BinStringSequence.DeQueue(67); SSRBeiDouHeader67 SSRBeiDouClockCorrectionHeader = SSRBeiDouHeader67.Parse(SSRBeiDouClockCorrectionHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRBeiDouClockCorrectionHeader.NoofSatellite; i++) { Message1259 Message1259 = Message1259.Parse(BinStringSequence.DeQueue(76)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1259, SSRBeiDouClockCorrectionHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } //if (Sp3Section.Count != 0 && msgNumber == 1058) if (msgNumber == 1260) { var SSRBeiDouSatelliteCodeBiasHeaderData = BinStringSequence.DeQueue(67); SSRBeiDouHeader67 SSRBeiDouSatelliteCodeBiasHeader = SSRBeiDouHeader67.Parse(SSRBeiDouSatelliteCodeBiasHeaderData); Message1260 Message1260 = Message1260.Parse(BinStringSequence.DeQueue(30)); } if (msgNumber == 1261) { var SSRBeiDouCombinedHeaderData = BinStringSequence.DeQueue(68); SSRBeiDouHeader68 SSRBeiDouCombinedHeader = SSRBeiDouHeader68.Parse(SSRBeiDouCombinedHeaderData); Sp3Section Sp3Section = new Sp3Section(); SSRMessage SSRMessage = new SSRMessage { }; for (int i = 0; i < SSRBeiDouCombinedHeader.NoofSatellite; i++) { Message1261 Message1261 = Message1261.Parse(BinStringSequence.DeQueue(231)); NormalMessage1261 msg = new NormalMessage1261(Message1261); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1261, SSRBeiDouCombinedHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1262) { var SSRBeiDouURAHeaderData = BinStringSequence.DeQueue(67); SSRBeiDouHeader67 SSRBeiDouURAHeader = SSRBeiDouHeader67.Parse(SSRBeiDouURAHeaderData); Message1262 Message1262 = Message1262.Parse(BinStringSequence.DeQueue(12)); } if (msgNumber == 1263) { var SSRBeiDouHighRateClockHeaderData = BinStringSequence.DeQueue(67); SSRBeiDouHeader67 SSRBeiDouHighRateClockHeader = SSRBeiDouHeader67.Parse(SSRBeiDouHighRateClockHeaderData); Message1263 Message1263 = Message1263.Parse(BinStringSequence.DeQueue(28)); } #endregion #region message1240 - 1245 Galileo SSR //var Sp3Record = new Sp3Record(); SSRMessageConverter = new RtcmSSRMessageConverter(); if (msgNumber == 1240)//SSR Galileo Orbit Correction { var SSRGalileoOrbitHeaderData = BinStringSequence.DeQueue(68); SSRGalileoHeader68 SSRGalileoOrbitHeader = SSRGalileoHeader68.Parse(SSRGalileoOrbitHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGalileoOrbitHeader.NoofSatellite; i++) { Message1240 Message1240 = Message1240.Parse(BinStringSequence.DeQueue(137)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1240, SSRGalileoOrbitHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1241) { var SSRGalileoClockCorrectionHeaderData = BinStringSequence.DeQueue(67); SSRGalileoHeader67 SSRGalileoClockCorrectionHeader = SSRGalileoHeader67.Parse(SSRGalileoClockCorrectionHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRGalileoClockCorrectionHeader.NoofSatellite; i++) { Message1241 Message1241 = Message1241.Parse(BinStringSequence.DeQueue(76)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1241, SSRGalileoClockCorrectionHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1242) { var SSRGalileoSatelliteCodeBiasHeaderData = BinStringSequence.DeQueue(67); SSRGalileoHeader67 SSRGalileoSatelliteCodeBiasHeader = SSRGalileoHeader67.Parse(SSRGalileoSatelliteCodeBiasHeaderData); for (int i = 0; i < SSRGalileoSatelliteCodeBiasHeader.NoofSatellite; i++) { } Message1242 Message1242 = Message1242.Parse(BinStringSequence.DeQueue(30)); } if (msgNumber == 1243) { var SSRGalileoCombinedHeaderData = BinStringSequence.DeQueue(68); SSRGalileoHeader68 SSRGalileoCombinedHeader = SSRGalileoHeader68.Parse(SSRGalileoCombinedHeaderData); Sp3Section Sp3Section = new Sp3Section(); SSRMessage SSRMessage = new SSRMessage { }; for (int i = 0; i < SSRGalileoCombinedHeader.NoofSatellite; i++) { Message1243 Message1243 = Message1243.Parse(BinStringSequence.DeQueue(207)); NormalMessage1243 msg = new NormalMessage1243(Message1243); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1243, SSRGalileoCombinedHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1244) { var SSRGalileoURAHeaderData = BinStringSequence.DeQueue(67); SSRGalileoHeader67 SSRGalileoURAHeader = SSRGalileoHeader67.Parse(SSRGalileoURAHeaderData); Message1244 Message1244 = Message1244.Parse(BinStringSequence.DeQueue(12)); } if (msgNumber == 1245) { var SSRGalileoHighRateClockHeaderData = BinStringSequence.DeQueue(67); SSRGalileoHeader67 SSRGalileoHighRateClockHeader = SSRGalileoHeader67.Parse(SSRGalileoHighRateClockHeaderData); Message1245 Message1245 = Message1245.Parse(BinStringSequence.DeQueue(28)); } #endregion #region message1246 - 1251 QZSS SSR SSRMessageConverter = new RtcmSSRMessageConverter(); if (msgNumber == 1246)//SSR QZSS Orbit Correction { var SSRQZSSOrbitHeaderData = BinStringSequence.DeQueue(68); SSRQZSSHeader68 SSRQZSSOrbitHeader = SSRQZSSHeader68.Parse(SSRQZSSOrbitHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRQZSSOrbitHeader.NoofSatellite; i++) { Message1246 Message1246 = Message1246.Parse(BinStringSequence.DeQueue(133)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1246, SSRQZSSOrbitHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1247) { var SSRQZSSClockCorrectionHeaderData = BinStringSequence.DeQueue(67); SSRQZSSHeader67 SSRQZSSClockCorrectionHeader = SSRQZSSHeader67.Parse(SSRQZSSClockCorrectionHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRQZSSClockCorrectionHeader.NoofSatellite; i++) { Message1247 Message1247 = Message1247.Parse(BinStringSequence.DeQueue(74)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1247, SSRQZSSClockCorrectionHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1248) { var SSRQZSSSatelliteCodeBiasHeaderData = BinStringSequence.DeQueue(67); SSRQZSSHeader67 SSRQZSSSatelliteCodeBiasHeader = SSRQZSSHeader67.Parse(SSRQZSSSatelliteCodeBiasHeaderData); Message1248 Message1248 = Message1248.Parse(BinStringSequence.DeQueue(30)); } if (msgNumber == 1249) { var SSRQZSSCombinedHeaderData = BinStringSequence.DeQueue(68); SSRQZSSHeader68 SSRQZSSCombinedHeader = SSRQZSSHeader68.Parse(SSRQZSSCombinedHeaderData); SSRMessage SSRMessage = new SSRMessage { }; for (int i = 0; i < SSRQZSSCombinedHeader.NoofSatellite; i++) { Message1249 Message1249 = Message1249.Parse(BinStringSequence.DeQueue(203)); NormalMessage1249 msg = new NormalMessage1249(Message1249); } } if (msgNumber == 1250) { var SSRQZSSURAHeaderData = BinStringSequence.DeQueue(67); SSRQZSSHeader67 SSRQZSSURAHeader = SSRQZSSHeader67.Parse(SSRQZSSURAHeaderData); Message1250 Message1250 = Message1250.Parse(BinStringSequence.DeQueue(10)); } if (msgNumber == 1251) { var SSRQZSSHighRateClockHeaderData = BinStringSequence.DeQueue(67); SSRQZSSHeader67 SSRQZSSHighRateClockHeader = SSRQZSSHeader67.Parse(SSRQZSSHighRateClockHeaderData); Message1251 Message1251 = Message1251.Parse(BinStringSequence.DeQueue(26)); } #endregion #region message1252 - 1257 SBS SSR SSRMessageConverter = new RtcmSSRMessageConverter(); if (msgNumber == 1252)//SSR SBS Orbit Correction { var SSRSBSOrbitHeaderData = BinStringSequence.DeQueue(68); SSRSBSHeader68 SSRSBSOrbitHeader = SSRSBSHeader68.Parse(SSRSBSOrbitHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRSBSOrbitHeader.NoofSatellite; i++) { Message1252 Message1252 = Message1252.Parse(BinStringSequence.DeQueue(160)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1252, SSRSBSOrbitHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1253) { var SSRSBSClockCorrectionHeaderData = BinStringSequence.DeQueue(67); SSRSBSHeader67 SSRSBSClockCorrectionHeader = SSRSBSHeader67.Parse(SSRSBSClockCorrectionHeaderData); Sp3Section Sp3Section = new Sp3Section(); for (int i = 0; i < SSRSBSClockCorrectionHeader.NoofSatellite; i++) { Message1253 Message1253 = Message1253.Parse(BinStringSequence.DeQueue(76)); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1253, SSRSBSClockCorrectionHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } //if (Sp3Section.Count != 0 && msgNumber == 1058) if (msgNumber == 1254) { var SSRSBSSatelliteCodeBiasHeaderData = BinStringSequence.DeQueue(67); SSRSBSHeader67 SSRSBSSatelliteCodeBiasHeader = SSRSBSHeader67.Parse(SSRSBSSatelliteCodeBiasHeaderData); Message1254 Message1254 = Message1254.Parse(BinStringSequence.DeQueue(30)); } if (msgNumber == 1255) { var SSRSBSCombinedHeaderData = BinStringSequence.DeQueue(68); SSRSBSHeader68 SSRSBSCombinedHeader = SSRSBSHeader68.Parse(SSRSBSCombinedHeaderData); Sp3Section Sp3Section = new Sp3Section(); SSRMessage SSRMessage = new SSRMessage() { }; for (int i = 0; i < SSRSBSCombinedHeader.NoofSatellite; i++) { Message1255 Message1255 = Message1255.Parse(BinStringSequence.DeQueue(230)); NormalMessage1255 msg = new NormalMessage1255(Message1255); var Sp3Record = SSRMessageConverter.GetSp3Param(Message1255, SSRSBSCombinedHeader); Sp3Section.Add(Sp3Record.Prn, (Ephemeris)Sp3Record); Sp3Section.Time = Sp3Record.Time; } OnSSRSp3RecordReceived(Sp3Section); } if (msgNumber == 1256) { var SSRSBSURAHeaderData = BinStringSequence.DeQueue(67); SSRSBSHeader67 SSRSBSURAHeader = SSRSBSHeader67.Parse(SSRSBSURAHeaderData); Message1256 Message1256 = Message1256.Parse(BinStringSequence.DeQueue(12)); } if (msgNumber == 1257) { var SSRSBSHighRateClockHeaderData = BinStringSequence.DeQueue(67); SSRSBSHeader67 SSRSBSHighRateClockHeader = SSRSBSHeader67.Parse(SSRSBSHighRateClockHeaderData); Message1257 Message1257 = Message1257.Parse(BinStringSequence.DeQueue(28)); } #endregion #region MSM if (msgNumber >= 1071 && msgNumber <= 1077)//(msgNumber >= 1071 && msgNumber <= 1127) { RinexEpochObservation RinexEpochObservation = null; RtcmMsmMessageConverter RtcmMsmMessageConverter = new Ntrip.RtcmMsmMessageConverter(ObsHeader); HeaderOfMSM headerOfMsm = HeaderOfMSM.Parse(data); HeaderOfMSM = headerOfMsm; BinStringSequence.DeQueue(headerOfMsm.Length); int msmtype = msgNumber % 10; int Nsat = headerOfMsm.SatCount; int Ncell = headerOfMsm.Ncell; switch (msmtype) { case 1: MSM1 MSM1 = MSM1.Parse(BinStringSequence.DeQueue(Nsat * 10 + Ncell * 15), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM1, headerOfMsm); break; case 2: MSM2 MSM2 = MSM2.Parse(BinStringSequence.DeQueue(Nsat * 10 + Ncell * 27), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM2, headerOfMsm); break; case 3: MSM3 MSM3 = MSM3.Parse(BinStringSequence.DeQueue(Nsat * 10 + Ncell * 42), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM3, headerOfMsm); break; case 4: MSM4 MSM4 = MSM4.Parse(BinStringSequence.DeQueue(Nsat * 18 + Ncell * 48), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM4, headerOfMsm); break; case 5: MSM5 MSM5 = MSM5.Parse(BinStringSequence.DeQueue(Nsat * 36 + Ncell * 63), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM5, headerOfMsm); break; case 6: MSM6 MSM6 = MSM6.Parse(BinStringSequence.DeQueue(Nsat * 18 + Ncell * 65), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM6, headerOfMsm); break; case 7: MSM7 MSM7 = MSM7.Parse(BinStringSequence.DeQueue(Nsat * 36 + Ncell * 80), Nsat, Ncell); RinexEpochObservation = RtcmMsmMessageConverter.GetRinexEpochObservation(MSM7, headerOfMsm); break; default: break; } RinexEpochObservation.Name = this.SiteName; RinexEpochObservation.Header = ObsHeader; OnEpochObservationReceived(RinexEpochObservation); } #endregion }