Handling frames Here, we see the classes used to represent frames and deal with coordinate transformations.

A simple model

To be flexible, the program should be able to respond to a request like "I want the coordinate of this body in a frame materializing this reference system, having this center, this reference plane and this reference axis".
It should also possible to specify if we want geometrical or apparent coordinates ; if apparent coordinates are wanted, it should be possible to specify from where they are apparent.

For the first version, I simplified and developed JEphem to be just able to respond to "I want the coordinates in this frame", for frames currently used in astronomy. In JEphem API, to identify a frame, constants of interface `jephem.astro.spacetime.SpaceConstants` are used.
In fact, the notion of frame, as it is used in the API, corresponds to "a way to express the coordinates" : it includes (sometimes implicitely) the information about apparent / geometrical coordinates.

The frames known by JEphem

The API names are the constant names of `jephem.astro.spacetime.SpaceConstants` ; these names are use throughout the program to designate the different frames.

API nameDescriptionNames of the spherical coordinates
(order : r, q, j)
FRAME_THEORY The coordinates are expressed as given by the theory used to compute them, without any transformation.
Center : depends on the theory
Ref. plane : depends on the theory
Ref. axis : depends on the theory
Reference system : depends on the theory
Geometric coordinates
Depends on the theory
FRAME_EC_HELIO_GEOMETRIC Center : Sun
Ref. plane : Mean ecliptic J2000
Ref. axis : Mean equinox J2000
Reference system : FK5
Geometric coordinates
(D, b, l)
FRAME_ECLIPTIC Center : Earth
Ref. plane : Mean ecliptic of date
Ref. axis : True equinox J2000
Reference system : FK5
Apparent coordinates
(r, l, b)
FRAME_EQUATORIAL Center : Earth
Ref. plane : True Equator of date
Ref. axis : True equinox J2000
Reference system : FK5
Apparent coordinates
(r, a, d)

A method, `jephem.astro.spacetime.Space.getFrameLabel(int whichFrame)` permits to get the English name of a given frame.

Coordinate labels

I developped constants and methods to identify the coordinates, and retrieve their names. This is implemented in classe `jephem.astro.spacetime.Space` and `jephem.astro.spacetime.SpaceConstants`.
• Six constants (`SpaceConstants.COORD_xx`) permit to identyify a coordinate.
• The notion of coord group was introduced for convenience (the groups are identified by `SpaceConstants.COORDGROUP_XXX`). Groups are accessed with `Space.getCoordGroup(int frame, int sphereCart)` This is useful to get the labels.