Exemplo n.º 1
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));
        }
Exemplo n.º 2
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);
            }
        }