Beispiel #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="source"></param>
 /// <param name="MinSequentialSatCount"></param>
 /// <param name="MaxBreakingCount">允许星历断裂次数</param>
 public CombinedSp3FileEphService(SatEphemerisCollection source, int MinSequentialSatCount = 11, int MaxBreakingCount = 5, int InterpolateOrder = 10)
 {
     this.MinSequentialSatCount = MinSequentialSatCount;
     this.MaxBreakingCount      = MaxBreakingCount;
     this.Order = InterpolateOrder;
     SetSatEphemerisCollection(source);
 }
        /// <summary>
        /// 以文件初始化
        /// </summary>
        /// <param name="Sp3File"></param>
        /// <param name="MinSequentialSatCount"></param>
        /// <param name="MaxBreakingCount"></param>
        public SingleSp3FileEphService(SatEphemerisCollection Sp3File, int MinSequentialSatCount = 11, int MaxBreakingCount = 5, int ephInterOder = 10)
        {
            this.MinSequentialSatCount = MinSequentialSatCount;
            this.MaxBreakingCount      = MaxBreakingCount;
            this.Order = ephInterOder;

            SetSp3File(Sp3File);
        }
Beispiel #3
0
        /// <summary>
        /// 获取文件中存储的原始星历信息。
        /// </summary>
        /// <param name="prn"></param>
        /// <param name="from"></param>
        /// <param name="to"></param>
        /// <returns></returns>
        public override List <Gnsser.Ephemeris> Gets(SatelliteNumber prn, Time from, Time to)
        {
            var data = SatEphemerisCollection.Get(prn);
            List <Gnsser.Ephemeris> prnEphes = data.Values;

            if (prnEphes == null)
            {
                return(new List <Gnsser.Ephemeris>());
            }

            return(prnEphes.FindAll(m => m.Time >= from && m.Time <= to));
        }
Beispiel #4
0
        /// <summary>
        /// 生成集合
        /// </summary>
        /// <returns></returns>
        public SatEphemerisCollection GetSatEphemerisCollection()
        {
            SatEphemerisCollection satClockCollection = new SatEphemerisCollection(true, SourceCode);

            foreach (var sec in this)
            {
                foreach (var item in sec)
                {
                    var obj = satClockCollection.GetOrCreate(item.Prn);
                    obj.Add(item);
                }
            }
            return(satClockCollection);
        }
Beispiel #5
0
        /// <summary>
        /// 初始化插值器
        /// </summary>
        private void Init()
        {
            var interval = SatEphemerisCollection.Interval == 0 ? 1 : SatEphemerisCollection.Interval;// Sp3Reader.Header.EpochInterval;

            WarnedPrns = new List <SatelliteNumber>();

            EphemerisManager = new EphemerisManager(interval, MaxBreakingCount);
            Order            = 10;
            SatEphemerisCollection.TimePeriod.SetSameBuffer(interval * 0.2); //外推0.2采样率

            foreach (var prn in SatEphemerisCollection.Prns)
            {
                var storage = EphemerisManager.GetOrCreate(prn);

                var all = SatEphemerisCollection.Get(prn);
                if (all == null || all.Count == 0)
                {
                    continue;
                }

                storage.Add(all.Values);
            }
        }
Beispiel #6
0
 /// <summary>
 /// 修改数据源,重新初始化。
 /// </summary>
 /// <param name="Sp3File"></param>
 public void SetSatEphemerisCollection(SatEphemerisCollection Sp3File)
 {
     this.SatEphemerisCollection = Sp3File;
     this.Name = Sp3File.Name;
     this.Init();
 }