Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Properties | List of all members
DeltaVEngineInfo Class Reference

Stores Information for VesselDeltaV calculations for a ModuleEngines. More...

Public Member Functions

void CalculateISP (bool engineIngitedCheck=false)
 Calculate the Engine ISP and store in the isp variable in this class.

Parameters
engineIngitedCheckSet to true will check the engine is actually ignited. This should be set true for active in flight stage only.
More...
 
void CalculateThrustVector (bool engineIngitedCheck=false)
 Calculate the Engine Thrust Vector and store in the thrust vector variables in this class.

Parameters
engineIngitedCheckSet to true will check the engine is actually ignited. This should be set true for active in flight stage only.
More...
 
 DeltaVEngineInfo (VesselDeltaV inVesselDeltaV, ModuleEngines inEngine, MultiModeEngine inMultiModeEngine=null)
 Constructor More...
 
double GetFuelTimeAtActiveThrottle (int stage)
 Calculates and returns the Fuel time to burn based on the Engine Thrust Limiter and current user throttle input (For active in flight Vessels ONLY). If the throttle is set to Zero - will return the fuel time at Full Throttle. More...
 
double GetFuelTimeAtThrottle (int stage)
 Calculates and returns the Fuel time to burn based on the Engine Thrust Limiter. More...
 
double GetFuelTimeMaxThrottle (int stage)
 Calculates and returns the Fuel Time to burn at maximum throttle. More...
 
double GetISPActual ()
 Gets the Actual engine ISP for active in-flight vessel. More...
 
double GetISPASL ()
 Calculates ISP and returns the ISP ASL. More...
 
double GetISPVac ()
 Calculates ISP and returns the ISP in Vacuum. More...
 
double GetSituationISP (DeltaVSituationOptions situation)
 Get the Engine ISP for the passed in situation More...
 
float GetSituationThrust (DeltaVSituationOptions situation)
 Get the Engine Thrust for the passed in situation More...
 
Vector3 GetSituationThrustVector (DeltaVSituationOptions situation)
 Get the Engine Thrust Vector for the passed in situation More...
 
float GetThrustActual ()
 Returns the Thrust Actual (loaded in-flight vessel) More...
 
float GetThrustASL ()
 Returns the Thrust ASL More...
 
float GetThrustVac ()
 Returns the Thrust in Vacuum More...
 
Vector3 GetThrustVectorActual ()
 Returns the Thrust Vector Actual (loaded in-flight vessel) More...
 
Vector3 GetThrustVectorASL ()
 Returns the Thrust Vector ASL More...
 
Vector3 GetThrustVectorVac ()
 Returns the Thrust Vector in Vacuum More...
 
double PropellantDemand (int id, bool runningActive)
 Get the Propellant demand per second More...
 
float PropellantMassBurnt ()
 Returns the amount of Mass lost from projected Propellant burnt during dV calculations. More...
 
bool RequiresAir ()
 Does this Engine require IntakeAir? More...
 
bool ThrottleLimited ()
 Has the user set the throttle limit of the engine < 100%? More...
 

Public Attributes

double atmosphere
 The current Atmospheres reading to calculate ISP. Note: this is in Atmospheres. More...
 
bool deprived
 True if this Engine has been deprived of Resources during dV simulation. More...
 
ModuleEngines engine
 Reference to the ModuleEngines. If this is a MultiModeEngine will be the active ModuleEngines More...
 
double ispActual
 The Engine's actual isp in flight. More...
 
double ispASL
 The Engine's isp. More...
 
double ispVac
 The Engine's isp. More...
 
float maxTimeStep
 The Maximum timeStep available to consume remaining resources for this Engine. More...
 
MultiModeEngine multiModeEngine
 If this is a MultiModeEngine this will contain the reference to that module. More...
 
List< DeltaVPropellantInfopropellantInfo
 A list of PropellantInfo that the engine consumes. More...
 
bool requiresAir
 If this Engine Requires Air or not. More...
 
