Orbital Elements

Emergency Info
Systems Status
Observer Info
Science at ARO
ARO In The News
Internal Docs
Tucson Info
Photo Gallery
Search ARO

Using Orbital Elements for Ephemeris Objects



Orbital elements are specified in a file whose name ends with .eph in the /home/obs/xxx directory, where xxx is the observer's initials. The orbital elements should be calculated for the current date. That is, they need to be corrected for perturbations by the major planets, etc. How long the elements are valid depends on the object and the nearest perturbers. A comet ephemeris is usually good enough for a week. A minor planet ephemeris generally lasts longer before it diverges significantly. (One can check the accuracy by checking the RA and Dec on the Status screen with the geocentric position of the object calculated by JPL, for example. Or one can check how well a new ephemeris agrees with an older one as described below.

Generating an ephemeris file:

The JPL Horizons Ephemeris Generator and the Minor Planet Center normally give only elements for a standard epoch. However, there is a way to get JPL Horizons to perturb the standard elements to a particular date. (See here  or "telnet ssd.jpl.nasa.gov 6775"). A script has been written to enter the cryptic commands required in the telnet session and to extract the relevant data to a file. The obs login defines an alias, get_elem, to execute this script.

The syntax is:

get_elem <object> <file> [-d <date>]

where <object> is the object name and <file> is the file to which the elements are to be written. Optional <date> (default: today's date) is the date of the elements. <date> is any format OK for the --date option of the Unix date command. The object name must be one recognized by JPL Horizons. Although the script will write to any <file>, only files ending in ".eph" in the observer's /home/obs/xxx directory will be found by Rambo or Catalog.

For example, Comet T7/Linear is known as C/2002 T7 to Horizons. So to write the elements to a file linear.eph:

get_elem C/2002 T7 linear.eph

for the current date, and

get_elem C/2002 T7 linear.eph -d Jan 1 2005

gets elements for New Years Day 2005.

get_elem Ceres ceres.eph -d + 2 days

gets elements of Ceres for two days from now.

Note that the <object> name is allowed to contain more than one word. The last item/word before the -d (if any) is assumed to be the <file>. Everything before that is assumed to be the <object> name. Also the optional <date> can have several items. Therefore, the -d, if present, must follow <file>.

While the script executes, you will see on your screen the chatter between the script and JPL. As JPL sends escape sequences to query/set terminal characteristics, there will at first be some complaints about "unknown character", "window size could not be determined", ... These are normal and can be ignored. Finally, there will be a Horizons> prompt and the script will start entering the proper commands. There should be no further complaints and you do NOT need to enter any responses. After logging out, the script will look in the transcript of the session for the orbital elements. If it finds some, it will offer to strip out the extraneous information. This is recommended, but if you want to examine the full transcript type n. (The control system will ignore the extraneous lines when it reads the file.)

If the name is not recognized, there WILL be complaints from JPL, but the script will press on as if the name had been accepted. When the script ends, it should notice that there are no elements. If so, it will say that the name was not recognized and offer to delete the file. Sometimes the file will contain a list objects it does recognize. If so, one might want to look for the proper name in the file and try again. Or one might use the JPL Ephemeris Generator to first find the correct spelling of the desired <object>.

 The Horizons program accepts several different formats for <object>, nevertheless it can also be picky about the syntax. The program identifies an object by either Name or Designator or JPL ID/record number. For example, the asteroid Ixion is known by the Name (Ixion), the ID number (28978), and the Designator (2001 KX76). When it parses <object>, it decides which of these it must be (by an undocumented rule). One can force this choice to Name or Designator by proceeding it by NAME= or DES=. Names are sensitive to spaces but not to upper/lower case. Designators are sensitive to both. (For comets, uppercase Designators are generally used.) An asterisk following the Name/Designator means that the specified string is only a portion of the full Name/Designator. If this syntax is used, the result is likely to be a list of possible objects. This will confuse the script, but you may be able to find the desired object in the list and try again with that Name/Designator. A list can also be the result if a Name (of the discoverer) is used for a comet. For example, Linear produces a long list of possibilities. However, Machholz produces only one and can therefore be used for <object> in the script.

The contents of the ephemeris file:

If one has orbital elements obtained by some other means, one can edit them into a file manually.

Examples of the resulting file are:

JPL/HORIZONS LINEAR (C/2002 T7) 2004-Jul-30 09:57:17
Target body name: LINEAR {source: JPL#101}
2453216.500000000 = A.D. 2004-Jul-30 00:00:00.0000 (CT)
EC= 1.000579811794336E+00 QR= 6.146040606354138E-01 IN= 1.605839228587721E+02
OM= 9.486200689632537E+01 W = 1.577392612818464E+02 Tp= 2.453118562257732E+06
N = 2.855890186103608E-05 MA= 2.796994369930558E-03 TA= 1.108776736275935E+02
A =-1.060006137577697E+03 AD= 6.684586454211886E+91 PR= 1.157407291666667E+95


JPL/HORIZONS 1 Ceres 2004-Aug-12 00:38:17
Target body name: 1 Ceres {source: JPL#24}
2453229.500000000 = A.D. 2004-Aug-12 00:00:00.0000 (CT)
EC= 7.992012709846702E-02 QR= 2.546086744651279E+00 IN= 1.058127394159551E+01
OM= 8.045842154832782E+01 W = 7.392231842318330E+01 Tp= 2.453196905874877E+06
N = 2.141078427394553E-01 MA= 6.978657816056472E+00 TA= 8.213143605798097E+00
A = 2.767245344278671E+00 AD= 2.988403943906063E+00 PR= 1.681395671423763E+03

One can put comments in the file because the control system ignores all lines in the file except a line beginning "JPL/HORIZONS" and the lines from $$SOE to $$EOE. The $$ lines bracket the lines containing the ephemeris elements, so to keep from confusing the software, it would be best not to put comments here.

Changing the name of the object:

The "JPL/HORIZONS" line is used to specify the object name. The name used is taken starting from the third item in this line. If this item begins a parenthetical expression [such as (C/2002 T7) above], the name is this expression with underscores substituted for the blanks and without the parentheses. (The control system doesn't allow object names to be more than one word.) Otherwise, the name is simply the third item in the line. Thus in the above two examples the, names would be C/2002_T7 and Ceres. One is free to edit this line to change the name of the object.

The remaining lines in the file:

The "Target body" line is ignored, but retained in the file to document the source of orbital elements (in braces).

The line following $$SOE contains the Julian date of the perihelion passage. (The "=" and the rest of the line is ignored.) The lines following this up to the $$EOE line contain the orbital elements in keyword=value format. The keywords may be given in any order. The ones needed are:

EC Eccentricity, e
QR Periapsis distance, q (AU)
IN Inclination w.r.t xy-plane, i (degrees)
OM Longitude of Ascending Node, OMEGA, (degrees)
W Argument of Perifocus, w (degrees)
Tp Time of periapsis (Julian day number)
N Mean motion, n (degrees/day)
MA Mean anomaly, M (degrees)
A Semi-major axis, a (AU)

The remaining 3 in the JPL output are ignored:

TA True anomaly, nu (degrees)
AD Apoapsis distance (AU)
PR Orbital period (day)


Checking an older ephemeris against a newer one:

The first step is the change the name of the object in one of the ephemeris files. Next have the operator load the two files into Rambo. The Rambo catalog screen should now show both objects. Run the script:

check_ephem <old name> <new name>

This will produce output such as:

           RA      Dec     Az       El    Vel
new     11.58888 4.0805 279.0674 -6.3566 10.972
- old:   0.00000 0.0000   0.0001  0.0000  0.004

with <new name> substituted for "new" and <old name> for "old".

The "new" line contains the current RA, Dec, Az, El, and Vel of the <new name> object (RA in hours, Vel in km/sec, the rest in degrees). The "- old" line is the difference between the <new name> and the <old name> ephemerides.

 Copyright Arizona Radio Observatory.
For problems or questions regarding this web contact [tfolkers{at}email{dot}arizona{dot}edu].
Last updated: 11/08/11.