Exemplo n.º 1
0
        /// <summary>
        /// 创建观测信息对象
        /// </summary>
        /// <returns></returns>
        public override EpochInformation Build(RinexEpochObservation obsSection)
        {
            if (obsSection == null)
            {
                return(null);
            }

            EpochInformation EpochInformation = new Domain.EpochInformation();

            EpochInformation.Name       = obsSection.Name;
            EpochInformation.SiteInfo   = obsSection.Header.SiteInfo;
            EpochInformation.ObsInfo    = obsSection.Header.ObsInfo;
            EpochInformation.EpochState = (EpochState)obsSection.EpochFlag; //历元标志,周跳探测用

            var time = new CorrectableTime(obsSection.ReceiverTime);

            EpochInformation.Time = time;

            //扩展
            RinexFreqObsBuilder FreqObsBuilder = new RinexFreqObsBuilder();
            var epochSatBuilder = new RinexEpochSatBuilder(FreqObsBuilder);
            //添加原始观测量。
            var prns = obsSection.Prns;

            prns.Sort();
            foreach (var prn in prns)
            {
                //过滤掉不需要处理的卫星类型
                if (!SatelliteTypes.Contains(SatelliteType.M) && !SatelliteTypes.Contains(prn.SatelliteType))
                {
                    continue;
                }
                EpochSatellite epochSat   = null;
                var            observtion = obsSection[prn];
                if (observtion != null)
                {
                    epochSatBuilder
                    .SetEpochInfo(EpochInformation)
                    .SetPrn(prn);
                    epochSat = epochSatBuilder.Build(observtion);
                }
                if (epochSat != null)
                {
                    EpochInformation.Add(prn, epochSat);
                }
            }
            return(EpochInformation);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="FreqObsBuilder"></param>
 public RinexEpochSatBuilder(RinexFreqObsBuilder FreqObsBuilder)
 {
     this.FreqObsBuilder = FreqObsBuilder;
 }