Ephemeris trail
Introduction
Generalities
VSOP87
Build VSOP87
Truncating VSOP87
Testing VSOP87
Pluto99
ELP82
Class organization
Reference frames
CoordTransfo
Handling frames
Handling precision
Units
Handling time
Putting all together
Swiss Ephemeris
Class organization
Now that we know how to get the coordinates of the celestial bodies, we can have a first glance at the program organization.
more details will be given in the page "Putting all together".

Low level classes

We have 3 classes to compute the coodinates :
  • jephem.astro.solarsystem.VSOP87.java
  • jephem.astro.solarsystem.elp82.ELP82.java
  • jephem.astro.solarsystem.Pluto99.java

  • They are called "low-level" because these classes are just able to perform one task : compute coordinates from a given theory.
    Pluto99 is autonom, but VSOP87 and ELP82 use other files ; this is summarized in the following diagram :

    All these classes are in the package jephem.astro.solarsystem or its sub-packages.
    The text files containing data are in directory JEphem/data/astro/planets. See JEphem directories for more information about data directory.

    Core astro classes

    To organize ephemeris calculation, two other classes were written : Body.java and AstroContext.java in package jephem.astro.



    Body is a class representing a celestial body, used to memorize the coordinates. One field (index) permits to know which planet the body refers to. For this, an integer is used. All classes of JEphem use constants of SolarSystemConstants to identify celestial bodies.

    AstroContext is the conductor of ephemeris calculation, the central class. It handles the date for which the computation is asked (jd), and an array of bodies.
    When a computation is performed, VSOP87, Pluto99 'n' co are not called directly. Instead, one should call AstroContext.calcBodyCoords(). One of the tasks of AstroContext is to call the low-level classes in function of the bodies it is handling.

    jephem.astro.AstroContext is characterized by its julian day and its bodies. As always in JEphem, the variables holding these data are private, and accessible via public methods.

    The parameter whichBody is expressed with constants of SolarSystemConstants.

    An other task of AstroContext will be to handle coordinate systems and units. We first need to see how JEphem deals with this before completing the class diagrams.