DictionaryValueList< int,
DeltaVEngineBurnTotals
stageBurnTotals
 A Dictionary of Total Burn times for this engine. Indexed by Stages. NB: Will only contain index entries for stages that this engine is active. More...
 
int startBurnStage
 The Stage this Engine becomes active. More...
 
bool throttleLimited
 Has the player limited the engines throttle? (below 100%) More...
 
float thrustActual
 This is the Actual - Active(inflight) Thrust being generated by the engine. More...
 
float thrustASL
 This is the Thrust being generated by the engine ASL. More...
 
float thrustVac
 This is the Thrust being generated by the engine in Vacuum. More...
 
Vector3 thrustVectorActual
 This is the Actual - Active(inflight) Thrust Vector for the Engine. More...
 
Vector3 thrustVectorASL
 This is the Thrust Vector for the Engine ASL. More...
 
Vector3 thrustVectorVac
 This is the Thrust Vector for the Engine in Vacuum. More...
 
VesselDeltaV vesselDeltaV
 Reference to the VesselDeltaV class that this data is related to. More...
 

Properties

DeltaVPartInfo partInfo [get]
 Reference to the DeltaVPartInfo entry for this engine. More...
 

Detailed Description

Stores Information for VesselDeltaV calculations for a ModuleEngines.

Constructor & Destructor Documentation

DeltaVEngineInfo.DeltaVEngineInfo ( VesselDeltaV  inVesselDeltaV,
ModuleEngines  inEngine,
MultiModeEngine  inMultiModeEngine = null 
)
inline

Constructor

Parameters
inVesselDeltaVThe VesselDeltaV entry for this engine
inEngineThe ModuleEngines instance Reference
inMultiModeEngineThe MultiModEngine PartModule if this is a MultiModeEngine. Default: Null

Member Function Documentation

void DeltaVEngineInfo.CalculateISP ( bool  engineIngitedCheck = false)
inline

Calculate the Engine ISP and store in the isp variable in this class.

Parameters
engineIngitedCheckSet to true will check the engine is actually ignited. This should be set true for active in flight stage only.

void DeltaVEngineInfo.CalculateThrustVector ( bool  engineIngitedCheck = false)
inline

Calculate the Engine Thrust Vector and store in the thrust vector variables in this class.

Parameters
engineIngitedCheckSet to true will check the engine is actually ignited. This should be set true for active in flight stage only.

double DeltaVEngineInfo.GetFuelTimeAtActiveThrottle ( int  stage)
inline

Calculates and returns the Fuel time to burn based on the Engine Thrust Limiter and current user throttle input (For active in flight Vessels ONLY). If the throttle is set to Zero - will return the fuel time at Full Throttle.

Parameters
stageThe stage we want the value for.
Returns
double DeltaVEngineInfo.GetFuelTimeAtThrottle ( int  stage)
inline

Calculates and returns the Fuel time to burn based on the Engine Thrust Limiter.

Parameters
stageThe stage we want the value for.
Returns
double DeltaVEngineInfo.GetFuelTimeMaxThrottle ( int  stage)
inline

Calculates and returns the Fuel Time to burn at maximum throttle.

Parameters
stageThe stage we want the value for.
Returns
double DeltaVEngineInfo.GetISPActual ( )
inline

Gets the Actual engine ISP for active in-flight vessel.

Returns
double DeltaVEngineInfo.GetISPASL ( )
inline

Calculates ISP and returns the ISP ASL.

Returns
double DeltaVEngineInfo.GetISPVac ( )
inline

Calculates ISP and returns the ISP in Vacuum.

Returns
double DeltaVEngineInfo.GetSituationISP ( DeltaVSituationOptions  situation)
inline

Get the Engine ISP for the passed in situation

Parameters
situationsituation of the calc
Returns
ISP in s
float DeltaVEngineInfo.GetSituationThrust ( DeltaVSituationOptions  situation)
inline

Get the Engine Thrust for the passed in situation

Parameters
situationsituation of the calc
Returns
Thrust value
Vector3 DeltaVEngineInfo.GetSituationThrustVector ( DeltaVSituationOptions  situation)
inline

Get the Engine Thrust Vector for the passed in situation

