Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
EarthRocket Class Reference

Combine the acceleration from EarthAtmosphere and MultistageRocket. More...

Inheritance diagram for EarthRocket:
GEExternalAcceleration

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.
 

Detailed Description

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.

Member Function Documentation

◆ acceleration()

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.

Parameters
time
gravityState
massKg (ref)
Returns

Implements GEExternalAcceleration.


The documentation for this class was generated from the following file: