/// <summary> /// 具体的执行 /// </summary> /// <param name="baseline"></param> /// <param name="outPath"></param> protected void Execute(Baseline baseline, string outPath) { if (PathUtil.IsValidPath(CurrentParam.EphemerisPath)) { if (this.EphemerisDataSource == null || this.EphemerisDataSource.Name != Path.GetFileName(CurrentParam.EphemerisPath)) { var sp3 = InputFileManager.GetLocalFilePath(CurrentParam.EphemerisPath, "*.sp3"); if (PathUtil.IsValidPath(sp3)) { this.EphemerisDataSource = EphemerisDataSourceFactory.Create(sp3); } } } if (PathUtil.IsValidPath(CurrentParam.ClockPath)) { if (this.ClockFile == null || this.ClockFile.Name != Path.GetFileName(CurrentParam.ClockPath)) { var clk = InputFileManager.GetLocalFilePath(CurrentParam.ClockPath, "*.clk"); if (PathUtil.IsValidPath(clk)) { this.ClockFile = new Data.SimpleClockService(clk); } } } var refPath = ObsFiles.Find(m => m.ToLower().Contains(baseline.StartName.ToLower())); var rovPath = ObsFiles.Find(m => m.ToLower().Contains(baseline.EndName.ToLower())); if (refPath == null || rovPath == null) { throw new ArgumentException("没有找到基线对应的文件!" + baseline.ToString()); return; } var inputPathes = new string[] { refPath, rovPath }; RinexFileObsDataSource refObsDataSource = new RinexFileObsDataSource(refPath, true); RinexFileObsDataSource rovObsDataSource = new RinexFileObsDataSource(rovPath, true); if (SiteInfoDics != null) { var siteName = baseline.StartName.ToUpper(); if (SiteInfoDics.ContainsKey(siteName)) { refObsDataSource.SiteInfo.SetApproxXyz(SiteInfoDics[siteName].EstimatedXyz); } siteName = baseline.EndName.ToUpper(); if (SiteInfoDics.ContainsKey(siteName)) { rovObsDataSource.SiteInfo.SetApproxXyz(SiteInfoDics[siteName].EstimatedXyz); } } GnssProcessOption option = GnssProcessOption.GetDefault(GnsserConfig, refObsDataSource.ObsInfo); option.GnssSolverType = GnssSolverType.无电离层双差; var source = new MultiSiteObsStream(inputPathes, BaseSiteSelectType.GeoCenter, true, ""); DataSourceContext context = DataSourceContext.LoadDefault(option, source, EphemerisDataSource, ClockFile); IntegralGnssFileSolver Solver = new IntegralGnssFileSolver(); Solver.Completed += Solver_Completed; Solver.Option = option; Solver.IsCancel = false; Solver.Solver = GnssSolverFactory.Create(context, option);; Solver.Init(inputPathes); Solver.Run(); var last = Solver.CurrentGnssResult; lock (locker) { Geo.Utils.FileUtil.CheckOrCreateDirectory(Path.GetDirectoryName(outPath)); SaveLastResult(last); } }