20,741
edits
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
== File Locations == | == File Locations == | ||
The files are in /src/Enviroment | The files are in /src/Enviroment | ||
The names are | The names are | ||
atmosphere.cxx | * atmosphere.cxx | ||
atmosphere.hxx | * atmosphere.hxx | ||
gravity.cxx | * gravity.cxx | ||
gravity.hxx | * gravity.hxx | ||
== Simulating gravity == | == Simulating gravity == | ||
After looking at the source code in the atmosphere and gravity files I decided to start by adjusting the gravity to that of titan because that planet is most likely able to be flown upon.<br> | After looking at the source code in the atmosphere and gravity files I decided to start by adjusting the gravity to that of titan because that planet is most likely able to be flown upon.<br> | ||
I changed lines 48-52 to <br> | I changed lines 48-52 to <br> | ||
< | <syntaxhighlight lang="cpp"> | ||
// Geodetic Reference System 1980 parameter | // Geodetic Reference System 1980 parameter | ||
#define A 6576.0 // equatorial radius of Titan | #define A 6576.0 // equatorial radius of Titan | ||
Line 35: | Line 35: | ||
#define AGA (A*1.352) // A times normal gravity at equator | #define AGA (A*1.352) // A times normal gravity at equator | ||
#define BGB (B*1.352) // B times normal gravity at pole | #define BGB (B*1.352) // B times normal gravity at pole | ||
</ | </syntaxhighlight> | ||
from < | from | ||
<syntaxhighlight lang="cpp"> | |||
// original code | |||
#define A 6378137.0 // equatorial radius of earth | #define A 6378137.0 // equatorial radius of earth | ||
#define B 6356752.3141 // semiminor axis | #define B 6356752.3141 // semiminor axis | ||
#define AGA (A*9.7803267715) // A times normal gravity at equator | #define AGA (A*9.7803267715) // A times normal gravity at equator | ||
#define BGB (B*9.8321863685) // B times normal gravity at pole | #define BGB (B*9.8321863685) // B times normal gravity at pole | ||
</ | </syntaxhighlight> | ||
Now to compile ....<br> | Now to compile ....<br> | ||
== Related Discussions == | == Related Discussions == | ||
* http://flightgear.org/forums/viewtopic.php?f=6&t=18980&hilit=planets | * http://flightgear.org/forums/viewtopic.php?f=6&t=18980&hilit=planets |