Example #1
0
        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();
        }
        protected override void Run(string[] oPathes)
        {
            this.BasePrn = baseSatSelectingControl1.SelectedPrn;
            //if (BasePrn.SatelliteType != SatelliteType.G)
            //{
            //    Geo.Utils.FormUtil.ShowWarningMessageBox("暂只支持GPS系统");
            //    return;
            //}

            this.ProgressBar.InitProcess(oPathes.LongLength);

            //输出的采样间隔
            var isAnasysOrTable = checkBox_anasysOrTable.Checked;
            var isSmoothRange   = checkBox_IsSmoothRange.Checked;

            if (isAnasysOrTable)//平均法
            {
                var builder = new SiteMwValueManagerBuilder(oPathes, AngleCut);
                builder.IsSmoothRange     = isSmoothRange;
                builder.OneFileProcessed += Builder_OneFileProcessed;

                var result = builder.Build();
                ProduceAndShow(result);
            }
            else //表格法,序贯平差法
            {
                var builder = new MwTableBuilder(oPathes, AngleCut, namedIntControl_emptyRowCount.Value, this.OutputDirectory, this.SatelliteTypes, IsOutputSmoothed);
                builder.AveMaxBreakCount = namedIntControl_aveMaxBeakCount.GetValue();
                builder.AveMaxDiffer     = namedFloatControl_aveMaxDiffer.GetValue();
                builder.AveMinCount      = namedIntControl_aveMinCount.GetValue();

                builder.IsSmoothRange     = isSmoothRange;
                builder.OneFileProcessed += Builder_OneFileProcessed;
                builder.Build();
                //输出
                log.Info("生成完毕,准备输出。");

                this.BindTableA(builder.RawMwValue.First);
                this.BindTableB(builder.MwPeriodAverage);

                //是否生成和输出平滑MW
                if (IsOutputSmoothed)
                {
                    this.BindTableB(builder.SmoothedMwValue.First);
                    this.BindTableC(builder.FractionOfSmoothedMwValue.First);

                    builder.SmoothedMwValue.WriteAllToFileAndClearBuffer(builder.SmoothedMwValue.First);
                }
                //是否输出原始数据
                if (IsOutputRawMw)
                {
                    builder.RawMwValue.WriteAllToFileAndClearBuffer(builder.RawMwValue.First);
                }

                //输出时段结果
                var periodAvePath = Path.Combine(OutputDirectory, builder.MwPeriodAverage.Name + Setting.TextGroupFileExtension);
                ObjectTableWriter.Write(builder.MwPeriodAverage, periodAvePath);

                if (IsOutputFraction)
                {
                    builder.FractionOfSmoothedMwValue.WriteAllToFileAndClearBuffer(builder.FractionOfSmoothedMwValue.First);
                }
            }
            this.ProgressBar.Full();
        }