/// <summary>
        /// 执行无电离层双差模糊度固定
        /// </summary>
        /// <param name="rawFloatAmbiCycles"></param>
        /// <param name="isNetSolve">是否网解</param>
        /// <returns></returns>
        protected WeightedVector DoFixIonoFreeAmbiguity(WeightedVector rawFloatAmbiCycles, bool isNetSolve)
        {
            //-----------以下为无电离层组合模糊度固定算法--------------------
            if (this.DataSourceContext.SiteSatPeriodDataService == null)
            {
                log.Warn("必须开启时段数据服务,才能实现无电离层模糊度固定!");
                return(new WeightedVector());
            }
            var time = this.CurrentMaterial.ReceiverTime;

            //指定系统的无电离层组合参数计算器
            var IonoFreeAmbiguitySolver = IonoFreeAmbiguitySolverManager.GetOrCreate(CurrentBasePrn.SatelliteType);

            IonoFreeAmbiguitySolver.CheckOrInit(CurrentBasePrn, CurrentMaterial.ReceiverTime, !Option.IsLengthPhaseValue);

            //----------------------第一步 MW 宽巷星间单差 ------------------------
            var intMwDoubleDiffers = GetIntMwDiffersBeweenSat(isNetSolve);

            //----------------------第二步 MW 宽巷和模糊度浮点解求窄巷模糊度--------
            var ambiFloatVal = rawFloatAmbiCycles.GetNameRmsedNumeralVector();

            //求窄巷模糊度浮点解//单位周
            var narrowFloat = IonoFreeAmbiguitySolver.GetNarrowFloatValue(intMwDoubleDiffers, ambiFloatVal);

            //--------记录小数偏差部分-------
            var satPeriodService = this.DataSourceContext.SiteSatPeriodDataService.Get(this.CurrentMaterial.SiteName);

            foreach (var item in narrowFloat)
            {
                var prn = SatelliteNumber.Parse(item.Key);
                satPeriodService.GetOrCreate(prn).Regist(CurrentBasePrn + "-" + ParamNames.NarrowLaneBsdCycle, time, item.Value.Value, this.CurrentMaterial[prn].IsUnstable);
            }

            return(new WeightedVector());
        }
Exemple #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="context"></param>
        /// <param name="option"></param>
        public AbstractGnssSolver(DataSourceContext context, GnssProcessOption option) : base(context, option)
        {
            this.Name = context.ObservationDataSource == null ? "GNSS计算器" : context.ObservationDataSource.Name;
            //为所有测站附加天线信息,为了保险起见多赋值一次。
            if (context.AntennaDataSource != null)
            {
                foreach (var item in context.ObservationDataSources.DataSources)
                {
                    item.SiteInfo.Antenna = context.AntennaDataSource.Get(item.SiteInfo.AntennaType);
                }
            }

            //是否需要伪距预先定位
            if (Option.IsNeedPseudorangePositionWhenProcess && !(this is SimpleRangePositioner))
            {
                int interval          = (int)this.DataSourceContext.ObservationDataSource.ObsInfo.Interval;
                GnssProcessOption opt = GnssProcessOption.GetPsuedoRangeOption(interval, option.IsSmoothRangeWhenPrevPseudorangePosition);

                RangePositioner = new SimpleRangePositioner(DataSourceContext, opt);
            }

            this.IsUpdateEstimatePostition = option.IsUpdateEstimatePostition;
            this.EpochEphemerisSetter      = new EpochEphemerisSetter(DataSourceContext, option);

            //模糊度
            IsOutputAmbiguity = true;
            AmbiguityManager  = new AmbiguityManager(base.Option);
            IonoFreeAmbiguitySolverManager = new IonoFreeAmbiguitySolverManager();
        }
        /// <summary>
        /// 执行无电离层双差模糊度固定
        /// </summary>
        /// <param name="rawFloatAmbiCycles"></param>
        /// <param name="isNetSolve">是否网解</param>
        /// <returns></returns>
        protected WeightedVector DoFixIonoFreeDoubleDifferAmbiguity(WeightedVector rawFloatAmbiCycles, bool isNetSolve)
        {
            if (!IsDualIonoFreeComObservation)
            {
                return(base.DoFixAmbiguity(rawFloatAmbiCycles));
            }
            //-----------以下为无电离层组合模糊度固定算法--------------------
            if (this.DataSourceContext.SiteSatPeriodDataService == null)
            {
                log.Warn("必须开启时段数据服务,才能实现无电离层模糊度固定!");
                return(new WeightedVector());
            }

            //指定系统的无电离层组合参数计算器
            var IonoFreeAmbiguitySolver = IonoFreeAmbiguitySolverManager.GetOrCreate(CurrentBasePrn.SatelliteType);

            IonoFreeAmbiguitySolver.CheckOrInit(CurrentBasePrn, CurrentMaterial.ReceiverTime, !Option.IsLengthPhaseValue);

            //----------------------第一步 MW 宽巷双差 ------------------------
            NameRmsedNumeralVector intMwDoubleDiffers = GetIntMwDoubleDiffers(isNetSolve);

            //----------------------第二步 MW 宽巷和模糊度浮点解求窄巷模糊度--------
            var ambiFloatVal = rawFloatAmbiCycles.GetNameRmsedNumeralVector();

            //求窄巷模糊度浮点解//单位周
            var narrowFloat = IonoFreeAmbiguitySolver.GetNarrowFloatValue(intMwDoubleDiffers, ambiFloatVal);

            var narrowFloatVect = narrowFloat.GetWeightedVector();

            narrowFloatVect.InverseWeight = rawFloatAmbiCycles.GetWeightedVector(narrowFloatVect.ParamNames).InverseWeight; //追加系数阵,按照顺序------

            //方法1:
            var intNarrowVector = base.DoFixAmbiguity(narrowFloatVect);
            var intNarrow       = intNarrowVector.GetNameRmsedNumeralVector();// ParseVector(intNarrowVector);
            //方法2:直接取整
            //var intNarrow = narrowFloatVect.GetRound();//不推荐使用直接取整

            //检核窄巷
            var intDiffer = intNarrow - narrowFloat;
            var toRemoves = intDiffer.GetAbsLargerThan(this.Option.MaxAmbiDifferOfIntAndFloat);

            intNarrow.Remove(toRemoves);//移除

            //判断是否超限
            //计算双差载波模糊度固定值
            var fixedVal = IonoFreeAmbiguitySolver.GetIonoFreeAmbiValue(intMwDoubleDiffers, intNarrow);

            var result = fixedVal.GetWeightedVector();

            return(result);
        }
