| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using Ips.Library.Basic;
- using Ips.Library.Entity;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Ips.Sps.TskResults.Peses
- {
- public static class PesExtensions
- {
- public static double[] GetSigLLA(this Pes pes)
- {
- return new double[] { pes.SigLon, pes.SigLat, pes.SigAlt };
- }
- public static double[] GetMainAntLLA(this Pes pes)
- {
- double[] results = null;
- if (pes.MainSatId > 0)
- {
- results = new double[] { pes.MainAntLon, pes.MainAntLat, pes.MainAntAlt };
- }
- else
- {
- results = GetSigLLA(pes);
- }
- return results;
- }
- public static double[] GetAdjaAntLLA(this Pes pes)
- {
- return new double[] { pes.AdjaAntLon, pes.AdjaAntLat, pes.AdjaAntAlt };
- }
- public static double[] GetMainEphXYZ(this Pes pes)
- {
- double[] results = null;
- if (pes.MainSatId > 0)
- {
- results = new double[] { pes.MainEphX, pes.MainEphY, pes.MainEphZ, pes.MainEphVx, pes.MainEphVy, pes.MainEphVz };
- }
- else
- {
- var xyz = GeoUtil.LLA2XYZ(GetSigLLA(pes));
- results = new double[] { xyz[0], xyz[1], xyz[2], 0, 0, 0 };
- }
- return results;
- }
- public static double[] GetAdjaEphXYZ(this Pes pes)
- {
- return new double[] { pes.AdjaEphX, pes.AdjaEphY, pes.AdjaEphZ, pes.AdjaEphVx, pes.AdjaEphVy, pes.AdjaEphVz };
- }
- }
- }
|