Пример #1
0
        public static AAS3DCoordinate EquatorialRectangularCoordinatesJ2000(double JD, bool bHighPrecision)
        {
            AAS3DCoordinate value = EclipticRectangularCoordinatesJ2000(JD, bHighPrecision);

            value = AASFK5.ConvertVSOPToFK5J2000(value);

            return(value);
        }
        public static AAS3DCoordinate EarthVelocity(double JD, bool bHighPrecision)
        {
            AAS3DCoordinate velocity = new AAS3DCoordinate();

            if (bHighPrecision)
            {
                velocity.X  = AASVSOP87A_Earth.X_DASH(JD);
                velocity.Y  = AASVSOP87A_Earth.Y_DASH(JD);
                velocity.Z  = AASVSOP87A_Earth.Z_DASH(JD);
                velocity    = AASFK5.ConvertVSOPToFK5J2000(velocity);
                velocity.X *= 100000000;
                velocity.Y *= 100000000;
                velocity.Z *= 100000000;
                return(velocity);
            }

            double T     = (JD - 2451545) / 36525;
            double L2    = 3.1761467 + 1021.3285546 * T;
            double L3    = 1.7534703 + 628.3075849 * T;
            double L4    = 6.2034809 + 334.0612431 * T;
            double L5    = 0.5995465 + 52.9690965 * T;
            double L6    = 0.8740168 + 21.3299095 * T;
            double L7    = 5.4812939 + 7.4781599 * T;
            double L8    = 5.3118863 + 3.8133036 * T;
            double Ldash = 3.8103444 + 8399.6847337 * T;
            double D     = 5.1984667 + 7771.3771486 * T;
            double Mdash = 2.3555559 + 8328.6914289 * T;
            double F     = 1.6279052 + 8433.4661601 * T;



            int nAberrationCoefficients = g_AberrationCoefficients.Length;

            for (int i = 0; i < nAberrationCoefficients; i++)
            {
                double Argument = g_AberrationCoefficients[i].L2 * L2 + g_AberrationCoefficients[i].L3 * L3 +
                                  g_AberrationCoefficients[i].L4 * L4 + g_AberrationCoefficients[i].L5 * L5 +
                                  g_AberrationCoefficients[i].L6 * L6 + g_AberrationCoefficients[i].L7 * L7 +
                                  g_AberrationCoefficients[i].L8 * L8 + g_AberrationCoefficients[i].Ldash * Ldash +
                                  g_AberrationCoefficients[i].D * D + g_AberrationCoefficients[i].Mdash * Mdash +
                                  g_AberrationCoefficients[i].F * F;
                velocity.X += (g_AberrationCoefficients[i].xsin + g_AberrationCoefficients[i].xsint * T) * Math.Sin(Argument);
                velocity.X += (g_AberrationCoefficients[i].xcos + g_AberrationCoefficients[i].xcost * T) * Math.Cos(Argument);

                velocity.Y += (g_AberrationCoefficients[i].ysin + g_AberrationCoefficients[i].ysint * T) * Math.Sin(Argument);
                velocity.Y += (g_AberrationCoefficients[i].ycos + g_AberrationCoefficients[i].ycost * T) * Math.Cos(Argument);

                velocity.Z += (g_AberrationCoefficients[i].zsin + g_AberrationCoefficients[i].zsint * T) * Math.Sin(Argument);
                velocity.Z += (g_AberrationCoefficients[i].zcos + g_AberrationCoefficients[i].zcost * T) * Math.Cos(Argument);
            }

            return(velocity);
        }