Celestia/Tutorials/Moons

In Celestia, just as it is possible to add planets, asteroids, and comets in orbit around stars, it is possible to put moons around those objects, and even moons on those moons! This tutorial will show you how.

This tutorial assumes you have read the previous page: Simple Asteroids.

Basic definition
"Name" "Sol/Parent Body" { 	Class "class" Mesh "mesh.*" Texture "texture.*" Radius Color [  ] BlendTexture true EllipticalOrbit { 	Epoch Period SemiMajorAxis Eccentricity Inclination AscendingNode ArgOfPericenter MeanAnomaly } 	Albedo RotationPeriod }

We'll go through the parameters one by one. The definition looks very similar to the one given in the Simple Asteroids page, but there are some crucial differences that should be noticed.

Also, at any point you can add a comment to your .ssc code. A comment is started by a  sign and lasts until the next line break. It's a good idea to add comments explaining if you calculated parameters yourself, or if they are guesses.

List of parameters
Generally speaking, most parameters for moons are the same as the ones in asteroids. For the mesh, texture, radius, color, albedo, and rotation, they are the same, so refer to that page for more information. Listed below are the differences.

Names
"Name" "Sol/Parent Body"

This is similar to the definition in asteroids. Here,  just means to put the moon in orbit around some "Parent Body", which in turn orbits "Sol" (the Sun). This hierarchy can extend indefinitely: for the moon of a moon, or a sub-satellite, it would look like this:

"Name" "Sol/Parent Body 2/Parent Body"

Where "Name" orbits "Parent Body", which orbits "Parent Body 2", which orbits "Sol".

Class
Class "moon"

Class "minormoon"

Celestia has two SSC object class for moons:  and. They are pretty self-explanatory:  should be used for the major moons of an object, while   should be used for the minor moons. Minor moons are small, usually irregular, and may have eccentric and/or inclined orbits. Newly discovered moons are generally minor moons; all of the major moons have already been added in the default version of Celestia.

Orbit
EllipticalOrbit { 	Epoch Period SemiMajorAxis Eccentricity Inclination AscendingNode ArgOfPericenter MeanAnomaly }

This bit of code defines how the moon orbits the parent body. Other parameters may be used, such as, but this is the most common format. The key difference from objects orbiting stars (such as the Sun) is that for moons, the unit for  is in kilometers, not astronomical units.

Definition using barycenters
For many minor planets, such as Pluto, their moons are so large relative to the parent body that the common center of mass (the barycenter) is outside of the parent body. For these objects, a special method has to be used so that the two bodies orbit their barycenter.

Here is some sample code:

ReferencePoint "Barycenter" "Sol" { 	EllipticalOrbit { 	Epoch Period SemiMajorAxis Eccentricity Inclination AscendingNode ArgOfPericenter MeanAnomaly } 	Visible true Clickable true } "Name" "Sol" { 	Class "class" Mesh "mesh.*" Texture "texture.*" Radius Color [  ] BlendTexture true OrbitFrame { EquatorJ2000 { Center "Sol/Barycenter" } } 	EllipticalOrbit { 	Epoch Period SemiMajorAxis Eccentricity Inclination AscendingNode ArgOfPericenter MeanAnomaly } 	Albedo RotationPeriod } "Moon" "Sol/Name" { 	Class "class" Mesh "mesh.*" Texture "texture.*" Radius Color [  ] BlendTexture true OrbitFrame { EquatorJ2000 { Center "Sol/Barycenter" } } 	EllipticalOrbit { 	Epoch Period SemiMajorAxis Eccentricity Inclination AscendingNode ArgOfPericenter MeanAnomaly } 	Albedo RotationPeriod }

List of parameters (for using barycenters)
Again, most parameters for moons are the same as the ones in asteroids. For the mesh, texture, radius, color, albedo, and rotation, they are the same, so refer to that page for more information. Listed below are the differences.

ReferencePoint
ReferencePoint "Barycenter" "Sol"

Putting "ReferencePoint" before the name of the object in a SSC file will turn said object into a point that other objects can orbit.

Clickable and Visible
Visible true Clickable true

These are boolean parameters, meaning they can be either be set to  or. If  is set to , then the ReferencePoint's label will be visible. is set to, then the ReferencePoint will be selectable, just like any other object.

Setting the correct orbital frame
"Name" "Sol"

In the above code, you'll notice that the object "Name" looks like it orbits "Sol", even though in reality it orbits "Barycenter" which orbits "Sol". So how do we get it to orbit the "Barycenter" object?

By setting the correct OrbitFrame. In the code below, we tell Celestia to put "Name" in orbit around the Barycenter.

OrbitFrame { EquatorJ2000 { Center "Sol/Barycenter" } }

Be very careful when picking the correct orbital frame. Here, it is set to "EquatorJ2000", which means that the orbital elements are in an equatorial frame. If you are pulling elements from a paper, check to see if the orbital frame is in the equatorial (EQJ2000) or ecliptic (ECJ2000) frame. If it says ecliptic, use this code instead:

OrbitFrame { EclipticJ2000 { Center "Sol/Barycenter" } }

If the orbital frame has a center that is "Something/Something", then the units of  will be days, not years, and the units of   will be kilometers, not astronomical units.