KStars keeps track of thousands of comets and asteroids.  
It uses orbital data published by NASA's Jet Propulsion 
Laboratory (JPL); these data are known as "orbital elements".
Because these small bodies are easily perturbed as they 
wander about the solar system, their orbital elements must 
be updated regularly.  Updating the elements will also add 
any recently-discovered bodies.


How to update the orbital elements of comets and asteroids:

-=( 1 )=-  The Easy Way.

Start KStars, then open the "Get New Stuff" Tool by selecting 
"Download Data..." from the File menu, or by pressing Ctrl+D.

If a new "ephemerides" package is available, select it and press 
the Install button.  Voila!

If the "ephemerides" package available from the "Get New Stuff" 
Tool is too old, you can use the menu items under 
"Settings" > "Updates" to download the last ephemerides from 
NASA's Jet Propulsion Laboratory website.


-=( 2 )=-  Doing it Manually.

It is possible that the ephemerides package is not completely 
up-to-date.  Fortunately, it's relatively simple to update the 
files manually whenever you want.  

::NOTE:: If you find that the ephemerides package is woefully 
outdated, and you follow this manual-install procedure, PLEASE
send your final comets.dat and asteroids.dat files to 
kstars-devel@kde.org!  Now is your chance to be a KStars Hero!


Step 1: The Comets

You can use the following command to download comets.dat file
from JPL website :
wget -O comets.dat --post-data="obj_group=all&obj_kind=com&obj_numbered=all&OBJ_field=0&OBJ_op=0&OBJ_value=&ORB_field=0&ORB_op=0&ORB_value=&combine_mode=AND&c1_group=OBJ&c1_item=Af&c1_op=!%3D&c1_value=D&c2_group=OBJ&c2_item=Ae&c2_op=!%3D&c2_value=SOHO&c_fields=AcBdBiBgBjBlBkBqBbAiAjAgAkAlApAqArAsBsBtCh&table_format=CSV&max_rows=10&format_option=full&query=Generate%20Table&.cgifields=format_option&.cgifields=field_list&.cgifields=obj_kind&.cgifields=obj_group&.cgifields=obj_numbered&.cgifields=combine_mode&.cgifields=ast_orbit_class&.cgifields=table_format&.cgifields=ORB_field_set&.cgifields=OBJ_field_set&.cgifields=preset_field_set&.cgifields=com_orbit_class" http://ssd.jpl.nasa.gov/sbdb_query.cgi

Delete or comment (with a '#') the first line.

Finally, copy your modified "comets.dat" to 
~/.kde/share/apps/kstars/ (for a single-user install) or 
$KDEDIR/share/apps/kstars/ (for a system-wide install).


Step 2: The Asteroids

You can use the following command to download asteroids.dat 
file from JPL website :
wget -O asteroids.dat --post-data="obj_group=all&obj_kind=ast&obj_numbered=num&OBJ_field=0&ORB_field=0&c1_group=OBJ&c1_item=Ai&c1_op=%3C&c1_value=12&c_fields=AcBdBiBhBgBjBlBkBmBqBbAiAjAgAkAlApAqArAsBsBtCh&table_format=CSV&max_rows=10&format_option=full&query=Generate%20Table&.cgifields=format_option&.cgifields=field_list&.cgifields=obj_kind&.cgifields=obj_group&.cgifields=obj_numbered&.cgifields=combine_mode&.cgifields=ast_orbit_class&.cgifields=table_format&.cgifields=ORB_field_set&.cgifields=OBJ_field_set&.cgifields=preset_field_set&.cgifields=com_orbit_class" http://ssd.jpl.nasa.gov/sbdb_query.cgi

Delete or comment (with a '#') the first line.

Finally, copy your modified "asteroids.dat" to 
~/.kde/share/apps/kstars/ (for a single-user install) or 
$KDEDIR/share/apps/kstars/ (for a system-wide install).


-=( 3 )=-  Another way.

The last method is to point your browser to the following 
URL:
http://ssd.jpl.nasa.gov/sbdb_query.cgi
and generate the file using the form

You must select the following columns to make the file 
compatible with kstars :

- for comets
1 full name
2 modified julian day of orbital elements
3 perihelion distance
4 eccentricity of orbit
5 inclination angle of orbit in degrees
6 argument of perihelion in degrees
7 longitude of the ascending node
8 time of perihelion passage
9 orbit solution ID
10 absolute magnitude
11 slope parameter
12 Near-Earth Object (NEO) flag
13 comet total magnitude parameter
14 comet nuclear magnitude parameter
15 object diameter
16 object bi/tri-axial ellipsoid dimensions
17 geometric albedo
18 rotation period
19 orbital period
20 earth minimum orbit intersection distance
21 orbit classification

-for asteroids
1 full name
2 Modified Julian Day of orbital elements
3 perihelion distance
4 semi-major axis
5 eccentricity of orbit
6 inclination angle of orbit in degrees
7 argument of perihelion in degrees
8 longitude of the ascending node in degrees
9 mean anomaly
10 time of perihelion passage
11 orbit solution ID
12 absolute magnitude
13 slope parameter
14 Near-Earth Object (NEO) flag
15 comet total magnitude parameter
16 comet nuclear magnitude parameter
17 object diameter
18 object bi/tri-axial ellipsoid dimensions
19 geometric albedo
20 rotation period
21 orbital period
22 earth minimum orbit intersection distance
23 orbit classification

The advantage of this method is that you can play with 
several filters and get a file containing exactly what 
you want.

Don't forget to delete or comment (with a '#') the first 
line.

Finally, copy your files to 
~/.kde/share/apps/kstars/ (for a single-user install) or 
$KDEDIR/share/apps/kstars/ (for a system-wide install).
