/// <summary> /// 构建子时段名称,精确到分钟,以示区别。 /// </summary> /// <param name="current"></param> /// <param name="header"></param> /// <returns></returns> private string BuildSectionFileName(RinexEpochObservation current, RinexObsFileHeader header) { RinexFileNameBuilder nameBuilder = new RinexFileNameBuilder(); return(nameBuilder.Build(header)); var fileName = Path.GetFileNameWithoutExtension(this.FilePath); var extension = Path.GetExtension(this.FilePath); return(fileName + current.ReceiverTime.Hour.ToString("00") + "." + current.ReceiverTime.Minute.ToString("00") + extension); }
private static void OutputFile(string outDir, double outVersion, string currentSiteName, RinexObsFile currentFile, string readiedFilePath) { var extension = Path.GetExtension(readiedFilePath); RinexFileNameBuilder builder = new RinexFileNameBuilder(outVersion); var fileName = builder.Build(currentFile); string outputPath = Path.Combine(outDir, fileName); using (RinexObsFileWriter writer = new RinexObsFileWriter(outputPath, outVersion)) { writer.Write(currentFile); } }
private string BuildOutputFileName(string outFilePath) { string fileName = Path.GetFileName(outFilePath); if (Option.RinexNameType != RinexNameType.NoChange) { var nameVersion = 2.0; if (Option.RinexNameType == RinexNameType.RINEX3_LongName) { nameVersion = 3.0; } RinexFileNameBuilder nameBuilder = new RinexFileNameBuilder(nameVersion); if (Option.IsEnableTimePeriod) { if (this.CurrentHeader.StartTime < Option.TimePeriod.Start) { this.CurrentHeader.StartTime = Option.TimePeriod.Start; } if (this.CurrentHeader.EndTime > Option.TimePeriod.End) { this.CurrentHeader.EndTime = Option.TimePeriod.End; } if (this.Option.IsRoundFractionSecondToInt) { this.CurrentHeader.StartTime.RoundFractionSecondToInt(); this.CurrentHeader.EndTime.RoundFractionSecondToInt(); } } if (Option.IsEnableInterval) { if (this.CurrentHeader.Interval < Option.Interval) { this.CurrentHeader.Interval = Option.Interval; } } fileName = nameBuilder.Build(this.CurrentHeader); } if (this.Option.IsUpperFileName) { fileName = fileName.ToUpper(); } return(fileName); }
private string BuildOutputFileName(string outFilePath) { string fileName = Path.GetFileName(outFilePath); if (Option.RinexNameType != RinexNameType.保持不变) { var nameVersion = 2.0; if (Option.RinexNameType == RinexNameType.RINEX3长名称) { nameVersion = 3.0; } RinexFileNameBuilder nameBuilder = new RinexFileNameBuilder(nameVersion); if (Option.IsEnableTimePeriod) { if (this.CurrentHeader.StartTime < Option.TimePeriod.Start) { this.CurrentHeader.StartTime = Option.TimePeriod.Start; } if (this.CurrentHeader.EndTime > Option.TimePeriod.End) { this.CurrentHeader.EndTime = Option.TimePeriod.End; } } if (Option.IsEnableInterval) { if (this.CurrentHeader.Interval < Option.Interval) { this.CurrentHeader.Interval = Option.Interval; } } fileName = nameBuilder.Build(this.CurrentHeader); } return(fileName); }
/// <summary> /// 构建子时段名称,精确到分钟,以示区别。 /// </summary> /// <param name="current"></param> /// <returns></returns> private string BuildSectionFileName(EpochInformation current, RinexObsFileHeader header) { RinexFileNameBuilder nameBuilder = new RinexFileNameBuilder(); return(nameBuilder.Build(header)); }