Beispiel #1
0
        private void Init()
        {
            int count = entities.Count;

            double[] x      = new double[count];
            double[] yX     = new double[count];
            double[] yY     = new double[count];
            double[] yZ     = new double[count];
            double[] yClock = new double[count];

            int i = 0;

            foreach (var item in entities)
            {
                Ephemeris record = item;
                x[i]      = (record.Time - entities.First.Time); //Y为GPS周秒。
                yX[i]     = record.XYZ.X;
                yY[i]     = record.XYZ.Y;
                yZ[i]     = record.XYZ.Z;
                yClock[i] = record.ClockBias;

                i++;
            }

            //for (int i = 0; i < count; i++)
            //{
            //    Ephemeris record = sortedRecords[i];
            //    x[i] = (record.Time - sortedRecords[0].Time); //Y为GPS周秒。
            //    yX[i] = record.XYZ.X;
            //    yY[i] = record.XYZ.Y;
            //    yZ[i] = record.XYZ.Z;
            //    yClock[i] = record.ClockBias;
            //}
            int order = 10;

            order = Math.Min(order, count);

            //fitX = new PolyFit(x, yX);
            //fitY = new PolyFit(x, yY);
            //fitZ = new PolyFit(x, yZ);
            //fitClock = new PolyFit(x, yClock);
            fitX     = new LagrangeInterplation(x, yX, order);
            fitY     = new LagrangeInterplation(x, yY, order);
            fitZ     = new LagrangeInterplation(x, yZ, order);
            fitClock = new LagrangeInterplation(x, yClock, 2);
            //fitClock = new LagrangeInterplation(x, yClock, 10);


            //fitX = new ChebyshevPolyFit(x, yX, order);
            //fitY = new ChebyshevPolyFit(x, yY, order);
            //fitZ = new ChebyshevPolyFit(x, yZ, order);
            //fitClock = new LagrangeInterplation(x, yClock, 2);
        }
Beispiel #2
0
        private void Init()
        {
            int count = sortedRecords.Count;

            double[] x       = new double[count];
            double[] yOffset = new double[count];
            double[] yDrift  = new double[count];

            for (int i = 0; i < count; i++)
            {
                SimpleClockBias clk = sortedRecords[i];
                //    x[i] = (double)(clk.Time.DateTime - minDataTime.DateTime).TotalSeconds;//Y为秒。
                x[i]       = (clk.Time - minDataTime);//Y为秒。
                yOffset[i] = clk.ClockBias;
            }

            Order       = Math.Min(Order, count);
            interpError = new LagrangeInterplation(x, yOffset, Order);
            interpDrift = new LagrangeInterplation(x, yDrift, Order);
        }
Beispiel #3
0
        private void Init()
        {
            int count = SatEphemerises.Count;

            double[] x      = new double[count];
            double[] yX     = new double[count];
            double[] yY     = new double[count];
            double[] yZ     = new double[count];
            double[] yClock = new double[count];
            var      first  = SatEphemerises.First;
            int      i      = 0;

            foreach (var record in SatEphemerises)
            {
                x[i] = (record.Time - first.Time); //Y为GPS周秒。

                yX[i]     = record.XYZ.X;
                yY[i]     = record.XYZ.Y;
                yZ[i]     = record.XYZ.Z;
                yClock[i] = record.ClockBias;
            }
            int order = 10;

            order = Math.Min(Order, count);

            //fitX = new PolyFit(x, yX);
            //fitY = new PolyFit(x, yY);
            //fitZ = new PolyFit(x, yZ);
            //fitClock = new PolyFit(x, yClock);
            fitX = new LagrangeInterplation(x, yX, order);
            fitY = new LagrangeInterplation(x, yY, order);
            fitZ = new LagrangeInterplation(x, yZ, order);
            // fitClock = new LagrangeInterplation(x, yClock, 2);
            fitClock = new LagrangeInterplation(x, yClock, 10);


            //fitX = new ChebyshevPolyFit(x, yX, order);
            //fitY = new ChebyshevPolyFit(x, yY, order);
            //fitZ = new ChebyshevPolyFit(x, yZ, order);
            //fitClock = new LagrangeInterplation(x, yClock, 2);
        }
        private void Init()
        {
            int count = sortedRecords.Count;

            double[] x      = new double[count];
            double[] yX     = new double[count];
            double[] yY     = new double[count];
            double[] yZ     = new double[count];
            double[] yClock = new double[count];

            for (int i = 0; i < count; i++)
            {
                Ephemeris record = sortedRecords[i];
                x[i]      = (record.Time - sortedRecords[0].Time); //Y为GPS周秒。
                yX[i]     = record.XYZ.X;
                yY[i]     = record.XYZ.Y;
                yZ[i]     = record.XYZ.Z;
                yClock[i] = record.ClockBias;
            }
            int order = 10;

            order = Math.Min(order, count);

            //fitX = new PolyFit(x, yX);
            //fitY = new PolyFit(x, yY);
            //fitZ = new PolyFit(x, yZ);
            //fitClock = new PolyFit(x, yClock);
            fitX = new LagrangeInterplation(x, yX, order);
            fitY = new LagrangeInterplation(x, yY, order);
            fitZ = new LagrangeInterplation(x, yZ, order);
            // fitClock = new LagrangeInterplation(x, yClock, 2);
            fitClock = new LagrangeInterplation(x, yClock, 10);


            //fitX = new ChebyshevPolyFit(x, yX, order);
            //fitY = new ChebyshevPolyFit(x, yY, order);
            //fitZ = new ChebyshevPolyFit(x, yZ, order);
            //fitClock = new LagrangeInterplation(x, yClock, 2);
        }