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)
        {
            List <EphemerisParam> list = NavFile.GetEphemerisParams(prn, from, to);

            List <Gnsser.Ephemeris> infos = new List <Gnsser.Ephemeris>();

            foreach (var item in list)
            {
                //if (key.Prn.SatelliteType == SatelliteType.S || key.Prn.SatelliteType == SatelliteType.R || key.Prn.SatelliteType == SatelliteType.E)
                //    infos.Add(new Ephemeris()
                //    {
                //        Time = key.Time,
                //        XYZ = new XYZ(),
                //        Prn = key.Prn,
                //        ClockBias = key.ClockBias,
                //        ClockDrift = key.ClockDrift,
                //        //XyzDot = text.
                //    });
                //else
                //{
                XYZ xyz = SatOrbitCaculator.GetSatPos(item, item.Time);
                infos.Add(new Gnsser.Ephemeris()
                {
                    Time       = item.Time,
                    XYZ        = xyz,
                    Prn        = item.Prn,
                    ClockBias  = item.ClockBias,
                    ClockDrift = item.ClockDrift,
                    //XyzDot = text.
                });
                //}
            }
            return(infos);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取所有星历信息。
        /// </summary>
        /// <returns></returns>
        public override List <Gnsser.Ephemeris> Gets()
        {
            List <Gnsser.Ephemeris> infos = new List <Gnsser.Ephemeris>();

            foreach (var list in NavFile)
            {
                foreach (var item in list)
                {
                    XYZ xyz = SatOrbitCaculator.GetSatPos(item, item.Time);
                    infos.Add(new Gnsser.Ephemeris()
                    {
                        Time       = item.Time,
                        XYZ        = xyz,
                        Prn        = item.Prn,
                        ClockBias  = item.ClockBias,
                        ClockDrift = item.ClockDrift,
                        //XyzDot = text.
                    });
                }
            }
            return(infos);
        }