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

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

Public Member Functions

void CalculateISP (List< DeltaVEngineInfo > engines=null)
 Calculate ISP for the Separation Stage. More...
 
void CalculateTWR (float mass=-1f)
 Calculates and stores the TWR in Vacuum in the TWR variables. More...
 
bool ContainsAnchoredDecoupler ()
 Do the parts in this stage contain an AnchoredDecoupler? More...
 
bool ContainsDecoupler ()
 Do the parts in this stage contain a Decoupler? More...
 
Ray CoTForStage (bool activeOnly=false)
 Calculates and returns a Ray indicating position and direction for the Center of Thrust for a given stage. More...
 
 DeltaVStageInfo (ShipConstruct ship, int inStage, VesselDeltaV vesselDeltaV)
 Constructor. More...
 
 DeltaVStageInfo (Vessel vessel, int inStage, VesselDeltaV vesselDeltaV)
 Constructor. More...
 
float GetCurrentStageMass ()
 Get the current Mass of the stage; Which is the stage start mass less any propellant that has been burnt (uses Simulated Resources). More...
 
float GetSituationDeltaV (DeltaVSituationOptions situation)
 Get the Stage DeltaV for the passed in situation More...
 
double GetSituationISP (DeltaVSituationOptions situation)
 Get the Stage ISP for the passed in situation More...
 
float GetSituationThrust (DeltaVSituationOptions situation)
 Get the Stage Thrust for the passed in situation More...
 
float GetSituationTotalExhaustVelocity (DeltaVSituationOptions situation)
 Get the Total Exhaust Velocity for the passed in situation More...
 
float GetSituationTWR (DeltaVSituationOptions situation)
 Get the Stage TWR for the passed in situation More...
 
Vector3 GetSituationVectoredExhaustVelocity (DeltaVSituationOptions situation)
 Get the Stage Vectored Exhaust Velocity for the passed in situation More...
 
float GetSituationVectoredThrust (DeltaVSituationOptions situation)
 Get the Stage Vector Thrust for the passed in situation More...
 
float GetStageMass (out float dryMass, out float fuelMass, out float decoupledDryMass, out float decoupledFuelMass, out float jettisonedDryMass, out int decoupledPartCount)
 Calculates the total Mass for the Stages parts. More...
 
int PartsActivateInStage (out List< DeltaVPartInfo > activeParts)
 
int PartsActiveInStage ()
 How many parts are active in this stage (not decoupled). More...
 
int PartsDecoupledInStage ()
 How many parts are decoupled in this stage. More...
 
void Reset (int inStage, VesselDeltaV vesselDeltaV)
 Reset all values and Reprocesses the Parts List for this Stage. More...
 

Public Attributes

List< ModuleResourceIntakeairIntakeParts
 A list of part modules in the stage that produce IntakeAir More...
 
float decoupledMass = 0
 This is the mass that will be decoupled and jetissoned in this stage. More...
 
float deltaVActual
 The Actual DeltaV that this separation stage for active in-flight vessel. More...
 
float deltaVatASL
 The DeltaV that this separation stage has at ASL. More...
 
List< DeltaVCalcdeltaVCalcs
 List of DeltaVCalcs for the stage. More...
 
float deltaVinVac
 The DeltaV that this separation stage has in Vacuum. More...
 
float dryMass = 0
 The dry mass of the stage. More...
 
float endMass = 0
 The ending Mass of the Stage after any engine burns. More...
 
List< DeltaVEngineInfoenginesActiveInStage
 The engines active in this stage. More...
 
List< DeltaVEngineInfoenginesInStage
 The engines in this stage. (may not be active). More...
 
float fuelMass = 0
 The fuel mass of the stage. More...
 
double ispActual
 The total actual isp for the engines in this separation stage for active in-flight vessel. More...
 
double ispASL
 The total isp for the engines in this separation stage ASL. More...
 
double ispVac
 The total isp for the engines in this separation stage in Vacuum. More...
 
List< DeltaVPartInfoparts
 The parts in this stage. More...
 
bool payloadStage
 Will be True if this stage is treated as payload by DV calcs. More...
 
int separationIndex = 0
 The stage separation Index for this stage. More...
 
int stage = 0
 The stage number. More...
 
double stageBurnTime
 The Engine Burn Time in secs for the stage. More...
 
float stageMass = 0
 The total mass of the stage. More...
 
float startMass = 0
 The starting Mass of the Stage before any engine burns. More...
 
float thrustActual
 The Actual Thrust provided by this separation stage for active in-flight vessel. More...
 
float thrustASL
 The Thrust provided by this separation stage at ASL. More...
 
float thrustVac
 The Thrust provided by this separation stage in Vacuum. More...
 
float totalExhaustVelocityActual
 The Actual Total Exhaust Velocity of the Stage for active in-flight vessel More...
 
float totalExhaustVelocityASL
 The Total Exhaust Velocity of the Stage At Sea Level More...
 
float totalExhaustVelocityVAC
 The Total Exhaust Velocity of the Stage in Vacuum More...
 
float TWRActual
 The Thrust to Weight Ratio Actual Vessel in-flight for this separation stage. More...
 
