/// <summary> /// 计算 /// </summary> /// <param name="geoCoord"></param> /// <param name="Time"></param> /// <returns></returns> public DopValue Calculate(GeoCoord geoCoord, Time Time) { // var prns = this.EphemerisService.Prns.FindAll(m=>this.SatelliteTypes.Contains(m.SatelliteType)); this.Time = Time; List <Ephemeris> ephs = new List <Ephemeris>(); foreach (var prn in Prns) { if (SatWeights != null && !SatWeights.Contains(prn)) { continue; } ephs.Add(this.EphemerisService.Get(prn, Time)); } var sats = EphemerisUtil.GetSatsInVisible(geoCoord, ephs, CutOffAngle); var xyz = CoordTransformer.GeoCoordToXyz(geoCoord); if (sats.Count == 0) { return(null); } if (sats.Count < 4) { return(new DopValue() { StationXYZ = xyz, Time = sats[0].Time, SatCount = sats.Count }); } return(GetDopValue(xyz, sats)); }
/// <summary> /// 计算 /// </summary> /// <param name="xyz"></param> /// <param name="Time"></param> /// <returns></returns> public DopValue Calculate(XYZ xyz, Time Time) { // var prns = this.EphemerisService.Prns.FindAll(m=>this.SatelliteTypes.Contains(m.SatelliteType)); this.Time = Time; List <Ephemeris> ephs = new List <Ephemeris>(); foreach (var prn in Prns) { if (SatWeights != null && !SatWeights.Contains(prn)) { continue; } ephs.Add(this.EphemerisService.Get(prn, Time)); } var sats = EphemerisUtil.GetSatsInVisible(xyz, ephs, CutOffAngle); if (sats.Count < 4) { return(null); } return(GetDopValue(xyz, sats)); }