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 SatConsecutiveAnalyst(header.Interval); foreach (var item in reader) { var obs = Domain.EpochInformation.Parse(item, item.Header.SatelliteTypes); processer.Revise(ref obs); } processer.SatSequentialPeriod.SaveSatPeriodText(outPath + "_SatSequentialPeriodChart.txt"); processer.SatSequentialPeriod.Opposite.SaveSatPeriodText(outPath + "_SatSequentialPeriodChartOpposite.txt"); File.WriteAllText(outPath + "__SatSequentialPeriod.txt", processer.SatSequentialPeriod.ToFormatedString(), Encoding.UTF8); File.WriteAllText(outPath + "__SatSequentialPeriodOpposite.txt", processer.SatSequentialPeriod.Opposite.ToFormatedString(), Encoding.UTF8); }