Exemplo n.º 1
0
        /// <summary>
        /// 观测值改正数设值。观测值改正直接添加到观测值上。
        /// </summary>
        /// <returns></returns>
        private static EpochInfoReviseManager BuildObsCorrector(DataSourceContext Context, GnssProcessOption Option)
        {
            var processer = new EpochInfoReviseManager(Context, Option);
            RangeCorrectionReviser rangeCorrector = new RangeCorrectionReviser(CorrectChianType.Self);

            if (Option.IsDcbCorrectionRequired && Context.DcbDataService != null)
            {
                rangeCorrector.Add(new DcbRangeCorrector(Context.DcbDataService, Option.IsDcbOfP1P2Enabled)); //DCB改正
            }

            if (Option.IsP1DcbToLcOfGridIonoRequired && Context.GridIonoDcbDataService != null)
            {
                rangeCorrector.Add(new IonoDcbP1Corrector(Context.GridIonoDcbDataService)); //P1 单频 DCB改正
            }


            processer.AddProcessor(rangeCorrector);
            return(processer);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 设置电离层改正
        /// </summary>
        /// <param name="Context"></param>
        /// <param name="Option"></param>
        /// <param name="modelCorrectors"></param>
        private static void SetIonoCorrectionReviser(DataSourceContext Context, GnssProcessOption Option, EpochInfoReviseManager modelCorrectors)
        {
            if (!Option.IsIonoCorretionRequired)
            {
                return;
            }

            RangeCorrectionReviser phaseCorrector = new RangeCorrectionReviser(Gnsser.Correction.CorrectChianType.PhaseRangeOnly);
            RangeCorrectionReviser rangeCorrector = new RangeCorrectionReviser(Gnsser.Correction.CorrectChianType.RangeOnly);

            modelCorrectors.AddProcessor(phaseCorrector);
            modelCorrectors.AddProcessor(rangeCorrector);


            bool isOk = false;

            switch (Option.IonoSourceTypeForCorrection)
            {
            case IonoSourceType.IgsGrid:
                if (Context.IgsGridIonoFileService != null)
                {
                    //格网电离层改正和频率相关
                    RangeCorrectionReviser ionoRangeCorrector = new RangeCorrectionReviser(Gnsser.Correction.CorrectChianType.Self);
                    ionoRangeCorrector.Add(new IonoGridModelCorrector(Context.IgsGridIonoFileService));     //电离层模型改正
                    modelCorrectors.AddProcessor(ionoRangeCorrector);
                    isOk = true;
                    log.Info("采用了IGS格网电离层服务来改正观测值 " + Context.IgsGridIonoFileService);
                }
                break;

            case IonoSourceType.CodeSphericalHarmonics:
                if (Context.IgsCodeHarmoIonoFileService != null)
                {
                    //格网电离层改正和频率相关
                    RangeCorrectionReviser ionoRangeCorrector = new RangeCorrectionReviser(Gnsser.Correction.CorrectChianType.Self);
                    ionoRangeCorrector.Add(new IonoGridModelCorrector(Context.IgsCodeHarmoIonoFileService));     //电离层模型改正
                    modelCorrectors.AddProcessor(ionoRangeCorrector);
                    isOk = true;

                    log.Info("采用了IGS CODE 球谐电离层服务来改正观测值 " + Context.IgsCodeHarmoIonoFileService);
                }
                break;

            case IonoSourceType.GNSSerIonoFile:
                //首先考虑GNSSSer电离层文件
                if (Context.IonoEpochParamService != null)
                {
                    rangeCorrector.Add(new EpochParamIonoCorrector(Context.IonoEpochParamService));       //电离层模型改正
                    phaseCorrector.Add(new EpochParamIonoCorrector(Context.IonoEpochParamService, true)); //电离层模型改正
                    isOk = true;
                    log.Info("采用了GNSSer历元电离层服务来改正观测值 " + Context.IonoEpochParamService);
                }
                break;

            case IonoSourceType.Klobchar:
                if (Context.IonoKlobucharParamService != null)                                                //最后考虑导航模型
                {
                    rangeCorrector.Add(new IonoParamModelCorrector(Context.IonoKlobucharParamService));       //电离层模型改正
                    phaseCorrector.Add(new IonoParamModelCorrector(Context.IonoKlobucharParamService, true)); //电离层模型改正
                    log.Info("采用了导航电离服务来改正观测值 " + Context.IonoKlobucharParamService);
                    isOk = true;
                }
                break;

            default:
                break;
            }

            if (!isOk)
            {
                log.Error("设置为需要电离层改正 " + Option.IonoSourceTypeForCorrection + ",但是没有加载成功,请打开相应开关。需要打开总开关,再打开一个数据源并指定相应的改正类型。");
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 模型改正数对象,改正在估值上。
        /// </summary>
        /// <returns></returns>
        private static EpochInfoReviseManager BuildModelCorrector(DataSourceContext Context, GnssProcessOption Option)
        {
            var modelCorrectors = new EpochInfoReviseManager(Context, Option);

            //测站、地球相关改正
            if (Option.IsSiteCorrectionsRequired)
            {
                //接收机改正
                EpochNeuCorrectionReviser neuChain = new EpochNeuCorrectionReviser();
                modelCorrectors.AddProcessor(neuChain);
                if (Option.IsReceiverAntSiteBiasCorrectionRequired)
                {
                    neuChain.Add(new RecAntennaArpCorrector()); //接收机天线ARP改正,基线不可忽略
                }
                if (Option.IsOceanTideCorrectionRequired && Option.IsOceanLoadingFileRequired)
                {
                    neuChain.Add(new OceanTidesCorrector(Context));//海洋负荷(潮汐)改正,短基线可忽略
                }
                if (Option.IsPoleTideCorrectionRequired)
                {
                    neuChain.Add(new PoleTidesCorrector(Context));//极潮改正,短基线可忽略
                }
                if (Option.IsSolidTideCorrectionRequired)
                {
                    neuChain.Add(new SolidTidesCorrector2(Context)); //固体潮改正2,短基线可忽略
                }
            }
            //等效距离改正
            if (Option.IsRangeCorrectionsRequired)
            {
                //通用站星距离改正
                RangeCorrectionReviser rangeCorrector = new RangeCorrectionReviser(CorrectChianType.Common);
                modelCorrectors.AddProcessor(rangeCorrector);

                if (Option.IsSatClockBiasCorrectionRequired)
                {
                    rangeCorrector.Add(new SatClockBiasCorrector());//卫星钟差改正
                }
                if (Option.IsTropCorrectionRequired)
                {//rangeCorrector.Add(new RelativeCorrector());//钟差的相对论改正,与光速相差转换为伪距改正
                    //rangeCorrector.Add(new SagnacEffectCorrector());//地球自转的相对论改正,Sagnac effect 伪距改正
                    // rangeCorrector.Add(new RangeTropoCorrector()); //对流层改正 1
                    //rangeCorrector.Add(new TroposphericModelCorrector()); //对流层改正 2
                    rangeCorrector.Add(new TroposphericModelCorrector(Option, Context));  //对流层改正 2,ZUIXINJIARU
                }
                if (Option.IsGravitationalDelayCorrectionRequired)
                {
                    rangeCorrector.Add(new GravitationalDelayCorrector()); //相对论效应:引力延迟效应//
                }
            }
            //电离层等效距离改正
            if (Option.IsIonoCorretionRequired)//电离层总开关
            {
                SetIonoCorrectionReviser(Context, Option, modelCorrectors);
            }

            // 频率改正,需要天线
            if (Option.IsFrequencyCorrectionsRequired && Option.IsAntennaFileRequired)
            {
                //按卫星频率分类,对NEU改正
                FreqBasedNeuCorrectionReviser frequencyNeuCorrectorChain = new FreqBasedNeuCorrectionReviser();
                modelCorrectors.AddProcessor(frequencyNeuCorrectorChain);

                if (Option.IsRecAntPcoCorrectionRequired)
                {
                    frequencyNeuCorrectorChain.Add(new RecAntennaPcoCorrector()); //测站天线 PCO NEU,对于每个天线和卫星频率是固定的
                }

                //按照频率,对距离改正
                FreqBasedRangeCorrectionReviser frequencyRangCorrectorChain = new FreqBasedRangeCorrectionReviser();
                modelCorrectors.AddProcessor(frequencyRangCorrectorChain);

                if (Option.IsRecAntPcvCorrectionRequired)
                {
                    frequencyRangCorrectorChain.Add(new RecAntennaPcvCorrector());//测站天线 PCV
                }
                if (Option.IsSatAntPvcCorrectionRequired)
                {
                    frequencyRangCorrectorChain.Add(new SatAntennaPcvCorrector(Context));
                }

                if (Option.IsSatAntPcoCorrectionRequired)
                {
                    frequencyRangCorrectorChain.Add(new SatAntennaPcoCorrector(Context)); //lly增加卫星PCO
                }
                //相位改正
                PhaseCorrectionReviser phaseCorrector = new PhaseCorrectionReviser();
                modelCorrectors.AddProcessor(phaseCorrector);

                if (Option.IsPhaseWindUpCorrectionRequired)
                {
                    //天线相位缠绕效应改正,2018.08.03,czs,疑问:此处增加到了相位改正数上,是否伪距也需要增加??
                    phaseCorrector.Add(new PhaseWindUpCorrector(Context.SatInfoService.SatInfoFile, Context));
                }
            }
            return(modelCorrectors);
        }