protected override void Run(string[] obsPathes) { // var satEleDir = fileOpenControl_satElevation.FilePath;// @"D:\Data\2013[甘肃CORS数据]\1103\GpsOnly\GPS卫星高度角\"; var pppResults = fileOpenControl_pppResults.GetFilePathes("_Params" + Setting.TextTableFileExtension);// Directory.GetFiles(satEleDir); var angleCut = double.Parse(textBox_angleCut.Text); var abmiResultInCycle = PppTableResultFileReader.ReadPppAmbiResultInCycle(pppResults); var SatElevatoinTableBuilder = new SatElevatoinTableBuilder(obsPathes, SatelliteTypes, Interval); var satEleTables = SatElevatoinTableBuilder.Build(); var mw = new MwTableBuilder(obsPathes, AngleCut, namedIntControl_emptyRowCount.Value, OutputDirectory, this.SatelliteTypes).Build(); PeriodPrnManager PeriodPrnManager = BuildPeriodBasePrn(satEleTables); MultiPeriodBsdProductSolver solver = new MultiPeriodBsdProductSolver(abmiResultInCycle, mw, PeriodPrnManager); solver.MaxAllowedDiffer = namedFloatControl1maxAllowedDiffer.Value; solver.IsOutputFraction = IsOutputFraction; solver.IsOutputInt = IsOutputInt; solver.IsOutputSummary = IsOutputSummary; solver.Run(); //var solver = new BsdAmbiSolver(obsPathes, pppResults, this.SatelliteTypes[0], angleCut, namedIntControl_minSiteCount.Value, this.namedIntControl_minEpoch.Value, OutputDirectory); //solver.Run(); }
/// <summary> /// 构建基准星时段对象。 /// </summary> /// <param name="satEleTables"></param> /// <returns></returns> private PeriodPrnManager BuildPeriodBasePrn(ObjectTableManager satEleTables) { PeriodPrnManager PeriodPrnManager = null; var minSat = namedIntControl_minSiteCount.GetValue(); var minEpoch = namedIntControl_minEpoch.GetValue(); var baseSiteEle = fileOpenControl_satEleOfBaseSite.FilePath; if (baseSiteEle.Contains("SatEle.xls")) { ObjectTableReader reader = new ObjectTableReader(baseSiteEle); var satEleTable = reader.Read(); log.Info("成功读取卫星高度角文件"); PeriodFixedSatSelector BasePrnSelector = new PeriodFixedSatSelector(satEleTable, namedFloatControl1AngleCut.Value, TimePeriodCount, IsExpandPeriodOfSameSat); PeriodPrnManager = BasePrnSelector.Select(); } else if (baseSiteEle.Contains(".xls")) { PeriodPrnManager = PeriodPrnManager.ReadFromFile(baseSiteEle); } else { PeriodPrnManager = new PeriodFixedSatSelector(satEleTables.First, namedFloatControl1AngleCut.Value, TimePeriodCount, IsExpandPeriodOfSameSat).Select(); } return(PeriodPrnManager); }
protected override void Run(string[] inputPathes) { ObjectTableStorage satEleTable = GetSatEleTable(inputPathes); if (satEleTable == null) { return; } this.BindTableC(satEleTable); log.Info("成功读取卫星高度角文件"); AbstractPeriodBaseSatSelector BasePrnSelector = null; PeriodPrnManager PeriodPrnManager = null; string detailTableName = "BasePrnChainDetails"; if (!IsFlexibleSegmentaion) { var type = enumRadioControl1.GetCurrent <BaseSatSelectionType>(); detailTableName += "Of" + type + "_" + TimePeriodCount + "Count"; BasePrnSelector = new PeriodFixedSatSelector(satEleTable, namedFloatControl1AngleCut.Value, TimePeriodCount, IsExpandPeriodOfSamePrn, type); } else { detailTableName += "OfFlexible_" + namedFloatControl1AngleCut.Value + "deg"; BasePrnSelector = new FlexiblePeriodSatSelector(satEleTable, namedFloatControl1AngleCut.Value); } PeriodPrnManager = BasePrnSelector.Select(); var outPath = Path.Combine(this.OutputDirectory, Setting.GnsserConfig.BasePrnFileName); PeriodPrnManager.WriteToFile(outPath); //基准星接力 var mgr = new ObjectTableManager(this.OutputDirectory); var basePrnChain = mgr.AddTable(detailTableName); foreach (var item in PeriodPrnManager) { var vector = satEleTable.GetColObjectDicByObjIndex(item.Value.ToString(), item.TimePeriod.Start, item.TimePeriod.End); if (vector != null) { foreach (var prnVal in vector) { basePrnChain.NewRow(); basePrnChain.AddItem("Epoch", prnVal.Key); basePrnChain.AddItem(item.Value.ToString(), prnVal.Value); basePrnChain.EndRow(); } } } this.BindTableA(basePrnChain); this.BindTableB(BasePrnSelector.DetailResultTable); mgr.Add(BasePrnSelector.DetailResultTable); mgr.WriteAllToFileAndCloseStream(); var text = mgr.First.GetTextTable();// PeriodPrnManager.GetText(); ShowInfo(text); }
/// <summary> /// 构造函数。 /// </summary> /// <param name="SmoothedMwValue"></param> /// <param name="PeriodPrnManager"></param> /// <param name="OutputDirectory"></param> public MultiPeriodWideLaneOfBsdSolver(ObjectTableManager SmoothedMwValue, PeriodPrnManager PeriodPrnManager, int minSat = 1, int minEpoch = 1, bool IsOutputInEachDirectory = false, string OutputDirectory = null) { this.MinSatCount = minSat; this.MinEpoch = minEpoch; this.PeriodPrnManager = PeriodPrnManager; if (OutputDirectory != null) { this.OutputDirectory = OutputDirectory; } else { this.OutputDirectory = Setting.TempDirectory; } this.SmoothedMwValue = SmoothedMwValue; this.IsOutputInEachDirectory = IsOutputInEachDirectory; }
protected override void Run(string[] inputPathes) { PeriodPrnManager PeriodPrnManager = null; var minSat = namedIntControl_minSiteCount.GetValue(); var minEpoch = namedIntControl_minEpoch.GetValue(); var baseSiteEle = fileOpenControl_satEleOfBaseSite.FilePath; if (!File.Exists(baseSiteEle)) { Geo.Utils.FormUtil.ShowWarningMessageBox("必须输入时段选星文件或基准站卫星高度角文件。"); return; } if (baseSiteEle.Contains("SatEle.xls")) { ObjectTableReader reader = new ObjectTableReader(baseSiteEle); var satEleTable = reader.Read(); log.Info("成功读取卫星高度角文件"); PeriodFixedSatSelector BasePrnSelector = new PeriodFixedSatSelector(satEleTable, namedFloatControl1AngleCut.Value, TimePeriodCount, IsExpandPeriodOfSameSat); PeriodPrnManager = BasePrnSelector.Select(); } else { PeriodPrnManager = PeriodPrnManager.ReadFromFile(baseSiteEle); } var smoothedMws = ObjectTableManager.Read(inputPathes); smoothedMws.OutputDirectory = this.OutputDirectory; log.Info("准备计算"); var solver = new MultiPeriodWideLaneOfBsdSolver(smoothedMws, PeriodPrnManager, minSat, minEpoch, IsOutputInEachDirectory, OutputDirectory); solver.IsOutputFraction = IsOutputFraction; solver.IsOutputInt = IsOutputInt; solver.IsOutputSummary = IsOutputSummary; solver.Run(); }
/// <summary> /// 构造函数。基于表对象。 /// </summary> /// <param name="SmoothedMwValue"></param> /// <param name="PeriodPrnManager"></param> /// <param name="OutputDirectory"></param> public MultiPeriodBsdProductSolver(ObjectTableManager FloatAmbiguitiesOfPpp, ObjectTableManager SmoothedMwValue, PeriodPrnManager PeriodPrnManager, int minSite = 3, int minEpoch = 10, string OutputDirectory = null) { MaxAllowedDiffer = 0.25; this.MinSiteCount = minSite; this.MinEpoch = minEpoch; this.FloatAmbiguitiesOfPpp = FloatAmbiguitiesOfPpp; this.PeriodPrnManager = PeriodPrnManager; this.OutputDirectory = (OutputDirectory != null)? OutputDirectory : Setting.TempDirectory; this.SmoothedMwValue = SmoothedMwValue; }
/// <summary> /// 构造函数。基于文件路径。 /// </summary> /// <param name="pppResult"></param> /// <param name="obsPathes"></param> /// <param name="periodPrnPath"></param> public MultiPeriodBsdProductSolver(string[] pppResult, string[] obsPathes, string periodPrnPath) : this(PppTableResultFileReader.ReadPppAmbiResultInCycle(pppResult), ObjectTableManager.Read(obsPathes), PeriodPrnManager.ReadFromFile(periodPrnPath)) { }