First of all, there is no means to specify an orbit in the stars.dat file. You must use an .stc file. To compensate for this somewhat, it's now possible to override a star from stars.dat with a replacement in an .stc file. This happens automatically when you create a star in an .stc file that has the same catalog number as one from stars.dat.
Another feature that was introduced to make it easier to create orbiting stars is automatic catalog number generation. You can simply omit the catalog number from the star definition and Celestia will generate one for you. A star without a catalog number must have a name. (It's actually not that hard to allow completely anonymous stars too, if someone voices a good reason for it.)
Here's a very basic orbiting star definition for Sirius B:
Code: Select all
# For compatibility with older .stc files, the Star keyword is optional
Star "Sirius B"
{
RA 101.28855
Dec -16.713142
Distance 8.6012238
SpectralType "DA2"
AppMag 8.44
EllipticalOrbit
{
Period 50.090
SemiMajorAxis 19.8 # 19.8AU = 7.500 arcsec
Eccentricity 0.592
Inclination 97.51
AscendingNode 161.33
ArgOfPericenter 184.56
MeanAnomaly 40.89
}
}
This example uses an EllipticalOrbit (as I expect most stars will), but any other orbit type valid for planets will also work for stars. Of course, since Celestia has no custom orbits for stars, SampledOrbits are the only type that make sense. Just as for planet orbits, the units are years for period, AU for the semimajor axis. The center of the orbit is given by the star's RA, declination, and distance. For this example, I've used the coordinates of Sirius. This isn't correct. Sirius and Sirius B are of comparable mass, so they actually orbit around a barycenter about one third of the way from Sirius B to Sirius A. The way to correct the problem is to redefine Sirius A with a position and orbit identical to Sirius B except for the semimajor axis and argument of pericenter. The ratio of the semimajor axes should match the observed value (smaA / smaB = 0.466) and the arguments of pericenter should differ by exactly 180 degrees.
Systems with more than three stars often have a pair of stars A and B in a tight orbit, with much more distanct companion C orbiting the pair. It's not possible to describe such a system using a fixed barycenter like the one in the Sirius B example, thus Celestia supports a new barycenter object in .stc files. A barycenter behaves just like an invisible star and may even have planets. Here's a sample trinary system featuring a barycenter:
Code: Select all
Barycenter "Trinary AB"
{
RA 81.2886
Dec 16.7
Distance 1200
EllipticalOrbit
{
Period 10.0
SemiMajorAxis 0.3
Eccentricity 0.02
Inclination 30.0
AscendingNode 0.0
LongOfPericenter 120.0
}
}
Star "Trinary A"
{
RA 81.2886
Dec 16.7
Distance 1200
SpectralType "K7V"
AbsMag 6.5
EllipticalOrbit
{
Period 0.01
SemiMajorAxis 0.03
Eccentricity 0.12
Inclination 30.0
AscendingNode 45.0
LongOfPericenter 0.0
}
Barycenter "Trinary AB"
}
Star "Trinary B"
{
RA 81.2886
Dec 16.7
Distance 1200
SpectralType "K5V"
AbsMag 6.0
EllipticalOrbit
{
Period 0.01
SemiMajorAxis 0.03
Eccentricity 0.12
Inclination 30.0
AscendingNode 45.0
LongOfPericenter 180.0
}
Barycenter "Trinary AB"
}
Star "Trinary C"
{
RA 81.2886
Dec 16.7
Distance 1200
SpectralType "M8V"
AbsMag 10.5
EllipticalOrbit
{
Period 10.0
SemiMajorAxis 5
Eccentricity 0.02
Inclination 30.0
AscendingNode 0.0
LongOfPericenter 300.0
}
}
In this system C is a red dwarf orbiting two close K stars. A and B orbit the barycenter AB, which in turn orbits the barycenter ABC. Since ABC is fixed, however, we didn't have to define a separate barycenter object for it. More complex systems such as the Castor sextuple can be created by adding additional stars and barycenters. It's also possible to create systems where close planets orbit an individual star in a pair, but very distant planets orbit the barycenter of the pair: just give the barycenter as the parent of the distant planets and a star as the parent of the close ones.
The reference plane for star orbits is the ecliptic. Grant has mentioned that it would be convienent to also allow orbits to be specified with respect to the sky plane, since this is how star orbits are given in catalogs.
I welcome feedback on this implementation of star orbits. Nothing should be considered final; there's plenty of opportunity to change things before the next Celestia release.
--Chris