float TWRASL
 The Thrust to Weight Ratio At Sea Level for this separation stage. More...
 
float TWRVac
 The Thrust to Weight Ratio in Vacuum for this separation stage. More...
 
Vector3 vectoredExhaustVelocityActual
 The Actual Vectored Exhaust Velocity of the Stage for active in-flight Vessel (summed Vectors - including cosine losses) More...
 
Vector3 vectoredExhaustVelocityASL
 The Vectored Exhaust Velocity of the Stage At Sea Level (summed Vectors - including cosine losses) More...
 
Vector3 vectoredExhaustVelocityVAC
 The Vectored Exhaust Velocity of the Stage in Vacuum (summed Vectors - including cosine losses) More...
 
float vectoredThrustActual
 This is the Vectored Actual - Active(inflight) Thrust being generated by the engine. More...
 
float vectoredThrustASL
 This is the Vectored Thrust being generated by the engine ASL. More...
 
float vectoredThrustVac
 This is the Vectored Thrust being generated by the engine in Vacuum. More...
 
VesselDeltaV vesselDeltaV
 Reference to the VesselDeltaV instance. More...
 

Detailed Description

Stores Information for VesselDeltaV calculations for a Stage.

Constructor & Destructor Documentation

DeltaVStageInfo.DeltaVStageInfo ( ShipConstruct  ship,
int  inStage,
VesselDeltaV  vesselDeltaV 
)
inline

Constructor.

Parameters
shipThe ShipConstruct reference.
instageThe Stage Index.
vesselDeltaVThe VesselDeltaV reference.
DeltaVStageInfo.DeltaVStageInfo ( Vessel  vessel,
int  inStage,
VesselDeltaV  vesselDeltaV 
)
inline

Constructor.

Parameters
vesselThe Vessel reference.
instageThe Stage Index.
vesselDeltaVThe VesselDeltaV reference.

Member Function Documentation

void DeltaVStageInfo.CalculateISP ( List< DeltaVEngineInfo engines = null)
inline

Calculate ISP for the Separation Stage.

Parameters
enginesCan optionally pass in a list of EngineInfo to calculate the ISP for. If null (default) will calculate the OSP for all enginesActiveInStage
Returns
The ISP
void DeltaVStageInfo.CalculateTWR ( float  mass = -1f)
inline

Calculates and stores the TWR in Vacuum in the TWR variables.

Parameters
massoptions. If supplied will use this value to calculate TWRActual. Otherwise will use the startMass for TWRActual. TWRVac and TWRASL always uses the startMass
Returns
bool DeltaVStageInfo.ContainsAnchoredDecoupler ( )
inline

Do the parts in this stage contain an AnchoredDecoupler?

Returns
bool DeltaVStageInfo.ContainsDecoupler ( )
inline

Do the parts in this stage contain a Decoupler?

Returns
Ray DeltaVStageInfo.CoTForStage ( bool  activeOnly = false)
inline

Calculates and returns a Ray indicating position and direction for the Center of Thrust for a given stage.

Parameters
activeOnlySet to true to only return active engines in the stage. Default: False (return all engines in the stage regardless of their state)
Returns
float DeltaVStageInfo.GetCurrentStageMass ( )
inline

Get the current Mass of the stage; Which is the stage start mass less any propellant that has been burnt (uses Simulated Resources).

Returns
float DeltaVStageInfo.GetSituationDeltaV ( DeltaVSituationOptions  situation)
inline

Get the Stage DeltaV for the passed in situation

Parameters
situationsituation of the calc
Returns
DeltaV in m/s
double DeltaVStageInfo.GetSituationISP ( DeltaVSituationOptions  situation)
inline

Get the Stage ISP for the passed in situation

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

Get the Stage Thrust for the passed in situation

Parameters
situationsituation of the calc
Returns
Thrust value
float DeltaVStageInfo.GetSituationTotalExhaustVelocity ( DeltaVSituationOptions  situation)
inline

Get the Total Exhaust Velocity for the passed in situation

Parameters
situationsituation of the calc
Returns
Total Exhaust Velocity in m/s
float DeltaVStageInfo.GetSituationTWR ( DeltaVSituationOptions  situation)
inline

Get the Stage TWR for the passed in situation

Parameters
situationsituation of the calc
Returns
TWR
Vector3 DeltaVStageInfo.GetSituationVectoredExhaustVelocity ( DeltaVSituationOptions  situation)
inline

Get the Stage Vectored Exhaust Velocity for the passed in situation

Parameters
situationsituation of the calc
Returns
Vectored Exhaust Velocity in m/s
float DeltaVStageInfo.GetSituationVectoredThrust ( DeltaVSituationOptions  situation)
inline

Get the Stage Vector Thrust for the passed in situation

Parameters
situationsituation of the calc
Returns
Vector Thrust value
float DeltaVStageInfo.GetStageMass ( out float  dryMass,
out float  fuelMass,
out float  decoupledDryMass,
out float  decoupledFuelMass,
out float  jettisonedDryMass,
out int  decoupledPartCount 
)
inline

Calculates the total Mass for the Stages parts.

