示例#1
0
        public override void Run()
        {
            List <string> failedPathes = new List <string>();

            this.RunningSolvers       = new System.Collections.Generic.List <IntegralGnssFileSolver>();
            this.PostionReportBuilder = null;

            log.Info("开始初始化,加载资源等。。。");
            DateTime start = DateTime.Now;

            //多时段探测,待做


            if (BaseLineNames == null)
            {
                log.Info("外部没有输入基线,即将选择基线...");
                this.BaseLineNames = BaseLineSelector.GetBaselines(OFilePathes);
            }

            // public List<BaseLineName> GetBaselineNames(string[] obsFilePaths)
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("所选基线:");
            foreach (var item in BaseLineNames)
            {
                sb.AppendLine(item.ToString());
            }
            log.Info(sb.ToString());


            if (BaseLineNames.Count > 1)
            {
                MultiRun(failedPathes, BaseLineNames);
            }
            else
            {
                SingleRun(failedPathes, BaseLineNames[0]);
            }
            this.Complete();
            RunningSolvers.Clear();
            var span = DateTime.Now - start;

            log.Info("计算完毕,耗时:" + span.ToString() + ", " + span.TotalSeconds / OFilePathes.Length + " 秒/个");


            if (failedPathes.Count > 0)
            {
                StringBuilder ssb = new StringBuilder();
                ssb.AppendLine("失败 " + failedPathes.Count + " 个文件(请在日志[Fatal]中查找原因):");
                foreach (var item in failedPathes)
                {
                    ssb.AppendLine(item);
                }
                log.Fatal(ssb.ToString());
            }
        }
示例#2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="Option"></param>
 /// <param name="oFilePathes"></param>
 /// <param name="nFilePath">星历路径,如果不设置,则自动匹配</param>
 /// <param name="clkPath">路径,如果不设置,则自动匹配</param>
 public TwoSiteBackGroundRunner(GnssProcessOption Option, string[] oFilePathes, string nFilePath = null, string clkPath = null) : base(Option, oFilePathes, nFilePath, clkPath)
 {
     BaseLineSelector = new BaseLineSelector(Option.BaseLineSelectionType, Option.IndicatedBaseSiteName, Option.BaseLineFilePath);
 }