elp_mpp02.mpp02 module

Accurate Moon positions using the Lunar solution ELP/MPP02

This module uses the semi-analytical Lunar solution ELP2000/MPP02 to compute the geocentric position of the Moon in the dynamical mean ecliptic and equinox of J2000. This Python code has been adapted from the Fortran version in libTheSky.

Remarks:

The nominal values of some constants have to be corrected. There are two sets of corrections, one of which can be chosen using the parameter ‘mode’ (used in e.g. initialise()):

  • mode=0, the constants are fitted to LLR observations provided from 1970 to 2001 (default);

  • mode=1, the constants are fitted to DE405 ephemeris over one century (1950-2060); the lunar angles W1, W2, W3 receive also additive corrections to the secular coefficients. This is known as the ‘historical mode’.

When the mode is changed, the constants will be reinitialised and the data file reread.

References:

Dependencies:

Apart from the standard Python modules math and sys, numpy and fortranformat must be installed.

Copyright:

Copyright (c) 2019 Marc van der Sluys, Radboud University Nijmegen, The Netherlands - http://astro.ru.nl/~sluys/ (this Python code)

This file is part of the ELP/MPP02 Python package, see: [Pypi URL] / [Github URL]

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this code. If not, see <http://www.gnu.org/licenses/>.

elp_mpp02.mpp02.compute_lbr(jd, mode=0)[source]
Compute the spherical lunar coordinates using the ELP2000/MPP02 lunar theory in the dynamical mean ecliptic

and equinox of J2000.

Input parameters:

  • jd: Julian day to compute Moon position for

  • mode: Index of the corrections to the constants: 0-Fit to LLR observations (default), 1-Fit to DE405 1950-2060 (historical)

Return values:

  • lon: Ecliptic longitude (rad)

  • lat: Ecliptic latitude (rad)

  • rad: Distance (km)

elp_mpp02.mpp02.compute_xyz(jd, mode=0)[source]

Compute the rectangular lunar coordinates using the ELP/MPP02 lunar theory in the dynamical mean ecliptic and equinox of J2000.

Input parameters:

  • jd: Julian day to compute Moon position for

  • mode: Index of the corrections to the constants: 0-Fit to LLR observations, 1-Fit to DE405 1950-2060 (historical)

Return value:

  • xyz(3): Geocentric rectangular coordinates (km)

  • vxyz(3): Geocentric rectangular velocities (km/day):

  • ierr: File error index - ierr=0: no error, ierr=1: file error

elp_mpp02.mpp02.elp_dms2rad(deg, min, sec)[source]

Function for the conversion sexagesimal degrees -> radians in initialise()

elp_mpp02.mpp02.initialise(mode=0)[source]

Initialization of the constants and parameters used for the evaluation of the ELP/MPP02 series

Input parameters:

  • mode: Index of the corrections to the constants: 0-Fit to LLR observations (default), 1-Fit to DE405 1950-2060 (historical)

elp_mpp02.mpp02.initialise_and_read_files(mode=0)[source]

Initialise ELP/MPP02 constants and read the data files if necessary

Input parameters:

  • mode: Index of the corrections to the constants: 0-Fit to LLR observations (default), 1-Fit to DE405 1950-2060 (historical)

elp_mpp02.mpp02.read_files()[source]

Read the six data files containing the ELP/MPP02 series

Return values:

  • ierr: File error index: ierr=0: no error, ierr=1: file error