Putting a planet in between Venus and Earth

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Jamstraz
Posts: 12
Joined: 17.03.2005
With us: 19 years 8 months
Location: Erie PA

Putting a planet in between Venus and Earth

Post #1by Jamstraz » 20.03.2005, 02:45

I just can't seem to get the orbit in right. It either is in the path of Earth or Venus or is way out by Pluto. Any ideas? I thought Period defined how far a planet was from the sun, but maybe I'm wrong?
It's bad luck to be superstitious

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #2by Brendan » 20.03.2005, 04:56

The Period is how long it takes to orbit the sun in Earth years. The SemiMajorAxis is how far it is on average from the sun in astronomical units, the average distance from the sun to Earth.
They are related by Kepler's third law, P^2 = a^3 for units normalized to Earth years and AU. For usual units, it is P^2 = ( 4*(pi^2)/( G*(m1+m2) ) ) * a^3. P is the period and a is the semimajor axis, m1 and m2 are the mass of the orbiting body and the body it is orbiting and G is the gravitional constant.

Topic author
Jamstraz
Posts: 12
Joined: 17.03.2005
With us: 19 years 8 months
Location: Erie PA

Post #3by Jamstraz » 20.03.2005, 20:01

so I should be editing the semimajoraxis then?
It's bad luck to be superstitious

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #4by selden » 20.03.2005, 20:25

Set the SemiMajorAxis to put the orbit where you want it

and set Period to be sma **1.5
(i.e. Period = sqrt(sma^3) )

so that it takes the right amount of time to go around the Sun.
Selden


Return to “Development”