示例#1
0
        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);
                    }
                }
            }
        }
示例#2
0
        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);
        }