Esempio n. 1
0
        /// <summary>
        /// 处理一个历元
        /// </summary>
        /// <param name="mEpochInfo"></param>
        public override SimpleGnssResult Produce(MultiSiteEpochInfo mEpochInfo)
        {
            //3.计算
            // this.CurrentGnssResult
            BaseGnssResult GnssResult = null;

            if (Solver is MultiSitePeriodSolver) //多站多历元
            {
                if (this.MultiSitePeriodInfoBuilder == null)
                {
                    this.MultiSitePeriodInfoBuilder = new Domain.MultiSitePeriodInfoBuilder(Option);
                }

                MultiSitePeriodInfoBuilder.Add(mEpochInfo);
                var period = MultiSitePeriodInfoBuilder.Build();
                if (period == null || !period.Enabled)
                {
                    return(null);
                }

                GnssResult = ((MultiSitePeriodSolver)Solver).Get(period);
            }
            else if (Solver is SingleSitePeriodSolver)  //单站多历元
            {
                PeriodInformationBuilder.Add(mEpochInfo.First);
                var period = PeriodInformationBuilder.Build();
                if (period == null || !period.Enabled)
                {
                    return(null);
                }

                GnssResult = ((SingleSitePeriodSolver)Solver).Get(period);
            }
            else if (Solver is MultiSiteEpochSolver)
            {
                GnssResult = ((MultiSiteEpochSolver)Solver).Get(mEpochInfo);
            }
            else if (Solver is SingleSiteGnssSolver) //此处只计算基准流
            {
                if (mEpochInfo.Contains(BaseSiteName))
                {
                    GnssResult = ((SingleSiteGnssSolver)Solver).Get(mEpochInfo[BaseSiteName]);
                }
                else
                {
                    GnssResult = null;
                }
            }

            if (GnssResult == null)
            {
                return(null);
            }

            //4.结果后处理
            if (Option.IsFixingAmbiguity)
            {
                //PPP模糊度处理
                if (GnssResult is PppResult)
                {
                    var PppResult = GnssResult as PppResult;
                }

                if (GnssResult is PeriodDoubleDifferPositionResult)
                {
                    var result = GnssResult as PeriodDoubleDifferPositionResult;
                    AmbiguityManager.Regist(result);
                }
            }
            return(GnssResult);
        }
        /// <summary>
        /// 处理一个历元
        /// </summary>
        /// <param name="epoch"></param>
        public override SimpleGnssResult Produce(EpochInformation epoch)
        {
            if (!this.EphemerisDataSource.TimePeriod.Contains(epoch.ReceiverTime))
            {
                this.IsCancel = true; log.Warn("星历结束,结束计算!" + this.EphemerisDataSource.TimePeriod);
            }
            if (epoch.Count == 0)
            {
                log.Error(epoch.ToShortString() + ", 没有可用卫星,是否系统选错了?"); return(null);
            }

            ISiteSatObsInfo  material = null;
            SimpleGnssResult result   = null;

            if (Solver is SingleSiteGnssSolver)
            {
                material = epoch;
                result   = ((SingleSiteGnssSolver)Solver).Get(epoch);
            }
            else if (Solver is SingleSitePeriodSolver) //单站多历元
            {
                PeriodInformationBuilder.Add(epoch);
                var period = PeriodInformationBuilder.Build();
                if (period == null || !period.Enabled)
                {
                    return(null);
                }
                material = period;
                result   = ((SingleSitePeriodSolver)Solver).Get(period);

                PeriodInformationBuilder.Data.Clear();
            }
            else if (Solver is CommonSingeSatGnssSolver || Solver is CommonSingePeriodSatGnssSolver) //单站多历元
            {
                material = epoch;

                if (!epoch.Contains(this.Prn))
                {//如果星历不存在则重新选星
                    if (this.Option.IsIndicatedPrn)
                    {
                        this.Prn = this.Option.IndicatedPrn;
                    }
                    else
                    {
                        //this.Prn = epoch.FirstKey;
                        this.Prn = epoch.GetMaxElevationPrn();
                        log.Info(this.Name + ", 最大高度角选星:" + this.Prn);
                    }
                }

                var sat = epoch.Get(this.Prn);
                if (sat == null)
                {
                    return(null);
                }
                if (Solver is CommonSingeSatGnssSolver)
                {
                    result = ((CommonSingeSatGnssSolver)Solver).Get(sat);
                }
                else if (Solver is CommonSingePeriodSatGnssSolver) //单站多历元
                {
                    if (PeriodSatelliteBuilder.Add(sat))
                    {
                        var period = PeriodSatelliteBuilder.Build();
                        if (period == null || !period.Enabled)
                        {
                            return(null);
                        }
                        //material = period;
                        result = ((CommonSingePeriodSatGnssSolver)Solver).Get(period);
                    }
                }
            }
            return(result);
        }