Page 1 of 1

Body masses

Posted: 17.04.2002, 07:32
by Guest
I've been working on adding gravity effects to the observer in celestia.

Each body has a mass variable but i cant find it being set anywhere.

the method body->setMass(float) is not used in the source (so far as i can find in ver 1.2.0)

Is the mass data available in the data files?
if not, how can i add mass information to the data files? im assuming they are the *.SSC files.

I understand that the mass for stars may not be available. I pland to approximate it using a stars class.

Marc posted this

Posted: 17.04.2002, 07:34
by marc
Whoops forgot to logon.
Anonymous was me Marc.

minor success.

Posted: 17.04.2002, 08:47
by marc
i added this to solarsys.cpp line 244

double mass = 1;
if(planetData->getNumber("Mass", mass))
body->setMass(mass);

and have also been adding mass entries to the *.ssc files.
Didnt realise they were a text file.
Next step modify simulation.

does anyone know of a nice table which will relate masses to the star type?

minor success.

Posted: 17.04.2002, 18:16
by chris
marc wrote:i added this to solarsys.cpp line 244

double mass = 1;
if(planetData->getNumber("Mass", mass))
body->setMass(mass);

and have also been adding mass entries to the *.ssc files.
Didnt realise they were a text file.
Next step modify simulation.

does anyone know of a nice table which will relate masses to the star type?

I'll write a Star::getMass method later today when I have access to my astro library.

--Chris