Gravity Engine 12.0
Unity Asset for Gravity
|
Combine the acceleration from EarthAtmosphere and MultistageRocket. More...
Public Member Functions | |
double | GetAccel () |
double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
Determine the acceleration at the specified time for the provided gravity state. | |
double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
Determine the acceleration at the specified time for the provided gravity state. | |
Combine the acceleration from EarthAtmosphere and MultistageRocket.
This implementation allows the work of keeping a list of objects out of the integrator.
Further optimization could be done by cut & pasting the atmosphere and rocket code together to save on function calls. But, ick.
double[] EarthRocket.acceleration | ( | double | time, |
GravityState | gravityState, | ||
ref double | massKg | ||
) |
Determine the acceleration at the specified time for the provided gravity state.
Mass at time t may also be returned in in a[3] by rocket engine implementations. This allows the per time slice mass to be passed back without additional overhead in time critical code.
This routine may also be called by trajectory prediction states, so implementations should not keep state.
time | |
gravityState | |
massKg (ref) |
Implements GEExternalAcceleration.