the next thing to do is to start using spice
There are a few different ways to do this
( and a bit of time to wrap ones brain around 3d geometry in space )
i am using the SSB ( Solar System Barycenter ) locations and planet/moon barycenters relative to the ssb
see the wikibook page :
http://en.wikibooks.org/wiki/Celestia/SPICE-- note this needs to be updated
-- links
-- the "c" docs
http://naif.jpl.nasa.gov/pub/naif/toolk ... index.html-- a good PDF on the spk kernels
http://naif.jpl.nasa.gov/pub/naif/toolk ... 19_spk.pdf-- general tutorials
http://naif.jpl.nasa.gov/naif/tutorials.htmlhttp://naif.jpl.nasa.gov/naif/gettinghelp.html-- programming with spice
http://naif.jpl.nasa.gov/naif/lessons.htmlFor general information wikipedia is not that bad of a source .
but a few more will be needed
The "de430.bsp" file needs to be downloaded and installed to
celestia/extras/data ( or your custom "extras" folder defined in the " celestia.cfg " file )
----
ftp://naif.jpl.nasa.gov/pub/naif/generi ... /de430.bsp----
before planets and moons and spacecraft can be added the Barycenter's need to be defined in an ssc file
Code:
ReferencePoint "Mercury_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "1"
Origin "0"
Period 0.25
BoundingRadius 1e10
}
}
ReferencePoint "Venus_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "2"
Origin "0"
Period 1
BoundingRadius 1e10
}
}
ReferencePoint "Earth_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "3"
Origin "0"
Period 1
BoundingRadius 1e10
}
}
###########################
#### note mars bary "4" and mars center "499" have been defined as the SAME in SPICE seeing as there is only 30 CM difference
###########################
ReferencePoint "Mars_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "4"
Origin "0"
Period 2
BoundingRadius 1e10
}
}
ReferencePoint "Jupiter_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "5"
Origin "0"
Period 12
BoundingRadius 1e10
}
}
ReferencePoint "Saturn_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "6"
Origin "0"
Period 29.4577
BoundingRadius 1e10
}
}
ReferencePoint "Uranus_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "7"
Origin "0"
Period 85
BoundingRadius 1e10
}
}
ReferencePoint "Neptune_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "8"
Origin "0"
Period 166
BoundingRadius 1e10
}
}
as you might have noticed in the ssc file I am using the smaller
"de430.bsp"( 116 Meg) instead of the
HUGE 3.2 Gig "de431.bsp"
de430 covers the time frame from "1550 Jan 01 to 2650 Jan 22"
de431 covers the time frame from "13201 B.C. to 17191 A.D."
see the readme file
ftp://naif.jpl.nasa.gov/pub/naif/generi ... t_SPKs.txtthe bsp files are the "when and where ( position/velocity) " location "Spice kernels"
and they are in the PDS "generic_kernels" archive located here:
ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/all the planets and moons are here , well most of them , some are in the mission specific archives .
but for the barycenters we only need the one in the "spk" section for the planets
-- the readme for the "spk" section
ftp://naif.jpl.nasa.gov/pub/naif/generi ... E_SPKs.txtDownload " de430.bsp "
ftp://naif.jpl.nasa.gov/pub/naif/generi ... k/planets/--- pdf warning -- spice doc/tutorial on the spk files
http://naif.jpl.nasa.gov/pub/naif/toolk ... 19_spk.pdfnow this is where using cspice programs come in
notice the "Beginning" and "Ending" times
Code:
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
well if you are scratching your head trying to figure out how these are determined this please read the tutorial on using cspice
and see the user guide:
http://naif.jpl.nasa.gov/pub/naif/toolk ... index.htmlthe program called "brief"
open a terminal in the folder that has the bsp file and run
Code:
brief -c de430.bsp
the output will be this
Code:
BRIEF -- Version 3.0.0, January 14, 2008 -- Toolkit Version N0064
Summary for: de430.bsp
Bodies: MERCURY BARYCENTER (1) w.r.t. SOLAR SYSTEM BARYCENTER (0)
VENUS BARYCENTER (2) w.r.t. SOLAR SYSTEM BARYCENTER (0)
EARTH BARYCENTER (3) w.r.t. SOLAR SYSTEM BARYCENTER (0)
MARS BARYCENTER (4) w.r.t. SOLAR SYSTEM BARYCENTER (0)
JUPITER BARYCENTER (5) w.r.t. SOLAR SYSTEM BARYCENTER (0)
SATURN BARYCENTER (6) w.r.t. SOLAR SYSTEM BARYCENTER (0)
URANUS BARYCENTER (7) w.r.t. SOLAR SYSTEM BARYCENTER (0)
NEPTUNE BARYCENTER (8) w.r.t. SOLAR SYSTEM BARYCENTER (0)
PLUTO BARYCENTER (9) w.r.t. SOLAR SYSTEM BARYCENTER (0)
SUN (10) w.r.t. SOLAR SYSTEM BARYCENTER (0)
MERCURY (199) w.r.t. MERCURY BARYCENTER (1)
VENUS (299) w.r.t. VENUS BARYCENTER (2)
MOON (301) w.r.t. EARTH BARYCENTER (3)
EARTH (399) w.r.t. EARTH BARYCENTER (3)
Start of Interval (ET) End of Interval (ET)
----------------------------- -----------------------------
1549 DEC 31 00:00:00.000 2650 JAN 25 00:00:00.000
or from the "brief --help" menu use the "-t" option instead of the "-c" option
Code:
brief -t de430.bsp
BRIEF -- Version 3.0.0, January 14, 2008 -- Toolkit Version N0064
Summary for: de430.bsp
Bodies Start of Interval (ET) End of Interval (ET)
------- ----------------------------- -----------------------------
1 MERCURY BARYCENTER 1549 DEC 31 00:00:00.000 2650 JAN 25 00:00:00.000
2 VENUS BARYCENTER Same coverage as previous object
3 EARTH BARYCENTER Same coverage as previous object
4 MARS BARYCENTER Same coverage as previous object
5 JUPITER BARYCENTER Same coverage as previous object
6 SATURN BARYCENTER Same coverage as previous object
7 URANUS BARYCENTER Same coverage as previous object
8 NEPTUNE BARYCENTER Same coverage as previous object
9 PLUTO BARYCENTER Same coverage as previous object
10 SUN Same coverage as previous object
199 MERCURY Same coverage as previous object
299 VENUS Same coverage as previous object
301 MOON Same coverage as previous object
399 EARTH Same coverage as previous object
same data but a different format
on to the meat of the ssc file
i am going to use Earth as an example
Code:
ReferencePoint "Earth_bary" "Sol"
{
Beginning "1549 12 31 00:00:00.000"
Ending "2650 01 25 00:00:00.000"
OrbitFrame { EclipticJ2000 { Center "SSB"}}
Visible true
Clickable true
SpiceOrbit
{
Kernel "de430.bsp"
Target "3"
Origin "0"
Period 1
BoundingRadius 1e10
}
}
this is rather self explanatory
"Beginning and Ending"
are the times from the bsp file BUT the month is NOT using letters !!!
But the number for the month
"OrbitFrame " is using
EclipticJ2000 frame
two odd ones are
----
Visible true
Clickable true
----
this is overiding the celestia default orbits SO
if you want to see the orbit and be able to click on the body for this orbit ,these need to be set to "true"
"Kernel"
the name of the one being used
"Target"
this is the numeral from the output of "brief" for the body
this will NEVER change
1 will ALWAYS be the barycenter for Mercury
3 will ALWAYS be the barycenter for the Earth
"Origin"
this is the SUN barycenter "0"
( for a moon of Jupiter it will be "5" for Jupiter
all bodies are relative to the parent body
" Period"
This is the length of a year and is in earth
years---- INSTALLING ----
For MS windows 7
C:\\Celestia\extras\Barycenter.ssc
( Celestia NEEDS TO BE installed here C:\\Celestia , this is do to the FUBAR mess Microsoft made with the UAC )
For Linux
/Your.Celestia.Install.Location/celestia/extras/1.Barycenter.ssc
/usr/share/celestia/extras
/DATA/SUSE12/Celestia.svn/extras
gcc enforces the c langguage read order so the ssc DOSE need that 1. in front so that it is read FIRST before the ssc for the planets
( SolarSystem.SPICE.ssc )
the naming is very important !!!
any ssc file that NEEDS a ssecond ssc file MUST 100% MUST be read AFTER the file it needs !!!!!
the barycenter ssc MUST be read BEFORE the ssc for the planets
( this is the same issue as with reading "SomeLibrary.so's" from a list )