예제 #1
0
        /// <summary>
        /// 获取卫星在指定时刻,相对于测站的信息
        /// </summary>
        /// <param name="service"></param>
        /// <param name="prn"></param>
        /// <param name="time"></param>
        /// <returns></returns>
        public StationSatInfo GetInstantSatInfo(IEphemerisService service, SatelliteNumber prn, Time time)
        {
            Geo.Coordinates.XYZ satPos = service.Get(prn, time).XYZ;
            GeoCoord            coord  = CoordTransformer.XyzToGeoCoord(satPos);

            Geo.Coordinates.Polar p = CoordTransformer.XyzToGeoPolar(satPos, StationPos);
            if (p.Elevation < EleAngle)
            {
                return(null);
            }

            this.LonLats.Add(new Vector(coord.Lon, coord.Lat)
            {
                Tag = prn.ToString()
            });

            //显示到表格
            return(new StationSatInfo()
            {
                PRN = prn,
                Time = time,
                Azimuth = p.Azimuth,
                ElevatAngle = p.Elevation,
                Distance = p.Range,
                Lat = coord.Lat,
                Lon = coord.Lon,
                Height = coord.Height,
                X = satPos.X,
                Y = satPos.Y,
                Z = satPos.Z
            });
        }
예제 #2
0
        /// <summary>
        /// 地心极坐标抓换为地心大地坐标
        /// </summary>
        /// <param name="polarInGeoCenter">极坐标</param>
        /// <param name="unit">角度单位</param>
        /// <returns></returns>
        public static GeoCoord PolarToGeoCoord(Polar polarInGeoCenter, AngleUnit unit = AngleUnit.Degree)
        {
            XYZ xyz = PolarToXyz(polarInGeoCenter, unit);

            return(XyzToGeoCoord(xyz, unit));
        }