コード例 #1
0
    public static double EclipticLongitude(double JD)
    {
        double Ldash        = MeanLongitude(JD);
        double LdashDegrees = Ldash;

        Ldash = CT.D2R(Ldash);
        double D = MeanElongation(JD);

        D = CT.D2R(D);
        double M = CAAEarth.SunMeanAnomaly(JD);

        M = CT.D2R(M);
        double Mdash = MeanAnomaly(JD);

        Mdash = CT.D2R(Mdash);
        double F = ArgumentOfLatitude(JD);

        F = CT.D2R(F);

        double E = CAAEarth.Eccentricity(JD);
        double T = (JD - 2451545) / 36525;

        double A1 = CT.M360(119.75 + 131.849 * T);

        A1 = CT.D2R(A1);
        double A2 = CT.M360(53.09 + 479264.290 * T);

        A2 = CT.D2R(A2);
        double A3 = CT.M360(313.45 + 481266.484 * T);

        A3 = CT.D2R(A3);

        int nLCoefficients = GFX.g_MoonCoefficients1.Length;

        Debug.Assert(GFX.g_MoonCoefficients2.Length == nLCoefficients);
        double SigmaL = 0;

        for (int i = 0; i < nLCoefficients; i++)
        {
            double ThisSigma = GFX.g_MoonCoefficients2[i].A * Math.Sin(GFX.g_MoonCoefficients1[i].D * D + GFX.g_MoonCoefficients1[i].M * M + GFX.g_MoonCoefficients1[i].Mdash * Mdash + GFX.g_MoonCoefficients1[i].F * F);

            if (GFX.g_MoonCoefficients1[i].M != 0)
            {
                ThisSigma *= E;
            }

            SigmaL += ThisSigma;
        }

        //Finally the additive terms
        SigmaL += 3958 * Math.Sin(A1);
        SigmaL += 1962 * Math.Sin(Ldash - F);
        SigmaL += 318 * Math.Sin(A2);

        //And finally apply the nutation in longitude
        double NutationInLong = CAANutation.NutationInLongitude(JD);

        return(CT.M360(LdashDegrees + SigmaL / 1000000 + NutationInLong / 3600));
    }
コード例 #2
0
    public static double EclipticLatitude(double JD)
    {
        double Ldash = MeanLongitude(JD);

        Ldash = CT.D2R(Ldash);
        double D = MeanElongation(JD);

        D = CT.D2R(D);
        double M = CAAEarth.SunMeanAnomaly(JD);

        M = CT.D2R(M);
        double Mdash = MeanAnomaly(JD);

        Mdash = CT.D2R(Mdash);
        double F = ArgumentOfLatitude(JD);

        F = CT.D2R(F);

        double E = CAAEarth.Eccentricity(JD);
        double T = (JD - 2451545) / 36525;

        double A1 = CT.M360(119.75 + 131.849 * T);

        A1 = CT.D2R(A1);
        double A2 = CT.M360(53.09 + 479264.290 * T);

        A2 = CT.D2R(A2);
        double A3 = CT.M360(313.45 + 481266.484 * T);

        A3 = CT.D2R(A3);

        int nBCoefficients = GFX.g_MoonCoefficients3.Length;

        Debug.Assert(GFX.g_MoonCoefficients4.Length == nBCoefficients);
        double SigmaB = 0;

        for (int i = 0; i < nBCoefficients; i++)
        {
            double ThisSigma = GFX.g_MoonCoefficients4[i] * Math.Sin(GFX.g_MoonCoefficients3[i].D * D + GFX.g_MoonCoefficients3[i].M * M + GFX.g_MoonCoefficients3[i].Mdash * Mdash + GFX.g_MoonCoefficients3[i].F * F);

            if (GFX.g_MoonCoefficients3[i].M != 0)
            {
                ThisSigma *= E;
            }

            SigmaB += ThisSigma;
        }

        //Finally the additive terms
        SigmaB -= 2235 * Math.Sin(Ldash);
        SigmaB += 382 * Math.Sin(A3);
        SigmaB += 175 * Math.Sin(A1 - F);
        SigmaB += 175 * Math.Sin(A1 + F);
        SigmaB += 127 * Math.Sin(Ldash - Mdash);
        SigmaB -= 115 * Math.Sin(Ldash + Mdash);

        return(SigmaB / 1000000);
    }