Exemple #4
0
        /// <summary>
        /// 执行无电离层双差模糊度固定
        /// </summary>
        /// <param name="rawFloatAmbiCycles"></param>
        /// <param name="isNetSolve">是否网解</param>
        /// <returns></returns>
        protected WeightedVector DoFixIonoFreeAmbiguity(WeightedVector rawFloatAmbiCycles, bool isNetSolve)
        {
            //-----------以下为无电离层组合模糊度固定算法--------------------
            if (this.DataSourceContext.SiteSatPeriodDataService == null)
            {
                log.Warn("必须开启时段数据服务,才能实现无电离层模糊度固定!");
                return(new WeightedVector());
            }
            var time = this.CurrentMaterial.ReceiverTime;

            //指定系统的无电离层组合参数计算器
            var IonoFreeAmbiguitySolver = IonoFreeAmbiguitySolverManager.GetOrCreate(CurrentBasePrn.SatelliteType);

            IonoFreeAmbiguitySolver.CheckOrInit(CurrentBasePrn, CurrentMaterial.ReceiverTime, !Option.IsLengthPhaseValue);

            //----------------------第一步 MW 宽巷双差 ------------------------
            var intMwDoubleDiffers = GetIntMwDiffersBeweenSat(isNetSolve);

            //----------------------第二步 MW 宽巷和模糊度浮点解求窄巷模糊度--------
            var ambiFloatVal = rawFloatAmbiCycles.GetNameRmsedNumeralVector();

            //求窄巷模糊度浮点解//单位周
            var narrowFloat = IonoFreeAmbiguitySolver.GetNarrowFloatValue(intMwDoubleDiffers, ambiFloatVal);

            //--------获取小数偏差部分-------
            Dictionary <SatelliteNumber, RmsedNumeral> nlFcbOfBsd = null;

            if (NarrawLaneFcbService == null)
            {
                nlFcbOfBsd = FcbDataService.GetNLFcbOfBsd(time, CurrentBasePrn);
            }
            else
            {
                nlFcbOfBsd = NarrawLaneFcbService.GetBsdOfNarrowLane(this.CurrentMaterial.EnabledPrns, CurrentBasePrn, time);
            }

            var narrowIntFloat = ToStringVector(new NameRmsedNumeralVector <SatelliteNumber>(nlFcbOfBsd));

            var narrowNearInt = narrowFloat - narrowIntFloat;

            var narrowFloatVect = narrowNearInt.GetWeightedVector();

            narrowFloatVect.InverseWeight = rawFloatAmbiCycles.GetWeightedVector(narrowFloatVect.ParamNames).InverseWeight; //追加系数阵,按照顺序------


            //--------------------------------窄巷模糊度浮点数减去小数部分-----------------------------------------
            //方法1:
            var intNarrowVector = base.DoFixAmbiguity(narrowFloatVect);
            var intNarrow       = intNarrowVector.GetNameRmsedNumeralVector();// ParseVector(intNarrowVector);
            //方法2:直接取整
            //var intNarrow = narrowFloatVect.GetRound();//不推荐使用直接取整

            //检核窄巷
            var intDiffer = intNarrow - narrowFloat;
            var toRemoves = intDiffer.GetAbsLargerThan(this.Option.MaxAmbiDifferOfIntAndFloat);

            intNarrow.Remove(toRemoves);//移除

            //判断是否超限
            //计算双差载波模糊度固定值
            var fixedVal = IonoFreeAmbiguitySolver.GetIonoFreeAmbiValue(intMwDoubleDiffers, intNarrow);

            var result = fixedVal.GetWeightedVector();

            return(result);
        }