protected override void Execute(string inPath, string outPath) { //先整体探测一遍。 Gnsser.Data.Rinex.RinexObsFileReader reader = new Data.Rinex.RinexObsFileReader(inPath); var oldHeader = reader.GetHeader(); var processer = new SatConsecutiveAnalyst(oldHeader.Interval); foreach (var item in reader) { var obs = Domain.EpochInformation.Parse(item, item.Header.SatelliteTypes); processer.Revise(ref obs); } var smallParts = processer.SatSequentialPeriod.GetFilteredPeriods(MinSuccessiveCount * oldHeader.Interval, true); //写入到流 Gnsser.Data.Rinex.RinexObsFileWriter writer = new Data.Rinex.RinexObsFileWriter(outPath, this.CurrentParam.OutputVersion); EpochInfoToRinex EpochInfoToRinex = new Domain.EpochInfoToRinex(3.02, false); // Gnsser.Data.Rinex.RinexObsFileHeader newHeader = null; int maxBufferEpoch = 200; int i = 0; reader.Reset(); foreach (var item in reader) { var epochInfo = Domain.EpochInformation.Parse(item, item.Header.SatelliteTypes); FilterSat(smallParts, epochInfo); var epochObs = EpochInfoToRinex.Build(epochInfo); if (newHeader == null) { newHeader = epochObs.Header; writer.WriteHeader(newHeader); } writer.WriteEpochObservation(epochObs); // throw new Exception("需要实现 EpochInformation 向 RinexEpcohObs 的转换"); if (i > maxBufferEpoch) { writer.Writer.Flush(); } i++; } writer.Writer.Close(); //cycleSlipProcesser.SatPeriodInfoManager.SaveSatPeriodText(outPath + "_BreakingChart.txt"); //File.WriteAllText(outPath + "__BreakingPeriod.txt", cycleSlipProcesser.SatPeriodInfoManager.ToFormatedString(), Encoding.UTF8); }
protected override void Execute(string inPath, string outPath) { Gnsser.Data.Rinex.RinexObsFileReader reader = new Data.Rinex.RinexObsFileReader(inPath); var header = reader.GetHeader(); var processer = new SatConsecutionAnalyst(40, 0, header.Interval); foreach (var item in reader) { var obs = Domain.EpochInformation.Parse(item, item.Header.SatelliteTypes); processer.Revise(ref obs); } processer.SatSequentialPeriod.SaveSatPeriodText(outPath + "_BreakingChart.txt"); File.WriteAllText(outPath + "__BreakingPeriod.txt", processer.SatSequentialPeriod.ToFormatedString(), Encoding.UTF8); }
/// <summary> /// 具体的执行. /// </summary> /// <param name="fileInPath"></param> /// <param name="fileOutPath"></param> protected override void Execute(string fileInPath, string fileOutPath) { Gnsser.Data.Rinex.RinexObsFileReader reader = new Data.Rinex.RinexObsFileReader(fileInPath); var oldHeader = reader.GetHeader(); var processer = new SatCycleSlipAnalyst(new List <SatelliteType>() { SatelliteType.G }, oldHeader.Interval); //写入到流 EpochInfoToRinex EpochInfoToRinex = new Domain.EpochInfoToRinex(this.CurrentParam.OutputVersion, false); Gnsser.Data.Rinex.RinexObsFileWriter writer = new Data.Rinex.RinexObsFileWriter(fileOutPath, this.CurrentParam.OutputVersion); Gnsser.Data.Rinex.RinexObsFileHeader newHeader = null; int maxBufferEpoch = 200; int i = 0; foreach (var item in reader) { //标记 var obs = Domain.EpochInformation.Parse(item, item.Header.SatelliteTypes); processer.Revise(ref obs); //写入文件 var epochObs = EpochInfoToRinex.Build(obs); if (newHeader == null) { newHeader = epochObs.Header; writer.WriteHeader(newHeader); } writer.WriteEpochObservation(EpochInfoToRinex.Build(obs)); if (i > maxBufferEpoch) { writer.Writer.Flush(); } } writer.Writer.Close(); processer.SatSequentialPeriod.SaveSatPeriodText(fileOutPath + "_CycleSlip.txt"); File.WriteAllText(fileOutPath + "__cycleSlipPeriod.txt", processer.SatSequentialPeriod.ToFormatedString(), Encoding.UTF8); }
protected override void Execute(string fileInPath, string fileOutPath) { Gnsser.Data.Rinex.RinexObsFileReader reader = new Data.Rinex.RinexObsFileReader(fileInPath); var header = reader.GetHeader(); var Analyst = new SatCycleSlipAnalyst(new List <SatelliteType>() { SatelliteType.G, SatelliteType.C, SatelliteType.R }, header.Interval); foreach (var item in reader) { var obs = Domain.EpochInformation.Parse(item, item.Header.SatelliteTypes); Analyst.Revise(ref obs); } Analyst.SatSequentialPeriod.SaveSatPeriodText(fileOutPath + "_cycleSlipChart.txt"); File.WriteAllText(fileOutPath + "__cycleSlipPeriod.txt", Analyst.SatSequentialPeriod.ToFormatedString(), Encoding.UTF8); }