コード例 #3
0
    //////////////////////////////// Implementation ///////////////////////////////

    protected static void CalculateOpticalLibration(double JD, double Lambda, double Beta, ref double ldash, ref double bdash, ref double ldash2, ref double bdash2, ref double epsilon, ref double omega, ref double DeltaU, ref double sigma, ref double I, ref double rho)
    {
        //Calculate the initial quantities
        double Lambdarad = CAACoordinateTransformation.DegreesToRadians(Lambda);
        double Betarad   = CAACoordinateTransformation.DegreesToRadians(Beta);

        I      = CAACoordinateTransformation.DegreesToRadians(1.54242);
        DeltaU = CAACoordinateTransformation.DegreesToRadians(CAANutation.NutationInLongitude(JD) / 3600);
        double F = CAACoordinateTransformation.DegreesToRadians(CAAMoon.ArgumentOfLatitude(JD));

        omega   = CAACoordinateTransformation.DegreesToRadians(CAAMoon.MeanLongitudeAscendingNode(JD));
        epsilon = CAANutation.MeanObliquityOfEcliptic(JD) + CAANutation.NutationInObliquity(JD) / 3600;

        //Calculate the optical librations
        double W = Lambdarad - DeltaU / 3600 - omega;
        double A = Math.Atan2(Math.Sin(W) * Math.Cos(Betarad) * Math.Cos(I) - Math.Sin(Betarad) * Math.Sin(I), Math.Cos(W) * Math.Cos(Betarad));

        ldash = CAACoordinateTransformation.MapTo0To360Range(CAACoordinateTransformation.RadiansToDegrees(A) - CAACoordinateTransformation.RadiansToDegrees(F));
        if (ldash > 180)
        {
            ldash -= 360;
        }
        bdash = Math.Asin(-Math.Sin(W) * Math.Cos(Betarad) * Math.Sin(I) - Math.Sin(Betarad) * Math.Cos(I));

        //Calculate the physical librations
        double T  = (JD - 2451545.0) / 36525;
        double K1 = 119.75 + 131.849 * T;

        K1 = CAACoordinateTransformation.DegreesToRadians(K1);
        double K2 = 72.56 + 20.186 * T;

        K2 = CAACoordinateTransformation.DegreesToRadians(K2);

        double M = CAAEarth.SunMeanAnomaly(JD);

        M = CAACoordinateTransformation.DegreesToRadians(M);
        double Mdash = CAAMoon.MeanAnomaly(JD);

        Mdash = CAACoordinateTransformation.DegreesToRadians(Mdash);
        double D = CAAMoon.MeanElongation(JD);

        D = CAACoordinateTransformation.DegreesToRadians(D);
        double E = CAAEarth.Eccentricity(JD);

        rho = -0.02752 * Math.Cos(Mdash) + -0.02245 * Math.Sin(F) + 0.00684 * Math.Cos(Mdash - 2 * F) + -0.00293 * Math.Cos(2 * F) + -0.00085 * Math.Cos(2 * F - 2 * D) + -0.00054 * Math.Cos(Mdash - 2 * D) + -0.00020 * Math.Sin(Mdash + F) + -0.00020 * Math.Cos(Mdash + 2 * F) + -0.00020 * Math.Cos(Mdash - F) + 0.00014 * Math.Cos(Mdash + 2 * F - 2 * D);

        sigma = -0.02816 * Math.Sin(Mdash) + 0.02244 * Math.Cos(F) + -0.00682 * Math.Sin(Mdash - 2 * F) + -0.00279 * Math.Sin(2 * F) + -0.00083 * Math.Sin(2 * F - 2 * D) + 0.00069 * Math.Sin(Mdash - 2 * D) + 0.00040 * Math.Cos(Mdash + F) + -0.00025 * Math.Sin(2 * Mdash) + -0.00023 * Math.Sin(Mdash + 2 * F) + 0.00020 * Math.Cos(Mdash - F) + 0.00019 * Math.Sin(Mdash - F) + 0.00013 * Math.Sin(Mdash + 2 * F - 2 * D) + -0.00010 * Math.Cos(Mdash - 3 * F);

        double tau = 0.02520 * E * Math.Sin(M) + 0.00473 * Math.Sin(2 * Mdash - 2 * F) + -0.00467 * Math.Sin(Mdash) + 0.00396 * Math.Sin(K1) + 0.00276 * Math.Sin(2 * Mdash - 2 * D) + 0.00196 * Math.Sin(omega) + -0.00183 * Math.Cos(Mdash - F) + 0.00115 * Math.Sin(Mdash - 2 * D) + -0.00096 * Math.Sin(Mdash - D) + 0.00046 * Math.Sin(2 * F - 2 * D) + -0.00039 * Math.Sin(Mdash - F) + -0.00032 * Math.Sin(Mdash - M - D) + 0.00027 * Math.Sin(2 * Mdash - M - 2 * D) + 0.00023 * Math.Sin(K2) + -0.00014 * Math.Sin(2 * D) + 0.00014 * Math.Cos(2 * Mdash - 2 * F) + -0.00012 * Math.Sin(Mdash - 2 * F) + -0.00012 * Math.Sin(2 * Mdash) + 0.00011 * Math.Sin(2 * Mdash - 2 * M - 2 * D);

        ldash2 = -tau + (rho * Math.Cos(A) + sigma * Math.Sin(A)) * Math.Tan(bdash);
        bdash  = CAACoordinateTransformation.RadiansToDegrees(bdash);
        bdash2 = sigma * Math.Cos(A) - rho * Math.Sin(A);
    }
