private static void CalculateTransitHelper(ref AASRiseTransitSetDetails details, double theta0, double deltaT, double Alpha1, double Alpha2, double Alpha3, double Longitude, ref double M0) { for (int i = 0; i < 2; i++) { //Calculate the details of transit if (details.bTransitValid) { double theta1 = theta0 + 360.985647 * M0; theta1 = AASCoordinateTransformation.MapTo0To360Range(theta1); double n = M0 + deltaT / 86400; double Alpha = AASInterpolate.Interpolate(n, Alpha1, Alpha2, Alpha3); double H = theta1 - Longitude - Alpha * 15; H = AASCoordinateTransformation.MapTo0To360Range(H); if (H > 180) { H -= 360; } double DeltaM = -H / 360; M0 += DeltaM; if (M0 < 0 || M0 >= 1) { details.bTransitValid = false; } } } }
public static double EclipticLongitude(double JD) { double Ldash = MeanLongitude(JD); double LdashDegrees = Ldash; Ldash = AASCoordinateTransformation.DegreesToRadians(Ldash); double D = MeanElongation(JD); D = AASCoordinateTransformation.DegreesToRadians(D); double M = AASEarth.SunMeanAnomaly(JD); M = AASCoordinateTransformation.DegreesToRadians(M); double Mdash = MeanAnomaly(JD); Mdash = AASCoordinateTransformation.DegreesToRadians(Mdash); double F = ArgumentOfLatitude(JD); F = AASCoordinateTransformation.DegreesToRadians(F); double E = AASEarth.Eccentricity(JD); double Esquared = E * E; double T = (JD - 2451545) / 36525; double A1 = AASCoordinateTransformation.MapTo0To360Range(119.75 + 131.849 * T); A1 = AASCoordinateTransformation.DegreesToRadians(A1); double A2 = AASCoordinateTransformation.MapTo0To360Range(53.09 + 479264.290 * T); A2 = AASCoordinateTransformation.DegreesToRadians(A2); int nLCoefficients = g_MoonCoefficients1.Length; double SigmaL = 0; for (int i = 0; i < nLCoefficients; i++) { double ThisSigma = g_MoonCoefficients2[i].A * Math.Sin(g_MoonCoefficients1[i].D * D + g_MoonCoefficients1[i].M * M + g_MoonCoefficients1[i].Mdash * Mdash + g_MoonCoefficients1[i].F * F); if ((g_MoonCoefficients1[i].M == 1) || (g_MoonCoefficients1[i].M == -1)) { ThisSigma *= E; } else if ((g_MoonCoefficients1[i].M == 2) || (g_MoonCoefficients1[i].M == -2)) { ThisSigma *= Esquared; } 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 = AASNutation.NutationInLongitude(JD); return(AASCoordinateTransformation.MapTo0To360Range(LdashDegrees + SigmaL / 1000000 + NutationInLong / 3600)); }
public static AASBinaryStarDetails Calculate(double t, double P, double T, double e, double a, double i, double omega, double w) { double n = 360 / P; double M = AASCoordinateTransformation.MapTo0To360Range(n * (t - T)); double E = AASKepler.Calculate(M, e); E = AASCoordinateTransformation.DegreesToRadians(E); i = AASCoordinateTransformation.DegreesToRadians(i); w = AASCoordinateTransformation.DegreesToRadians(w); omega = AASCoordinateTransformation.DegreesToRadians(omega); AASBinaryStarDetails details = new AASBinaryStarDetails { r = a * (1 - e * Math.Cos(E)) }; double v = Math.Atan(Math.Sqrt((1 + e) / (1 - e)) * Math.Tan(E / 2)) * 2; details.Theta = Math.Atan2(Math.Sin(v + w) * Math.Cos(i), Math.Cos(v + w)) + omega; details.Theta = AASCoordinateTransformation.MapTo0To360Range(AASCoordinateTransformation.RadiansToDegrees(details.Theta)); double sinvw = Math.Sin(v + w); double cosvw = Math.Cos(v + w); double cosi = Math.Cos(i); details.Rho = details.r * Math.Sqrt((sinvw * sinvw * cosi * cosi) + (cosvw * cosvw)); return(details); }
private static void CalculateSetHelper(ref AASRiseTransitSetDetails details, double theta0, double deltaT, double Alpha1, double Delta1, double Alpha2, double Delta2, double Alpha3, double Delta3, double Longitude, double Latitude, double LatitudeRad, double h0, ref double M2) { for (int i = 0; i < 2; i++) { //Calculate the details of setting if (details.bSetValid) { double theta1 = theta0 + 360.985647 * M2; theta1 = AASCoordinateTransformation.MapTo0To360Range(theta1); double n = M2 + deltaT / 86400; double Alpha = AASInterpolate.Interpolate(n, Alpha1, Alpha2, Alpha3); double Delta = AASInterpolate.Interpolate(n, Delta1, Delta2, Delta3); double H = theta1 - Longitude - Alpha * 15; AAS2DCoordinate Horizontal = AASCoordinateTransformation.Equatorial2Horizontal(H / 15, Delta, Latitude); double DeltaM = (Horizontal.Y - h0) / (360 * Math.Cos(AASCoordinateTransformation.DegreesToRadians(Delta)) * Math.Cos(LatitudeRad) * Math.Sin(AASCoordinateTransformation.DegreesToRadians(H))); M2 += DeltaM; if ((M2 < 0) || (M2 >= 1)) { details.bSetValid = false; } } } }
public static AASEclipticalElementDetails FK4B1950ToFK5J2000(double i0, double w0, double omega0) { //convert to radians double L = AASCoordinateTransformation.DegreesToRadians(5.19856209); double J = AASCoordinateTransformation.DegreesToRadians(0.00651966); double i0rad = AASCoordinateTransformation.DegreesToRadians(i0); double omega0rad = AASCoordinateTransformation.DegreesToRadians(omega0); double sini0rad = Math.Sin(i0rad); double cosi0rad = Math.Cos(i0rad); //Calculate some values used later double cosJ = Math.Cos(J); double sinJ = Math.Sin(J); double W = L + omega0rad; double cosW = Math.Cos(W); double sinW = Math.Sin(W); double A = sinJ * sinW; double B = sini0rad * cosJ + cosi0rad * sinJ * cosW; //Calculate the values AASEclipticalElementDetails details = new AASEclipticalElementDetails(); details.i = AASCoordinateTransformation.RadiansToDegrees(Math.Asin(Math.Sqrt(A * A + B * B))); double cosi = cosi0rad * cosJ - sini0rad * sinJ * cosW; if (cosi < 0) { details.i = 180 - details.i; } details.w = AASCoordinateTransformation.MapTo0To360Range(w0 + AASCoordinateTransformation.RadiansToDegrees(Math.Atan2(A, B))); details.omega = AASCoordinateTransformation.MapTo0To360Range(AASCoordinateTransformation.RadiansToDegrees(Math.Atan2(sini0rad * sinW, cosi0rad * sinJ + sini0rad * cosJ * cosW)) - 4.50001688); return(details); }
public static double EclipticLongitude(double JD) { double rho = (JD - 2451545) / 365250; double rhosquared = rho * rho; double rhocubed = rhosquared * rho; double rho4 = rhocubed * rho; //Calculate L0 int nL0Coefficients = g_L0NeptuneCoefficients.Length; double L0 = 0; int i; for (i = 0; i < nL0Coefficients; i++) { L0 += g_L0NeptuneCoefficients[i].A * Math.Cos(g_L0NeptuneCoefficients[i].B + g_L0NeptuneCoefficients[i].C * rho); } //Calculate L1 int nL1Coefficients = g_L1NeptuneCoefficients.Length; double L1 = 0; for (i = 0; i < nL1Coefficients; i++) { L1 += g_L1NeptuneCoefficients[i].A * Math.Cos(g_L1NeptuneCoefficients[i].B + g_L1NeptuneCoefficients[i].C * rho); } //Calculate L2 int nL2Coefficients = g_L2NeptuneCoefficients.Length; double L2 = 0; for (i = 0; i < nL2Coefficients; i++) { L2 += g_L2NeptuneCoefficients[i].A * Math.Cos(g_L2NeptuneCoefficients[i].B + g_L2NeptuneCoefficients[i].C * rho); } //Calculate L3 int nL3Coefficients = g_L3NeptuneCoefficients.Length; double L3 = 0; for (i = 0; i < nL3Coefficients; i++) { L3 += g_L3NeptuneCoefficients[i].A * Math.Cos(g_L3NeptuneCoefficients[i].B + g_L3NeptuneCoefficients[i].C * rho); } //Calculate L4 int nL4Coefficients = g_L4NeptuneCoefficients.Length; double L4 = 0; for (i = 0; i < nL4Coefficients; i++) { L4 += g_L4NeptuneCoefficients[i].A * Math.Cos(g_L4NeptuneCoefficients[i].B + g_L4NeptuneCoefficients[i].C * rho); } double value = (L0 + L1 * rho + L2 * rhosquared + L3 * rhocubed + L4 * rho4) / 100000000; //convert results back to degrees value = AASCoordinateTransformation.MapTo0To360Range(AASCoordinateTransformation.RadiansToDegrees(value)); return(value); }
public static AAS2DCoordinate PrecessEcliptic(double Lambda, double Beta, double JD0, double JD) { double T = (JD0 - 2451545.0) / 36525; double Tsquared = T * T; double t = (JD - JD0) / 36525; double tsquared = t * t; double tcubed = tsquared * t; //Now convert to radians Lambda = AASCoordinateTransformation.DegreesToRadians(Lambda); Beta = AASCoordinateTransformation.DegreesToRadians(Beta); double eta = AASCoordinateTransformation.DegreesToRadians(AASCoordinateTransformation.DMSToDegrees(0, 0, (47.0029 - 0.06603 * T + 0.000598 * Tsquared) * t + (-0.03302 + 0.000598 * T) * tsquared + 0.00006 * tcubed)); double pi = AASCoordinateTransformation.DegreesToRadians(AASCoordinateTransformation.DMSToDegrees(0, 0, 174.876384 * 3600 + 3289.4789 * T + 0.60622 * Tsquared - (869.8089 + 0.50491 * T) * t + 0.03536 * tsquared)); double p = AASCoordinateTransformation.DegreesToRadians(AASCoordinateTransformation.DMSToDegrees(0, 0, (5029.0966 + 2.22226 * T - 0.000042 * Tsquared) * t + (1.11113 - 0.000042 * T) * tsquared - 0.000006 * tcubed)); double A = Math.Cos(eta) * Math.Cos(Beta) * Math.Sin(pi - Lambda) - Math.Sin(eta) * Math.Sin(Beta); double B = Math.Cos(Beta) * Math.Cos(pi - Lambda); double C = Math.Cos(eta) * Math.Sin(Beta) + Math.Sin(eta) * Math.Cos(Beta) * Math.Sin(pi - Lambda); AAS2DCoordinate value = new AAS2DCoordinate(); value.X = AASCoordinateTransformation.MapTo0To360Range(AASCoordinateTransformation.RadiansToDegrees(p + pi - Math.Atan2(A, B))); value.Y = AASCoordinateTransformation.RadiansToDegrees(Math.Asin(C)); return(value); }
public static double EarthAphelion(long k, bool bBarycentric) { double kdash = k + 0.5; double ksquared = kdash * kdash; double JD = 2451547.507 + 365.2596358 * kdash + 0.0000000156 * ksquared; if (!bBarycentric) { //Apply the corrections double A1 = AASCoordinateTransformation.MapTo0To360Range(328.41 + 132.788585 * k); A1 = AASCoordinateTransformation.DegreesToRadians(A1); double A2 = AASCoordinateTransformation.MapTo0To360Range(316.13 + 584.903153 * k); A2 = AASCoordinateTransformation.DegreesToRadians(A2); double A3 = AASCoordinateTransformation.MapTo0To360Range(346.20 + 450.380738 * k); A3 = AASCoordinateTransformation.DegreesToRadians(A3); double A4 = AASCoordinateTransformation.MapTo0To360Range(136.95 + 659.306737 * k); A4 = AASCoordinateTransformation.DegreesToRadians(A4); double A5 = AASCoordinateTransformation.MapTo0To360Range(249.52 + 329.653368 * k); A5 = AASCoordinateTransformation.DegreesToRadians(A5); JD -= 1.352 * Math.Sin(A1); JD += 0.061 * Math.Sin(A2); JD += 0.062 * Math.Sin(A3); JD += 0.029 * Math.Sin(A4); JD += 0.031 * Math.Sin(A5); } return(JD); }
public static double TrueApogee(double k) { double MeanJD = MeanApogee(k); //convert from K to T double T = k / 1325.55; double Tsquared = T * T; double Tcubed = Tsquared * T; double T4 = Tcubed * T; double D = AASCoordinateTransformation.MapTo0To360Range(171.9179 + 335.9106046 * k - 0.0100383 * Tsquared - 0.00001156 * Tcubed + 0.000000055 * T4); D = AASCoordinateTransformation.DegreesToRadians(D); double M = AASCoordinateTransformation.MapTo0To360Range(347.3477 + 27.1577721 * k - 0.0008130 * Tsquared - 0.0000010 * Tcubed); M = AASCoordinateTransformation.DegreesToRadians(M); double F = AASCoordinateTransformation.MapTo0To360Range(316.6109 + 364.5287911 * k - 0.0125053 * Tsquared - 0.0000148 * Tcubed); F = AASCoordinateTransformation.DegreesToRadians(F); int nApogeeCoefficients = g_MoonPerigeeApogeeCoefficients2.Length; double Sigma = 0; for (int i = 0; i < nApogeeCoefficients; i++) { Sigma += (g_MoonPerigeeApogeeCoefficients2[i].C + T * g_MoonPerigeeApogeeCoefficients2[i].T) * Math.Sin(D * g_MoonPerigeeApogeeCoefficients2[i].D + M * g_MoonPerigeeApogeeCoefficients2[i].M + F * g_MoonPerigeeApogeeCoefficients2[i].F); } return(MeanJD + Sigma); }
public static double NeptuneInclinationJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; return(AASCoordinateTransformation.MapTo0To360Range(1.769953 + 0.0002256 * T + 0.00000023 * Tsquared)); }
public static double ApogeeParallax(double k) { //convert from K to T double T = k / 1325.55; double Tsquared = T * T; double Tcubed = Tsquared * T; double T4 = Tcubed * T; double D = AASCoordinateTransformation.MapTo0To360Range(171.9179 + 335.9106046 * k - 0.0100383 * Tsquared - 0.00001156 * Tcubed + 0.000000055 * T4); D = AASCoordinateTransformation.DegreesToRadians(D); double M = AASCoordinateTransformation.MapTo0To360Range(347.3477 + 27.1577721 * k - 0.0008130 * Tsquared - 0.0000010 * Tcubed); M = AASCoordinateTransformation.DegreesToRadians(M); double F = AASCoordinateTransformation.MapTo0To360Range(316.6109 + 364.5287911 * k - 0.0125053 * Tsquared - 0.0000148 * Tcubed); F = AASCoordinateTransformation.DegreesToRadians(F); int nApogeeCoefficients = g_MoonPerigeeApogeeCoefficients4.Length; double Parallax = 3245.251; for (int i = 0; i < nApogeeCoefficients; i++) { Parallax += (g_MoonPerigeeApogeeCoefficients4[i].C + T * g_MoonPerigeeApogeeCoefficients4[i].T) * Math.Cos(D * g_MoonPerigeeApogeeCoefficients4[i].D + M * g_MoonPerigeeApogeeCoefficients4[i].M + F * g_MoonPerigeeApogeeCoefficients4[i].F); } return(Parallax / 3600); }
private static void HelperSubroutine(double e, double lambdadash, double p, double a, double omega, double i, double c1, double s1, ref double r, ref double lambda, ref double gamma, ref double w) { double e2 = e * e; double e3 = e2 * e; double e4 = e3 * e; double e5 = e4 * e; double M = AASCoordinateTransformation.DegreesToRadians(lambdadash - p); double Crad = (2 * e - 0.25 * e3 + 0.0520833333 * e5) * Math.Sin(M) + (1.25 * e2 - 0.458333333 * e4) * Math.Sin(2 * M) + (1.083333333 * e3 - 0.671875 * e5) * Math.Sin(3 * M) + 1.072917 * e4 * Math.Sin(4 * M) + 1.142708 * e5 * Math.Sin(5 * M); double C = AASCoordinateTransformation.RadiansToDegrees(Crad); r = a * (1 - e2) / (1 + e * Math.Cos(M + Crad)); double g = omega - 168.8112; double grad = AASCoordinateTransformation.DegreesToRadians(g); double irad = AASCoordinateTransformation.DegreesToRadians(i); double a1 = Math.Sin(irad) * Math.Sin(grad); double a2 = c1 * Math.Sin(irad) * Math.Cos(grad) - s1 * Math.Cos(irad); gamma = AASCoordinateTransformation.RadiansToDegrees(Math.Asin(Math.Sqrt(a1 * a1 + a2 * a2))); double urad = Math.Atan2(a1, a2); double u = AASCoordinateTransformation.RadiansToDegrees(urad); w = AASCoordinateTransformation.MapTo0To360Range(168.8112 + u); double h = c1 * Math.Sin(irad) - s1 * Math.Cos(irad) * Math.Cos(grad); double psirad = Math.Atan2(s1 * Math.Sin(grad), h); double psi = AASCoordinateTransformation.RadiansToDegrees(psirad); lambda = lambdadash + C + u - g - psi; }
public static AASPhysicalSunDetails Calculate(double JD) { double theta = AASCoordinateTransformation.MapTo0To360Range((JD - 2398220) * 360 / 25.38); double I = 7.25; double K = 73.6667 + 1.3958333 * (JD - 2396758) / 36525; //Calculate the apparent longitude of the sun (excluding the effect of nutation) double L = AASEarth.EclipticLongitude(JD); double R = AASEarth.RadiusVector(JD); double SunLong = L + 180 - AASCoordinateTransformation.DMSToDegrees(0, 0, 20.4898 / R); double epsilon = AASNutation.TrueObliquityOfEcliptic(JD); //Convert to radians epsilon = AASCoordinateTransformation.DegreesToRadians(epsilon); SunLong = AASCoordinateTransformation.DegreesToRadians(SunLong); K = AASCoordinateTransformation.DegreesToRadians(K); I = AASCoordinateTransformation.DegreesToRadians(I); theta = AASCoordinateTransformation.DegreesToRadians(theta); double x = Math.Atan(-Math.Cos(SunLong) * Math.Tan(epsilon)); double y = Math.Atan(-Math.Cos(SunLong - K) * Math.Tan(I)); AASPhysicalSunDetails details = new AASPhysicalSunDetails(); details.P = AASCoordinateTransformation.RadiansToDegrees(x + y); details.B0 = AASCoordinateTransformation.RadiansToDegrees(Math.Asin(Math.Sin(SunLong - K) * Math.Sin(I))); double eta = Math.Atan(Math.Tan(SunLong - K) * Math.Cos(I)); details.L0 = AASCoordinateTransformation.MapTo0To360Range(AASCoordinateTransformation.RadiansToDegrees(eta - theta)); return(details); }
public static double Calculate(double JD) { double rho = (JD - 2451545) / 365250; double rhosquared = rho * rho; double rhocubed = rhosquared * rho; double rho4 = rhocubed * rho; double rho5 = rho4 * rho; //Calculate the Suns mean longitude double L0 = AASCoordinateTransformation.MapTo0To360Range(280.4664567 + 360007.6982779 * rho + 0.03032028 * rhosquared + rhocubed / 49931 - rho4 / 15300 - rho5 / 2000000); //Calculate the Suns apparent right ascension double SunLong = AASSun.ApparentEclipticLongitude(JD); double SunLat = AASSun.ApparentEclipticLatitude(JD); double epsilon = AASNutation.TrueObliquityOfEcliptic(JD); AAS2DCoordinate Equatorial = AASCoordinateTransformation.Ecliptic2Equatorial(SunLong, SunLat, epsilon); epsilon = AASCoordinateTransformation.DegreesToRadians(epsilon); double E = L0 - 0.0057183 - Equatorial.X * 15 + AASCoordinateTransformation.DMSToDegrees(0, 0, AASNutation.NutationInLongitude(JD)) * Math.Cos(epsilon); if (E > 180) { E = -(360 - E); } E *= 4; //Convert to minutes of time return(E); }
public static double NeptuneLongitudePerihelionJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; return(AASCoordinateTransformation.MapTo0To360Range(48.120276 + 0.0291866 * T + 0.00007610 * Tsquared)); }
public static double TrueLongitudeAscendingNode(double JD) { double TrueAscendingNode = MeanLongitudeAscendingNode(JD); double D = MeanElongation(JD); D = AASCoordinateTransformation.DegreesToRadians(D); double M = AASEarth.SunMeanAnomaly(JD); M = AASCoordinateTransformation.DegreesToRadians(M); double Mdash = MeanAnomaly(JD); Mdash = AASCoordinateTransformation.DegreesToRadians(Mdash); double F = ArgumentOfLatitude(JD); F = AASCoordinateTransformation.DegreesToRadians(F); //Add the principal additive terms TrueAscendingNode -= 1.4979 * Math.Sin(2 * (D - F)); TrueAscendingNode -= 0.1500 * Math.Sin(M); TrueAscendingNode -= 0.1226 * Math.Sin(2 * D); TrueAscendingNode += 0.1176 * Math.Sin(2 * F); TrueAscendingNode -= 0.0801 * Math.Sin(2 * (Mdash - F)); return(AASCoordinateTransformation.MapTo0To360Range(TrueAscendingNode)); }
public static AASSelenographicMoonDetails CalculateSelenographicPositionOfSun(double JD, bool bHighPrecision) { double R = AASEarth.RadiusVector(JD, bHighPrecision) * 149597970; double Delta = AASMoon.RadiusVector(JD); double lambda0 = AASSun.ApparentEclipticLongitude(JD, bHighPrecision); double lambda = AASMoon.EclipticLongitude(JD); double beta = AASMoon.EclipticLatitude(JD); double lambdah = AASCoordinateTransformation.MapTo0To360Range(lambda0 + 180 + Delta / R * 57.296 * Math.Cos(AASCoordinateTransformation.DegreesToRadians(beta)) * Math.Sin(AASCoordinateTransformation.DegreesToRadians(lambda0 - lambda))); double betah = Delta / R * beta; //What will be the return value AASSelenographicMoonDetails details = new AASSelenographicMoonDetails(); //Calculate the optical libration double omega = 0; double DeltaU = 0; double sigma = 0; double I = 0; double rho = 0; double ldash0 = 0; double bdash0 = 0; double ldash20 = 0; double bdash20 = 0; double epsilon = 0; CalculateOpticalLibration(JD, lambdah, betah, ref ldash0, ref bdash0, ref ldash20, ref bdash20, ref epsilon, ref omega, ref DeltaU, ref sigma, ref I, ref rho); details.l0 = ldash0 + ldash20; details.b0 = bdash0 + bdash20; details.c0 = AASCoordinateTransformation.MapTo0To360Range(450 - details.l0); return(details); }
public static double EclipticLatitude(double JD) { double Ldash = MeanLongitude(JD); Ldash = AASCoordinateTransformation.DegreesToRadians(Ldash); double D = MeanElongation(JD); D = AASCoordinateTransformation.DegreesToRadians(D); double M = AASEarth.SunMeanAnomaly(JD); M = AASCoordinateTransformation.DegreesToRadians(M); double Mdash = MeanAnomaly(JD); Mdash = AASCoordinateTransformation.DegreesToRadians(Mdash); double F = ArgumentOfLatitude(JD); F = AASCoordinateTransformation.DegreesToRadians(F); double E = AASEarth.Eccentricity(JD); double Esquared = E * E; double T = (JD - 2451545) / 36525; double A1 = AASCoordinateTransformation.MapTo0To360Range(119.75 + 131.849 * T); A1 = AASCoordinateTransformation.DegreesToRadians(A1); double A3 = AASCoordinateTransformation.MapTo0To360Range(313.45 + 481266.484 * T); A3 = AASCoordinateTransformation.DegreesToRadians(A3); int nBCoefficients = g_MoonCoefficients3.Length; double SigmaB = 0; for (int i = 0; i < nBCoefficients; i++) { double ThisSigma = g_MoonCoefficients4[i] * Math.Sin(g_MoonCoefficients3[i].D * D + g_MoonCoefficients3[i].M * M + g_MoonCoefficients3[i].Mdash * Mdash + g_MoonCoefficients3[i].F * F); if ((g_MoonCoefficients3[i].M == 1) || (g_MoonCoefficients3[i].M == -1)) { ThisSigma *= E; } else if ((g_MoonCoefficients3[i].M == 2) || (g_MoonCoefficients3[i].M == -2)) { ThisSigma *= Esquared; } 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); }
public static double SaturnLongitudePerihelionJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(93.057237 + 0.5665415 * T + 0.00052850 * Tsquared + 0.000004912 * Tcubed)); }
public static double UranusLongitudeAscendingNodeJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(74.005957 + 0.0741431 * T + 0.00040539 * Tsquared + 0.000000119 * Tcubed)); }
public static double UranusInclinationJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(0.773197 - 0.0016869 * T + 0.00000349 * Tsquared + 0.000000016 * Tcubed)); }
public static double NeptuneMeanLongitudeJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(304.348665 + 218.4862002 * T + 0.00000059 * Tsquared - 0.000000002 * Tcubed)); }
public static double UranusLongitudePerihelionJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(173.005291 + 0.0893212 * T - 0.00009470 * Tsquared + 0.000000414 * Tcubed)); }
public static double VenusInclination(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(3.394662 + 0.0010037 * T - 0.00000088 * Tsquared - 0.000000007 * Tcubed)); }
public static double NeptuneLongitudeAscendingNodeJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(131.784057 - 0.0061651 * T - 0.00000219 * Tsquared - 0.000000078 * Tcubed)); }
public static double MercuryMeanLongitude(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(252.250906 + 149474.0722491 * T + 0.00030350 * Tsquared + 0.000000018 * Tcubed)); }
public static double SunMeanAnomaly(double JD) { double T = (JD - 2451545) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(357.5291092 + 35999.0502909 * T - 0.0001536 * Tsquared + Tcubed / 24490000)); }
public static double VenusLongitudeAscendingNode(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(76.679920 + 0.9011206 * T + 0.00040618 * Tsquared - 0.000000093 * Tcubed)); }
public static double UranusMeanLongitudeJ2000(double JD) { double T = (JD - 2451545.0) / 36525; double Tsquared = T * T; double Tcubed = Tsquared * T; return(AASCoordinateTransformation.MapTo0To360Range(314.055005 + 428.4669983 * T - 0.00000486 * Tsquared + 0.000000006 * Tcubed)); }
public static double PhaseAngle(double GeocentricElongation, double EarthObjectDistance, double EarthSunDistance) { //Convert from degrees to radians GeocentricElongation = AASCoordinateTransformation.DegreesToRadians(GeocentricElongation); //Return the result return(AASCoordinateTransformation.MapTo0To360Range(AASCoordinateTransformation.RadiansToDegrees(Math.Atan2(EarthSunDistance * Math.Sin(GeocentricElongation), EarthObjectDistance - EarthSunDistance * Math.Cos(GeocentricElongation))))); }