Parameters
situationsituation of the calc
Returns
Thrust Vector value
float DeltaVEngineInfo.GetThrustActual ( )
inline

Returns the Thrust Actual (loaded in-flight vessel)

Returns
float DeltaVEngineInfo.GetThrustASL ( )
inline

Returns the Thrust ASL

Returns
float DeltaVEngineInfo.GetThrustVac ( )
inline

Returns the Thrust in Vacuum

Returns
Vector3 DeltaVEngineInfo.GetThrustVectorActual ( )
inline

Returns the Thrust Vector Actual (loaded in-flight vessel)

Returns
Vector3 DeltaVEngineInfo.GetThrustVectorASL ( )
inline

Returns the Thrust Vector ASL

Returns
Vector3 DeltaVEngineInfo.GetThrustVectorVac ( )
inline

Returns the Thrust Vector in Vacuum

Returns
double DeltaVEngineInfo.PropellantDemand ( int  id,
bool  runningActive 
)
inline

Get the Propellant demand per second

Parameters
idhash of propellant name
runningActiveTrue to get demand if engine is active and current throttle; False will return the set throttle demand per second (max)
Returns
float DeltaVEngineInfo.PropellantMassBurnt ( )
inline

Returns the amount of Mass lost from projected Propellant burnt during dV calculations.

Returns
bool DeltaVEngineInfo.RequiresAir ( )
inline

Does this Engine require IntakeAir?

Returns
bool DeltaVEngineInfo.ThrottleLimited ( )
inline

Has the user set the throttle limit of the engine < 100%?

Returns

Member Data Documentation

double DeltaVEngineInfo.atmosphere

The current Atmospheres reading to calculate ISP. Note: this is in Atmospheres.

bool DeltaVEngineInfo.deprived

True if this Engine has been deprived of Resources during dV simulation.

ModuleEngines DeltaVEngineInfo.engine

Reference to the ModuleEngines. If this is a MultiModeEngine will be the active ModuleEngines

double DeltaVEngineInfo.ispActual

The Engine's actual isp in flight.

double DeltaVEngineInfo.ispASL

The Engine's isp.

double DeltaVEngineInfo.ispVac

The Engine's isp.

float DeltaVEngineInfo.maxTimeStep

The Maximum timeStep available to consume remaining resources for this Engine.

MultiModeEngine DeltaVEngineInfo.multiModeEngine

If this is a MultiModeEngine this will contain the reference to that module.

List<DeltaVPropellantInfo> DeltaVEngineInfo.propellantInfo

A list of PropellantInfo that the engine consumes.

bool DeltaVEngineInfo.requiresAir

If this Engine Requires Air or not.

DictionaryValueList<int, DeltaVEngineBurnTotals> DeltaVEngineInfo.stageBurnTotals

A Dictionary of Total Burn times for this engine. Indexed by Stages. NB: Will only contain index entries for stages that this engine is active.

int DeltaVEngineInfo.startBurnStage

The Stage this Engine becomes active.

bool DeltaVEngineInfo.throttleLimited

Has the player limited the engines throttle? (below 100%)

float DeltaVEngineInfo.thrustActual

This is the Actual - Active(inflight) Thrust being generated by the engine.

float DeltaVEngineInfo.thrustASL

This is the Thrust being generated by the engine ASL.

float DeltaVEngineInfo.thrustVac

This is the Thrust being generated by the engine in Vacuum.

Vector3 DeltaVEngineInfo.thrustVectorActual

This is the Actual - Active(inflight) Thrust Vector for the Engine.

Vector3 DeltaVEngineInfo.thrustVectorASL

This is the Thrust Vector for the Engine ASL.

Vector3 DeltaVEngineInfo.thrustVectorVac

This is the Thrust Vector for the Engine in Vacuum.

VesselDeltaV DeltaVEngineInfo.vesselDeltaV

Reference to the VesselDeltaV class that this data is related to.

Property Documentation

DeltaVPartInfo DeltaVEngineInfo.partInfo
get

Reference to the DeltaVPartInfo entry for this engine.


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