Exemple #1
0
        /// <summary>
        /// 所有卫星,在时间段中的相对位置信息。
        /// </summary>
        /// <returns></returns>
        public Dictionary <SatelliteNumber, List <StationSatInfo> > GetPeriodAllSatInfos()
        {
            this.LonLats.Clear();
            Dictionary <SatelliteNumber, List <StationSatInfo> > dics = new Dictionary <SatelliteNumber, List <StationSatInfo> >();

            foreach (SatelliteNumber rec in EphemerisService.Prns)
            {
                if (dics.ContainsKey(rec))
                {
                    continue;
                }
                List <StationSatInfo> satList = new List <StationSatInfo>();
                dics.Add(rec, satList);

                for (int i = 0; i < Count; i++)
                {
                    DateTime       time = From + TimeSpan.FromMinutes(i * SpanMinutes);
                    StationSatInfo info = GetInstantSatInfo(EphemerisService, rec, new Time(time));
                    if (info == null)
                    {
                        continue;
                    }
                    satList.Add(info);
                }
            }
            return(dics);
        }
Exemple #2
0
        /// <summary>
        /// 时段单星
        /// </summary>
        /// <param name="stationPos"></param>
        /// <param name="navFilePath"></param>
        /// <param name="from"></param>
        /// <param name="to"></param>
        /// <param name="spanMinutes"></param>
        /// <returns></returns>
        public List <StationSatInfo> GetPeriodSatInfos(SatelliteNumber rec)
        {
            this.LonLats.Clear();
            List <StationSatInfo> satList = new List <StationSatInfo>();

            for (int i = 0; i < Count; i++)
            {
                DateTime time = From + TimeSpan.FromMinutes(i * SpanMinutes);

                StationSatInfo info = GetInstantSatInfo(EphemerisService, rec, new Time(time));
                if (info == null)
                {
                    continue;
                }
                satList.Add(info);
            }
            return(satList);
        }
Exemple #3
0
        /// <summary>
        /// 卫星在指定时段内出现的数量。要求星历文件卫星数量必须足够。
        /// </summary>
        /// <returns></returns>
        public Dictionary <DateTime, int> GetPeriodSatAppearCounts()
        {
            this.LonLats.Clear();

            Dictionary <DateTime, int> dics = new Dictionary <DateTime, int>();

            for (int i = 0; i < Count; i++)
            {
                int      count = 0;
                DateTime time  = From + TimeSpan.FromMinutes(i * SpanMinutes);
                foreach (SatelliteNumber rec in EphemerisService.Prns)
                {
                    StationSatInfo info = GetInstantSatInfo(EphemerisService, rec, new Time(time));
                    if (info == null)
                    {
                        continue;
                    }
                    count++;
                }
                dics.Add(time, count);
            }
            return(dics);
        }
Exemple #4
0
        /// <summary>
        /// 在指定时刻,所有卫星相对于测站的信息
        /// </summary>
        /// <param name="stationPos"></param>
        /// <param name="navFilePath"></param>
        /// <param name="time"></param>
        /// <returns></returns>
        public List <StationSatInfo> GetAllInstantSatInfos(Time time)
        {
            this.LonLats.Clear();

            List <StationSatInfo>  sats = new List <StationSatInfo>();
            List <SatelliteNumber> prns = new List <SatelliteNumber>();

            foreach (SatelliteNumber rec in EphemerisService.Prns)
            {
                if (prns.Contains(rec))
                {
                    continue;
                }
                prns.Add(rec);

                StationSatInfo info = GetInstantSatInfo(EphemerisService, rec, time);
                if (info == null)
                {
                    continue;
                }
                sats.Add(info);
            }
            return(sats);
        }