I just want to add stars

Post requests, images, descriptions and reports about work in progress here.
Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Re: I just want to add stars

Post #41by selden » 06.09.2011, 20:38

Sadachbia wrote:Does calculating the orbital period/distance of fictional planets (whether they orbit a star with mass the same as the Sun's or different) always ignore the planet's mass because it's too small compared to its primary to make a noticeable difference?
That depends on how accurate you're trying to be. I'd suggest a lower mass limit when an object's mass is likely to cause the system's barycenter to be above the surface of the star. Jupiter has a mass of about 1/1000 the mass of the Sun. It's probably at the lower limit where you might want to include its mass when calculating EllipticalOrbits.

Would it make sense in a system with widely-separated components, like UPS Andromedae, to have planets orbiting one star or the other instead of the barycentre? (Orbiting one star would mean I would use just that star's mass in the SMA/period calculation, as opposed to the mass of both stars. Right?)
EllipticalOrbit definitions assume that the mass that's being orbited around (the stars, in this case) are close enough together that they can be treated gravitationally as if they were a single object. In other words, a planet would orbit their barycenter when the planet's orbit is far outside the orbits of both stars. If it orbits one of the stars, it would have to be very close to it, so that the other star's gravity doesn't have a noticable effect on the planet's orbit. A planet could not physically orbit their barycenter in an orbit smaller than that of either of the stars. However, Celestia won't stop you from specifying that situation, and will happily draw it.

Celestia does not calculate gravitational effects. It only draws objects where you tell it to draw them. If you need to include the gravitational effects of multiple bodies interacting with one another, then you either have provide a precalculated xyzv trajectory file which takes into account the gravitational (and other) effects, or you have to provide a mathematical function which calculates them. A function can be provided to Celestia in the form of a ScriptedOrbit. (See http://en.wikibooks.org/wiki/Celestia/T ... iptedOrbit )
Selden


Return to “Add-on development”