Page 1 of 1

help with orienting my spacecraft

Posted: 29.07.2010, 20:30
by Polchey
I have downloaded and placed some Pioneer spacecraft in Celestia. I noticed the spacecraft are not oriented correctly. Aren't the real spacecraft oriented with the dish facing the Sun? I think so. The models in Celestia aren't facing the Sun but at some arbitrary angle. Also in real life the spacecraft spin, the models in Celestia do not. I would like to add in the ssc file the appropriate lines and values for orienting the spacecraft toward the sun and to also add in lines to make it spin. Does anyone know how I can do this?

Re: help with orienting my spacecraft

Posted: 30.07.2010, 20:21
by W0RLDBUILDER
The real spacecraft are oriented with the dish facing towards Earth, not Sol. If your probes are anywhere in the solar system where Earth can be seen unobstructed by solar glare, that's probably why they're facing away from the Sun.

Re: help with orienting my spacecraft

Posted: 30.07.2010, 22:18
by John Van Vliet
--- edit ---

Re: help with orienting my spacecraft

Posted: 31.07.2010, 06:43
by selden
To keep an axis of a model pointed toward another object, you'd need to use a .q orientation file, not .xyz or .xyzv position file, if you wanted to use a fixed table to orient a model for a limited time.

However, pointing also can be done dynamically, either with a Scripted orientation or with Celestia's "two vector" body frames. They aren't limited to a particular interval of time the way the files are.

TwoVector Body frames are documented in the Celestia WikiBook at http://en.wikibooks.org/wiki/Celestia/Reference_Frames
Unfortunately, it's rather cryptic since it defines most of the elements of Frames individually and not in context in an SSC.

However, its two-vector example for pointing toward the Sun can be converted to one which points toward the Earth by replacing "Sol" by "Sol/Earth".

Re: help with orienting my spacecraft

Posted: 31.07.2010, 07:21
by selden
I was surprised and amused to discover that the example TwoVector BodyFrame happens to orient Voyager 1 so its antenna points in the correct direction.

If you're using the "Voyager 1 & 2" Addon by Jack Higgens which is available on the MotherLode, add this code to the end of voyager.ssc

Code: Select all

Modify "Voyager 1" "Sol"
{
BodyFrame {
    TwoVector {
        Center "Sol/Voyager 1"
        Primary {
            Axis "z"
            RelativePosition { Target "Sol/Earth" }
        }
        Secondary {
            Axis "x"
            RelativeVelocity { Target "Sol/Earth" }
        }
    }
  }
}

It'll orient V'ger 1 correctly.
The code to orient V'ger 2 is left as an exercise for the student ;)