What is the "Mass" parameter in the SSC file used

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
mutant_gn0me
Posts: 4
Joined: 02.10.2003
With us: 20 years 11 months
Location: Seattle

What is the "Mass" parameter in the SSC file used

Post #1by mutant_gn0me » 17.08.2005, 05:51

I've been digging around trying to figure out what the Mass parameter is used for, but so far haven't found anything other than a passing reference in some old CVS logs and a brief discussion in the forums from last October. Also, what units is Mass stated in? I'm also at a loss at understanding what Celestia does with it, since Period and SemiMajorAxis are defined as well, and from my limited understanding you can derive orbital distance from those two values alone (this is my first week studying Kepler's laws, so please bear with me :) ).

Thanks!

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

Post #2by Brendan » 17.08.2005, 08:07

Celestia can read mass, but doesn't do anything with it. I made a version of Celestia that uses it to display the mass and to find the density. Now Celestia requires both the period and semimajor axis. Maybe I'll change it to compute one from the other if the mass is given. I think it is in kilograms.

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 1 month

Post #3by ajtribick » 17.08.2005, 11:55

The mass is given in Earth masses, not kilograms.

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

Post #4by Brendan » 18.08.2005, 07:19

chaos syndrome wrote:The mass is given in Earth masses, not kilograms.


The masses loaded in solarsys.cpp and used by getMass() and setMass() in body.cpp are just floating point numbers with no units assumed by the code. The place where units are assumed is with the overlay display code in celestiacore.cpp.

That code doesn't exist for masses in Celestia, so masses are not displayed in the overlay. When I added the code to display the mass, based on the work somebody else here did, to BCelestia, it specified kilograms. So if the numbers in the ssc file were in kilograms, the display would be right.

The file astro.cpp has solar, earth and lunar masses as constant doubles in kilograms that could be used to convert between these units of mass.

Topic author
mutant_gn0me
Posts: 4
Joined: 02.10.2003
With us: 20 years 11 months
Location: Seattle

Post #5by mutant_gn0me » 18.08.2005, 20:52

Ah, cool. Thanks for clearing that up. So, while poking around at this, I discovered that the Mass parameter is always defined in StarGen SSC ouput. Looks like the sample SSC files I was looking at were initially generated by StarGen.

Not sure if this will benefit anyone, but I found a handy Kepler Calculator at:

http://cmi.yale.edu/cgi-bin/bh_calc.cgi

Dreaming up Period and Mass is pretty straight-forward, but I was finding that defining a reasonable semi-major axis was difficult. The calculator takes care of all of that, of course. It trumps my attempts to work out Kepler's third law by hand, since I kept screwing up the units.... :wink:

Thanks again for the info!

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 1 month

Post #6by ajtribick » 18.08.2005, 21:01

Brendan wrote:
chaos syndrome wrote:The mass is given in Earth masses, not kilograms.

The masses loaded in solarsys.cpp and used by getMass() and setMass() in body.cpp are just floating point numbers with no units assumed by the code. The place where units are assumed is with the overlay display code in celestiacore.cpp.

That code doesn't exist for masses in Celestia, so masses are not displayed in the overlay. When I added the code to display the mass, based on the work somebody else here did, to BCelestia, it specified kilograms. So if the numbers in the ssc file were in kilograms, the display would be right.

The file astro.cpp has solar, earth and lunar masses as constant doubles in kilograms that could be used to convert between these units of mass.


The extrasolar.ssc file distributed with Celestia has a Mass parameter associated with each exoplanet, and the number used there is Earth masses, so while the actual units specified is irrelevant to Celestia (at the moment), for purposes of processing the extrasolar.ssc file (as I did when creating the extrasolar planet textures add-on) you need to use Earth masses.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #7by t00fri » 18.08.2005, 21:09

mutant_gn0me wrote:Not sure if this will benefit anyone, but I found a handy Kepler Calculator at:

http://cmi.yale.edu/cgi-bin/bh_calc.cgi



Just in case you are not yet aware of it: Celestia uses a tremendeously more sophisticated method for planetary orbit calculation than Keplerian orbits.

Since individual orbits of planets are of course disturbed by the gravitational perturbations from all the other planets, a quantitatively correct orbit calculation must take these subtle effects into account.

The theory that we use runs under the name VSOP87 being developed since a long time by Jean Meeus and collaborators (P. Bretagnon, G. Francou,...) in Belgium. For each orbit we have to take into account many hundreds of perturbative Chebyshev polynomial terms, accounting for those mentioned gravitational effects.

Bye Fridger

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

Post #8by Brendan » 19.08.2005, 03:14

chaos syndrome wrote:
The extrasolar.ssc file distributed with Celestia has a Mass parameter associated with each exoplanet, and the number used there is Earth masses, so while the actual units specified is irrelevant to Celestia (at the moment), for purposes of processing the extrasolar.ssc file (as I did when creating the extrasolar planet textures add-on) you need to use Earth masses.


Oh ok, I didn't know that about extrasolar.ssc. The earth mass constant in astro.cpp could be used to convert that to kilograms. Maybe someday something could be done about specifying units, maybe by adding script commands and declaring the units in ssc files.


Return to “Development”