Placing objects at defined locations on planetary surfaces

See also:

Note: This uses an "empty" object model, which is unnecessary as of Celestia v1.3.0. See Defined Locations for v1.3 for how to use the new invisible object.

A couple of times recently, people have raised the problem of placing an object at or near the surface of a planet or satellite, and having it stay where it's put, as if it were resting on the surface, or hovering above it.

A synchronous orbit only works at the equator - otherwise the object ends up sliding around in a large figure-of-eight. So I've produced a workaround that allows you to do this.

  1. Create a dummy object that hovers at an appropriate distance from the centre of the parent body, displaced north or south along the rotation axis.
  2. Place your object in orbit around this dummy, with an orbital radius that puts it on the planetary surface, and a rotation period that's synchronous with the planet's rotation. If you do this right, you now have your object sitting at the right latitude.
  3. Adjust the MeanLongitude of your object's orbit so that it sits at the correct planetary longitude.
  4. Tweak your object's Orientation and RotationOffset so that it is correctly orientated relative to the surface of the planet.
  5. Admire.

As proof-of-concept, I've placed the 2001 Moonbus model (the only model I've got with landing legs) at the Apollo 17 landing site (the farthest from the Moon's equator). I've annotated the code so that you can see where all the numbers come from. (The hardest bit is adjusting the model orientation - the technique will vary from model to model, depending on how they are originally orientated on the X,Y,Z axes.)

Here's the code:

Here's another example, placing a spacecraft near the surface of Eros:

See also:

The content of this Web page was provided by Grant Hutchison.

This Web page is maintained by Selden Ball at Wilson Lab.
Please send any comments or corrections to