コード例 #1
0
        /// <summary>
        /// 时段计算
        /// </summary>
        /// <param name="files"></param>
        /// <param name="Option"></param>
        /// <param name="netPeriod"></param>
        private void RunPpp(List <ObsSiteInfo> files, GnssProcessOption Option, TimePeriod netPeriod)
        {
            if (files.Count == 0)
            {
                log.Warn("没有文件!"); return;
            }

            //设置独立的输出目录
            var OriginalDirectory = Option.OutputDirectory;

            Option.OutputDirectory = Option.GetSolverDirectory(netPeriod);
            Geo.Utils.FileUtil.CheckOrCreateDirectory(Option.OutputDirectory);

            this.ObsSiteInfos = new ObsSiteInfos(files);
            var pppRunner = new PointPositionBackGroundRunner(Option, ObsSiteInfos.GetFilePathes().ToArray());

            pppRunner.ParallelConfig = ParallelConfig;
            pppRunner.ProgressViewer = ProgressViewer;
            pppRunner.Processed     += PppRunner_Processed;
            pppRunner.Completed     += PppRunner_Completed;
            pppRunner.Init();
            pppRunner.Run();

            //恢复目录
            Option.OutputDirectory = OriginalDirectory;
        }
コード例 #2
0
ファイル: AutoBaseLineSolver.cs プロジェクト: yxw027/GNSSer
        /// <summary>
        /// 解算基线
        /// </summary>
        /// <param name="sitebaseLines"></param>
        /// <param name="option"></param>
        /// <param name="netPeriod"></param>
        public void SolveBaseLine(List <SiteObsBaseline> sitebaseLines, GnssProcessOption option, TimePeriod netPeriod)
        {
            if (sitebaseLines == null || sitebaseLines.Count == 0)
            {
                log.Warn("没有计算数据!"); return;
            }
            this.CurrentOption = option;

            log.Info("即将解算指定的 " + sitebaseLines.Count + " 条基线。");
            List <GnssBaseLineName> baseLines = new List <GnssBaseLineName>()
            {
            };
            List <string> pathes = new List <string>();

            foreach (var item in sitebaseLines)
            {
                pathes.Add(item.Start.FilePath);
                pathes.Add(item.End.FilePath);

                //更新最新路径,当修改后存储在Temp目录中的需要更新地址
                item.LineName.RefFilePath = item.Start.FilePath;
                item.LineName.RovFilePath = item.End.FilePath;

                baseLines.Add(item.LineName);
            }
            //设置独立的输出目录
            this.OriginalDirectory = option.OutputDirectory;
            option.OutputDirectory = option.GetSolverDirectory(netPeriod);
            Geo.Utils.FileUtil.CheckOrCreateDirectory(option.OutputDirectory);

            TwoSiteBackGroundRunner runner = new TwoSiteBackGroundRunner(option, pathes.Distinct().ToArray(), baseLines);

            runner.ParallelConfig = ParallelConfig;
            runner.Completed     += Runner_Completed;
            runner.Processed     += OneSolver_Processed;
            //runner.ProgressViewer = progressBarComponent1;
            runner.Init();
            runner.Run();
        }