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.
Body masses
Marc posted this
Whoops forgot to logon.
Anonymous was me Marc.
Anonymous was me Marc.
minor success.
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?
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?
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years
- Location: Seattle, Washington, USA
minor success.
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