|
override void | SetThrottlePercent (float throttlePercent) |
| Set the engine throttle level (as a percent).
|
|
override void | SetEngine (bool on) |
| Set engine state to on.
|
|
override double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
| Determine the acceleration at the specified time. The accleration returned must be in the physical units used by the integrators. For GE units other than DIMENSIONLESS this will involve some use of GravityScalar conversion functions. See the MultiStageEngine implementation for an example.
|
|
override float | GetFuel () |
| Get the current fuel remaining.
|
|
override void | SetThrustAxis (Vector3 thrustAxis) |
| Set the thrust axis. May be over-ridden to update internals if they exist.
|
|
override float | GetThrottlePercent () |
|
abstract void | SetThrustAxis (Vector3 thrustAxis) |
| Set the thrust axis. May be over-ridden to update internals if they exist.
|
|
abstract double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
| Determine the acceleration at the specified time. The accleration returned must be in the physical units used by the integrators. For GE units other than DIMENSIONLESS this will involve some use of GravityScalar conversion functions. See the MultiStageEngine implementation for an example.
|
|
abstract void | SetEngine (bool state) |
| Set engine state to on.
|
|
bool | IsEngineOn () |
|
abstract void | SetThrottlePercent (float throttle) |
| Set the engine throttle level (as a percent).
|
|
abstract float | GetThrottlePercent () |
|
abstract float | GetFuel () |
| Get the current fuel remaining.
|
|
void | SetRotation (Quaternion rotation) |
|
double[] | acceleration (double time, GravityState gravityState, ref double massKg) |
| Determine the acceleration at the specified time for the provided gravity state.
|
|
|
double | massEmpty |
| Implementation for a chemical rocket engine. Inputs are in the SI units indicated.
|
|
double | massFuel |
| mass of fuel in kg
|
|
double | burnRate |
| burn rate in kg/sec
|
|
double | thrust |
| thrust of engine in N
|
|
bool | engineOn |
| state of engine (or the active stage of a multi-stage engine)
|
|
Vector3 | thrustAxis |
| direction of thrust. Must be unit length.
|
|
|
Vector3 | accelDirection |
| "live" thrust vector reflecting orientation of ship model
|
|
◆ acceleration()
override double[] OneStageEngine.acceleration |
( |
double |
time, |
|
|
GravityState |
gravityState, |
|
|
ref double |
massKg |
|
) |
| |
|
virtual |
Determine the acceleration at the specified time. The accleration returned must be in the physical units used by the integrators. For GE units other than DIMENSIONLESS this will involve some use of GravityScalar conversion functions. See the MultiStageEngine implementation for an example.
When used in trajectory mode, this function may be called more than once for a given time, and as thrust changes. It will also be called for future times to determine the future path of the rocket.
- Parameters
-
time | time for which the thrust should be determined. |
- Returns
- acceleration in [0..2], mass in [3]
Implements RocketEngine.
◆ GetFuel()
override float OneStageEngine.GetFuel |
( |
| ) |
|
|
virtual |
Get the current fuel remaining.
- Returns
- Amount of fuel in the current stage
Implements RocketEngine.
◆ GetThrottlePercent()
override float OneStageEngine.GetThrottlePercent |
( |
| ) |
|
|
virtual |
◆ SetEngine()
override void OneStageEngine.SetEngine |
( |
bool |
state | ) |
|
|
virtual |
◆ SetThrottlePercent()
override void OneStageEngine.SetThrottlePercent |
( |
float |
throttle | ) |
|
|
virtual |
Set the engine throttle level (as a percent).
- Parameters
-
Implements RocketEngine.
◆ SetThrustAxis()
override void OneStageEngine.SetThrustAxis |
( |
Vector3 |
thrustAxis | ) |
|
|
virtual |
Set the thrust axis. May be over-ridden to update internals if they exist.
- Parameters
-
Implements RocketEngine.
◆ massEmpty
double OneStageEngine.massEmpty |
Implementation for a chemical rocket engine. Inputs are in the SI units indicated.
mass of empty ship (no fuel) in kg
The documentation for this class was generated from the following file:
- C:/Users/musgr/Documents/Unity/gravityengine/Assets/GravityEngine/Scripts/ExternalAcceleration/OneStageEngine.cs