Gravity Engine 12.0
Unity Asset for Gravity
|
Computes the acceleration due to drag in the Earth's atmosphere for a given height and velocity. More...
Public Member Functions | |
void | InitFrom (EarthAtmosphere atm, NBody nbody) |
double | GetAccelSI () |
Get the last "in flight" value for atmosphere deceleration. | |
double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
Determine the acceleration due to atmospheric resistance. | |
double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
Determine the acceleration at the specified time for the provided gravity state. | |
Public Attributes | |
double | heightEarthSurface = 6371 |
double | inertialMassKg = 100 |
double | crossSectionalArea |
double | coeefDrag = 2.1 |
Computes the acceleration due to drag in the Earth's atmosphere for a given height and velocity.
This component is attached to the spaceship and called via the GEExternalAcceleration interface from within the physics integrator as a callback. It will potentially get called a LOT so efforts are made to make the acceleration computation effecient where possible.
double[] EarthAtmosphere.acceleration | ( | double | time, |
GravityState | gravityState, | ||
ref double | massKg | ||
) |
Determine the acceleration due to atmospheric resistance.
time | (not used) |
gravityState | |
massKg | Updated mass (0 to use the inertial mass from inspector) |
Implements GEExternalAcceleration.
double EarthAtmosphere.GetAccelSI | ( | ) |
Get the last "in flight" value for atmosphere deceleration.