Parameters
dryMassThe dry mass of the Stage
fuelMassThe fuel mass of the Stage
decoupledDryMassWill be set to the dry mass of all parts decoupled in this stage.
decoupledFuelMassWill be set to the fuel mass of all parts decoupled in this stage.
jettisonedDryMassWill be set to the dry mass of all parts that jettison in this stage.
decoupledPartCountWill be set to the number of parts that are decoupled in this stage.
Returns
The total mass for the stage. dry mass and fuel mass.

< part.mass describes its dry mass, so just add all mass for any resources it contains

int DeltaVStageInfo.PartsActivateInStage ( out List< DeltaVPartInfo activeParts)
inline
int DeltaVStageInfo.PartsActiveInStage ( )
inline

How many parts are active in this stage (not decoupled).

Returns
int DeltaVStageInfo.PartsDecoupledInStage ( )
inline

How many parts are decoupled in this stage.

Returns
void DeltaVStageInfo.Reset ( int  inStage,
VesselDeltaV  vesselDeltaV 
)
inline

Reset all values and Reprocesses the Parts List for this Stage.

Parameters
inStage
vesselDeltaV

Member Data Documentation

List<ModuleResourceIntake> DeltaVStageInfo.airIntakeParts

A list of part modules in the stage that produce IntakeAir

float DeltaVStageInfo.decoupledMass = 0

This is the mass that will be decoupled and jetissoned in this stage.

float DeltaVStageInfo.deltaVActual

The Actual DeltaV that this separation stage for active in-flight vessel.

float DeltaVStageInfo.deltaVatASL

The DeltaV that this separation stage has at ASL.

List<DeltaVCalc> DeltaVStageInfo.deltaVCalcs

List of DeltaVCalcs for the stage.

float DeltaVStageInfo.deltaVinVac

The DeltaV that this separation stage has in Vacuum.

float DeltaVStageInfo.dryMass = 0

The dry mass of the stage.

float DeltaVStageInfo.endMass = 0

The ending Mass of the Stage after any engine burns.

List<DeltaVEngineInfo> DeltaVStageInfo.enginesActiveInStage

The engines active in this stage.

List<DeltaVEngineInfo> DeltaVStageInfo.enginesInStage

The engines in this stage. (may not be active).

float DeltaVStageInfo.fuelMass = 0

The fuel mass of the stage.

double DeltaVStageInfo.ispActual

The total actual isp for the engines in this separation stage for active in-flight vessel.

double DeltaVStageInfo.ispASL

The total isp for the engines in this separation stage ASL.

double DeltaVStageInfo.ispVac

The total isp for the engines in this separation stage in Vacuum.

List<DeltaVPartInfo> DeltaVStageInfo.parts

The parts in this stage.

bool DeltaVStageInfo.payloadStage

Will be True if this stage is treated as payload by DV calcs.

int DeltaVStageInfo.separationIndex = 0

The stage separation Index for this stage.

int DeltaVStageInfo.stage = 0

The stage number.

double DeltaVStageInfo.stageBurnTime

The Engine Burn Time in secs for the stage.

float DeltaVStageInfo.stageMass = 0

The total mass of the stage.

float DeltaVStageInfo.startMass = 0

The starting Mass of the Stage before any engine burns.

float DeltaVStageInfo.thrustActual

The Actual Thrust provided by this separation stage for active in-flight vessel.

float DeltaVStageInfo.thrustASL

The Thrust provided by this separation stage at ASL.

float DeltaVStageInfo.thrustVac

The Thrust provided by this separation stage in Vacuum.

float DeltaVStageInfo.totalExhaustVelocityActual

The Actual Total Exhaust Velocity of the Stage for active in-flight vessel

float DeltaVStageInfo.totalExhaustVelocityASL

The Total Exhaust Velocity of the Stage At Sea Level

float DeltaVStageInfo.totalExhaustVelocityVAC

The Total Exhaust Velocity of the Stage in Vacuum

float DeltaVStageInfo.TWRActual

The Thrust to Weight Ratio Actual Vessel in-flight for this separation stage.

float DeltaVStageInfo.TWRASL

The Thrust to Weight Ratio At Sea Level for this separation stage.

float DeltaVStageInfo.TWRVac

The Thrust to Weight Ratio in Vacuum for this separation stage.

Vector3 DeltaVStageInfo.vectoredExhaustVelocityActual

The Actual Vectored Exhaust Velocity of the Stage for active in-flight Vessel (summed Vectors - including cosine losses)

Vector3 DeltaVStageInfo.vectoredExhaustVelocityASL

The Vectored Exhaust Velocity of the Stage At Sea Level (summed Vectors - including cosine losses)

Vector3 DeltaVStageInfo.vectoredExhaustVelocityVAC

The Vectored Exhaust Velocity of the Stage in Vacuum (summed Vectors - including cosine losses)

float DeltaVStageInfo.vectoredThrustActual

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

float DeltaVStageInfo.vectoredThrustASL

This is the Vectored Thrust being generated by the engine ASL.

float DeltaVStageInfo.vectoredThrustVac

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

VesselDeltaV DeltaVStageInfo.vesselDeltaV

Reference to the VesselDeltaV instance.


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