public static void Example() { double[] alpha = new double[] { 0.1397E-07, -0.7451E-08, -0.5960E-07, 0.1192E-06 }; double[] beta = new double[] { 0.1270E+06, -0.1966E+06, 0.6554E+05, 0.2621E+06 }; var model = new IonoModel(alpha, beta); Console.WriteLine(model.ToString()); var wgs84 = new WGS84Ellipsoid(); var rx = new Position(31, 114, 30, CoordinateSystem.Geodetic, wgs84); Console.WriteLine("Position(XYZ):{0}", rx.ToString(CoordinateSystem.Cartesian)); Console.WriteLine("Position(BLH):{0}", rx.ToString(CoordinateSystem.Geodetic)); var time = new Time(2014, 1, 17, 0, 0, 1.1); for (int i = 0; i < 4; i++) { for (int j = 0; j < 2; j++) { for (int k = 0; k < 2; k++) { time.AddHours(i * 6); double svel = 15 + j * 40; double svaz = 180 * k; double c1 = model.GetCorrectionL1(time, rx, svel, svaz); double c2 = model.GetCorrectionL2(time, rx, svel, svaz); Console.WriteLine("Time:{0}; EL:{1}; AZ:{2}; L1:{3}; L2:{4}", time.ToHmsString(), svel, svaz, c1, c2); } } } }
public static void Example() { EllipsoidModel model1 = new WGS84Ellipsoid(); Console.WriteLine(model1.ToString()); // var model2=new GPSEllipsoid(); /// Console.WriteLine(model2.ToString()); }
public Position(Triple ABC, CoordinateSystem s) { double a = ABC[0]; double b = ABC[1]; double c = ABC[2]; var ell = new WGS84Ellipsoid(); Initialize(a, b, c, s, ell); }
public static void Example() { EllipsoidModel wgs84 = new WGS84Ellipsoid(); var buin = new Position(-2953118.4465, 5078909.8076, 2474538.1820, CoordinateSystem.Cartesian, wgs84); Console.WriteLine(buin.ToString(CoordinateSystem.Cartesian)); Console.WriteLine(buin.ToString(CoordinateSystem.Geodetic)); Console.WriteLine(buin.ToString(CoordinateSystem.Geocentric)); Console.WriteLine(buin.ToString(CoordinateSystem.Spherical)); Console.WriteLine("CurvMeridan:{0}", buin.CurvMeridian()); Console.WriteLine("CurvPrimeVertical:{0}", buin.CurvPrimeVertical()); }
public string Compute() { double[] alpha = new double[] { 0.1397E-07, -0.7451E-08, -0.5960E-07, 0.1192E-06 }; double[] beta = new double[] { 0.1270E+06, -0.1966E+06, 0.6554E+05, 0.2621E+06 }; var model = new IonoModel(alpha, beta); string line = model.ToString() + "\r\n"; var wgs84 = new WGS84Ellipsoid(); var rx = new Position(-2225669.7744, 4998936.1598, 3265908.9678, CoordinateSystem.Cartesian, wgs84); line += string.Format("Position(XYZ):{0}", rx.ToString(CoordinateSystem.Cartesian)) + "\r\n"; line += string.Format("Position(BLH):{0}", rx.ToString(CoordinateSystem.Geodetic)) + "\r\n"; var time = data.Time; line += string.Format("SV EL(°) AZ(°) L1(m) L2(m) \r\n"); foreach (var d in data.Data) { var sv = new Position(d.X, d.Y, d.Z, CoordinateSystem.Cartesian, wgs84); double svel = rx.Elevation(sv); double svaz = rx.Azimuth(sv); double c1 = model.GetCorrectionL1(time, rx, svel, svaz); double c2 = model.GetCorrectionL2(time, rx, svel, svaz); if (svel < 0) { c1 = 0; c2 = 0; } line += string.Format("{0} {1,10:f3} {2,10:f3} {3,8:f4} {4,8:f4}", d.Id, svel, svaz, c1, c2) + "\r\n"; } return(line); }
public Position(double a, double b, double c, CoordinateSystem s) { var ell = new WGS84Ellipsoid(); Initialize(a, b, c, s, ell); }
// ----------- Part 3: member functions: constructors -------------------- // // Default constructor. public Position() { Ellipsoid = new WGS84Ellipsoid(); Initialize(0.0, 0.0, 0.0, CoordinateSystem.Unknown, Ellipsoid); }