Monday, January 12, 2009

small bodies in Stellarium

In an effort to predict comet positions and asteroid occultations for the RASC February The Sky This Month presentation that I will be delivering soon, I decided to look into adding orbital elements for some small bodies into Stellarium (version 0.9).

I learned that you enter the data into the ssystem.ini file. This is located on my Windoze XP box in the following location: c:\Program Files\Stellarium\data\. The file contains orbital data for the Sun, planets, dwarf planets, our Moon, many of the satellites in the rest of the solar system, and a descent of large asteroids.

Asteroid data is entered in the following format:

[hel]
name = (949) Hel
parent = Sun
radius = 35
oblateness = 0.0
halo = true
color = 1.0,1.0,1.0
tex_halo = star16x16.png
tex_map = nomap.png
coord_func = comet_orbit
orbit_Epoch = 2454800.5
orbit_MeanAnomaly = 283.13505
orbit_SemiMajorAxis = 2.9979720
orbit_Eccentricity = 0.1988840
orbit_ArgOfPericenter = 248.62593
orbit_AscendingNode = 321.56215
orbit_Inclination = 10.69282
sidereal_period = 1896.0062682
lighting = true
albedo = 0.0487

Comet data format:

[kushida]
name = 144P/Kushida
parent = Sun
radius = 1000
oblateness = 0.0
halo = true
color = 1.0,1.0,1.0
tex_halo = star16x16.png
tex_map = nomap.png
coord_func = comet_orbit
orbit_TimeAtPericenter = 2454858.372534250649
orbit_PericenterDistance = 1.4390015242849589771623
orbit_Eccentricity = 0.6276770637738544600381
orbit_ArgOfPericenter = 216.1024794233911
orbit_AscendingNode = 245.5606305460352
orbit_Inclination = 4.1093091894419684351191
lighting = false
albedo = 1
sidereal_period = 365.25

N.B. One must change the "sidereal_period" to "orbit_visualization_period" for the 0.10.0 beta version of Stellarium.

To determine the orbital data, I visited the awesome Solar System Dynamics page over at JPL. Took me a few moments to learn the nomenclature and to find the appropriate fields.

a = semi-major axis
e = eccentricity
i = inclination
M = mean anomaly
node = ascending node
peri = argument of pericenter
period = sidereal period
q = pericenter or perihelion distance
tp = time at pericenter or perihelion

One datum that threw me was the epoch. At first, I used the tp parameter but that proved incorrect. Suddenly I noticed the "Orbital Elements at Epoch" heading above the main table. There it was!

3 comments:

Sami Jumppanen said...

Hey, no comments?? Trying to add a updated comet data to Stellarium is driving me mad! Nothing seems to work right. From MPC I got everything, except for the orbit mean anomaly. Then I found a JavaScript parser, that didn't seem to do anything useful for JPL/Horizons data! Then I looked at a big ssystem.ini (link from Stellarium wiki) for comets, and 103P / Hartley 2 was not there!!!
Unbeliavable.

Why is this so difficult? There should be tools to automatically generate the data needed, or actually, Stellarium should be ready to use the MPC / JPL data from the web directly!

I'll see what I can do by your instructions. BIG TANKS for sorting even a part of the problems!

bla said...

There should be a simple way of doing it.

Commercial applications like StarryNight, TheSky, or SkyTools have, essentially, "one-click" options to add small bodies or updated comet lists. One day, I'm sure, this will be added to Stellarium, either directly in the software, or as a plug-in.

When I add small object data, I use multiple sources (aerith.net, MPC, JPL's SSD, and others) and then test it to ensure it works correctly.

Anonymous said...

Here are nice instructions
http://stargazerslounge.com/topic/113971-adding-comets-asteroids-and-small-bodies-to-stellarium/