コード例 #4
0
    public static double RadiusVector(double JD)
    {
        double Ldash = MeanLongitude(JD);

        Ldash = CT.D2R(Ldash);
        double D = MeanElongation(JD);

        D = CT.D2R(D);
        double M = CAAEarth.SunMeanAnomaly(JD);

        M = CT.D2R(M);
        double Mdash = MeanAnomaly(JD);

        Mdash = CT.D2R(Mdash);
        double F = ArgumentOfLatitude(JD);

        F = CT.D2R(F);

        double E = CAAEarth.Eccentricity(JD);
        double T = (JD - 2451545) / 36525;

        double A1 = CT.M360(119.75 + 131.849 * T);

        A1 = CT.D2R(A1);
        double A2 = CT.M360(53.09 + 479264.290 * T);

        A2 = CT.D2R(A2);
        double A3 = CT.M360(313.45 + 481266.484 * T);

        A3 = CT.D2R(A3);

        int nRCoefficients = GFX.g_MoonCoefficients1.Length;

        Debug.Assert(GFX.g_MoonCoefficients2.Length == nRCoefficients);
        double SigmaR = 0;

        for (int i = 0; i < nRCoefficients; i++)
        {
            double ThisSigma = GFX.g_MoonCoefficients2[i].B * Math.Cos(GFX.g_MoonCoefficients1[i].D * D + GFX.g_MoonCoefficients1[i].M * M + GFX.g_MoonCoefficients1[i].Mdash * Mdash + GFX.g_MoonCoefficients1[i].F * F);
            if (GFX.g_MoonCoefficients1[i].M != 0)
            {
                ThisSigma *= E;
            }

            SigmaR += ThisSigma;
        }

        return(385000.56 + SigmaR / 1000);
    }