Moon algorithm from Meeus 'Astronomical Formulae for Calculators' ch 30 Geocentric longitude (lambda) claimed to 10" Geocentric latitude (beta) claimed to 3" Parallax (Pm) to 0.2" Positions referred to mean equinox of date but nutation correction for lambda below T = (JD - 2415020.0)/36525 Om = 259.183275 - 1934.1420 * T + 0.002078 * T * T + 0.0000022 * T * T * T Lm = 270.434164 + 481267.8831 * T - 0.001133 * T * T + 0.0000019 * T * T * T +0.000233 * sin(51.2 + 20.2 * T) +0.003964 * sin(346.560 + 132.870 * T - 0.0091731 * T * T) +0.001964 * sin(Om) M = 358.475833 + 35999.0498 * T - 0.000150 * T * T - 0.0000033 * T * T * T -0.001778 * sin(51.2 + 20.2 * T) Mm = 296.104608 + 477198.8491 * T + 0.009192 * T * T + 0.0000144 * T * T * T +0.000817 * sin(51.2 + 20.2 * T) +0.003964 * sin(346.560 + 132.870 * T - 0.0091731 * T * T) +0.002541 * sin(Om) D = 350.737486 + 445267.1142 * T - 0.001436 * T * T + 0.0000019 * T * T * T +0.002011 * sin(51.2 + 20.2 * T) +0.003964 * sin(346.560 + 132.870 * T - 0.0091731 * T * T) +0.001964 * sin(Om) F = 11.250889 + 483202.0251 * T - 0.003211 * T * T - 0.0000003 * T * T * T +0.003964 * sin(346.560 + 132.870 * T - 0.0091731 * T * T) -0.024691 * sin(Om) -0.004328 * sin(Om + 275.05 - 2.30 * T) e = 1 - 0.002495 * T - 0.00000752 * T * T e2 = e * e lambda = Lm + 6.288750 * sin(Mm) + 1.274018 * sin(2 * D-Mm) + 0.658309 * sin(2 * D) + 0.213616 * sin(2 * Mm) - e * 0.185596 * sin(M) - 0.114336 * sin(2 * F) + 0.058793 * sin(2 * D-2 * Mm) + e * 0.057212 * sin(2 * D -M - Mm) + 0.053320 * sin(2 * D +Mm) + e * 0.045874 * sin(2 * D -M) + e * 0.041024 * sin(Mm - M) - 0.034718 * sin(D) - e * 0.030465 * sin(M + Mm) + 0.015326 * sin(2 * D - 2 * F) - 0.012528 * sin(2 * F + Mm) - 0.010980 * sin(2 * F - Mm) + 0.010674 * sin(4 * D - Mm) + 0.010034 * sin(3 * Mm) + 0.008548 * sin(4 * D - 2 * Mm) - e * 0.007910 * sin(M - Mm + 2 * D) - e * 0.006783 * sin(2 * D + M) + 0.005162 * sin(Mm - D) + e * 0.005000 * sin(M + D) + e * 0.004049 * sin(Mm - M + 2 * D) + 0.003996 * sin(2 * Mm + 2 * D) + 0.003862 * sin(4 * D) + 0.003665 * sin(2 * D - 3 * Mm) + e * 0.002695 * sin(2 * Mm - M) + 0.002602 * sin(Mm - 2 * F - 2 * D) + e * 0.002396 * sin(2 * D - M - 2 * Mm) - 0.002349 * sin(Mm + D) + e2 * 0.002249 * sin(2 * D -2 * M) - e * 0.002125 * sin(2 * Mm + M) - e2 * 0.002079 * sin(2 * M) + e2 * 0.002059 * sin(2 * D - Mm - 2 * M) - 0.001773 * sin (Mm + 2 * D - 2 * F) - 0.001595 * sin (2 * F + 2 * D) + e * 0.001220 * sin (4 * D - M - Mm) - 0.001110 * sin(2 * Mm + 2 * F) + 0.000892 * sin(Mm - 3 * D) - e * 0.000811 * sin(M + Mm + 2 * D) + e * 0.000761 * sin(4 * D - M - 2 * Mm) + e2 * 0.000717 * sin(Mm - 2 * M) + e2 * 0.000704 * sin(Mm - 2 * M - 2 * D) + e * 0.000693 * sin(M - 2 * Mm + 2 * D) + e * 0.000598 * sin(2 * D - M - 2 * F) + 0.000550 * sin(Mm + 4 * D) + 0.000538 * sin(4 * Mm) + e * 0.000521 * sin(4 * D - M) + 0.000486 * sin(2 * Mm - D) B = + 5.128189 * sin(F) + 0.280606 * sin(Mm + F) + 0.277693 * sin(Mm - F) + 0.173238 * sin(2 * D - F) + 0.055413 * sin(2 * D + F - Mm) + 0.046272 * sin(2 * D - F -Mm) + 0.032573 * sin(2 * D + F) + 0.017198 * sin(2 * Mm + F) + 0.009267 * sin(2 * D + Mm - F) + 0.008823 * sin(2 * Mm - F) + e * 0.008247 * sin(2 * D - M - F) + 0.004323 * sin(2 * D - F - 2 * Mm) + 0.004200 * sin(2 * D + F + Mm) + e * 0.003372 * sin(F - M - 2 * D) + e * 0.002472 * sin(2 * D + F - M - Mm) + e * 0.002222 * sin(2 * D + F - M) + e * 0.002072 * sin(2 * D - F - M - Mm) + e * 0.001877 * sin(F - M + Mm) + 0.001828 * sin(4 * D - F - Mm) - e * 0.001803 * sin(F + M) - 0.001750 * sin(3 * F) + e * 0.001570 * sin(Mm - M - F) - 0.001487 * sin(F + D) - e * 0.001481 * sin(F + M + Mm) + e * 0.001417 * sin(F - M - Mm) + e * 0.001350 * sin(F - M) + 0.001330 * sin(F - D) + 0.001106 * sin(F + 3 * Mm) + 0.001020 * sin(4 * D - F) + 0.000833 * sin(F + 4 * D - Mm) + 0.000781 * sin(Mm - 3 * F) + 0.000670 * sin(F + 4 * D - 2 * Mm) + 0.000606 * sin(2 * D - 3 * F) + 0.000597 * sin(2 * D + 2 * Mm - F) + e * 0.000492 * sin(2 * D + Mm - M - F) + 0.000450 * sin(2 * Mm - F - 2 * D) + 0.000439 * sin(3 * Mm - F) + 0.000423 * sin(F + 2 * D + 2 * Mm) + 0.000422 * sin(2 * D - F - 3 * Mm) - e * 0.000367 * sin(M + F + 2 * D - Mm) - e * 0.000353 * sin(M + F + 2 * D) + 0.000331 * sin(F + 4 * D) + e * 0.000317 * sin(2 * D + F - M + Mm) + e2 * 0.000306 * sin(2 * D - 2 * M - F) - 0.000283 * sin(Mm + 3 * F) W1 = 0.0004664 * cos(Om) W2 = 0.0000754 * cos(Om + 275.05 - 2.30 * T) beta = B * (1 - W1 - W2) Pm = 0.950724 + 0.051818 * cos(Mm) + 0.009531 * cos(2 * D - Mm) + 0.007843 * cos(2 * D) + 0.002824 * cos(2 * Mm) + 0.000857 * cos(2 * D + Mm) + e * 0.000533 * cos(2 * D - M) + e * 0.000401 * cos(2 * D - M - Mm) + e * 0.000320 * cos(Mm - M) - 0.000271 * cos(D) - e * 0.000264 * cos(M + Mm) - 0.000198 * cos(2 * F - Mm) + 0.000173 * cos(3 * Mm) + 0.000167 * cos(4 * D - Mm) - e * 0.000111 * cos(M) + 0.000103 * cos(4 * D - 2 * Mm) - 0.000084 * cos(2 * Mm - 2 * D) - e * 0.000083 * cos(2 * D + M) + 0.000079 * cos(2 * D + 2 * Mm) + 0.000072 * cos(4 * D) + e * 0.000064 * cos(2 * D - M + Mm) - e * 0.000063 * cos(2 * D + M - Mm) + e * 0.000041 * cos(M + D) + e * 0.000035 * cos(2 * Mm - M) - 0.000033 * cos(3 * Mm - 2 * D) - 0.000030 * cos(Mm + D) - 0.000029 * cos(2 * F- 2 * D) - e * 0.000029 * cos(2 * Mm + M) + e2 * 0.000026 * cos(2 * D - 2 * M) - 0.000023 * cos(2 * F - 2 * D + Mm) + e * 0.000019 * cos(4 * D - M - Mm) Distance of Moon in Earth radii = 1/(sin(Pm) Nutation correction: L = 279.6967 + 36000.7689 * T + 0.000303 * T * T dphi = -17.2 * sin(Om) - 1.3 * sin(2 * L) Apparent lambda = lambda + dphi