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

This class stores ModuleEngines Data related to a Vessel or ShipConstruct which is used in DeltaV calculations. More...

Inheritance diagram for VesselDeltaV:

Public Types

enum  Mode { Mode.Ship, Mode.Vessel }
 

Public Member Functions

bool DisableStockSimluation ()
 Disable the Stock Delta-v simulations on this instance More...
 
bool EnableStockSimluation ()
 Enable the Stock Delta-v simulations on this instance More...
 
int GetActivatedEngines ()
 
int GetHighestSeparationStage (int inStage)
 Returns the Highest separation stage index in the vessel/ship that is less than (higher up) or equal to the passed in stage number. More...
 
double GetSituationTotalDeltaV (DeltaVSituationOptions situation)
 Get the Total DeltaV for the passed in situation More...
 
DeltaVStageInfo GetStage (int stage)
 Get the StageInfo List entry that matches the passed in stage number. More...
 
void SetCalcsDirty (bool resetPartCaches, bool syncListInstances=false)
 Set the DeltaV calculations dirty (force a recalculation).

Parameters
resetPartCachesIf true will reset Part/PartSet HashSets on all stages - generates garbage. If falise will not.
syncListInstancesIf true will re-sync DV List instances.
More...
 

Static Public Member Functions

static VesselDeltaV Create (Vessel vesselRef)
 Constructor. More...
 
static VesselDeltaV Create (ShipConstruct shipRef)
 Constructor. More...
 

Public Attributes

bool currentStageActivated
 True if the current stage is activated. More...
 
DeltaVEngineStageSet engineStageSet
 Contains the Engine Info and Stage Info for this Instance used for DV calculations and UI display. More...
 
int lowestStageWithDeltaV
 Will be stage to the lowest Stage Number (highest up the staging stack) that produces any DeltaV. More...
 

Properties

Mode ActiveMode [get]
 Are we running in Vessel or Ship mode More...
 
bool DoStockSimulation [get]
 Set this to false on the Instance will stop Stock DV simulation for running on this instance. More...
 
bool IsReady [get]
 Is this Instance Ready? (Run a DV calculation of the whole vessel at least once) More...
 
List< DeltaVEngineInfoOperatingEngineInfo [get]
 List of EngineInfo on the Vessel used in UI display. More...
 
List< DeltaVStageInfoOperatingStageInfo [get]
 List of StageInfo for each stage in the Vessel used for UI display purposes. More...
 
List< DeltaVPartInfoPartInfo [get]
 A list of all the Parts in the Ship/Vessel More...
 
List< int > SeparationStageIndexes [get]
 A list of Stages where Parts Decouple More...
 
ShipConstruct Ship [get]
 The ShipConstruct reference if this instance is related to a ShipConstruct. If it's related to a Vessel then this reference will be null. More...
 
bool SimulationRunning [get]
 Is there a DeltaV simulation currently running? More...
 
double TotalBurnTime [get]
 The Total Simulated Burn time for the Vessel/Ship. More...
 
double TotalDeltaVActual [get]
 The Total Simulated DeltaV produced by the Vessel/Ship in flight. More...
 
double TotalDeltaVASL [get]
 The Total Simulated DeltaV produced by the Vessel/Ship at ASL More...
 
double TotalDeltaVVac [get]
 The Total Simulated DeltaV produced by the Vessel/Ship in Vacuum More...
 
bool UpdateFlightScene [get]
 True if a DeltaV simulation running in Flight More...
 
Vessel Vessel [get]
 The Vessel reference if this instance is related to a Vessel. If it's related to a ShipConstruct then this reference will be null. More...
 

Detailed Description

This class stores ModuleEngines Data related to a Vessel or ShipConstruct which is used in DeltaV calculations.

Member Enumeration Documentation

Enumerator
Ship 
Vessel 

Member Function Documentation

static VesselDeltaV VesselDeltaV.Create ( Vessel  vesselRef)
inlinestatic

Constructor.

Parameters
vesselRefThe Vessel this instance is to be added to.
static VesselDeltaV VesselDeltaV.Create ( ShipConstruct  shipRef)
inlinestatic

Constructor.

Parameters
shipRefThe ShipConstruct this instance is to be added to.
bool VesselDeltaV.DisableStockSimluation ( )
inline

Disable the Stock Delta-v simulations on this instance

Returns
bool VesselDeltaV.EnableStockSimluation ( )
inline

Enable the Stock Delta-v simulations on this instance

Returns
int VesselDeltaV.GetActivatedEngines ( )
inline
int VesselDeltaV.GetHighestSeparationStage ( int  inStage)
inline

Returns the Highest separation stage index in the vessel/ship that is less than (higher up) or equal to the passed in stage number.

Parameters
inStageThe stage number
Returns
double VesselDeltaV.GetSituationTotalDeltaV ( DeltaVSituationOptions  situation)
inline

Get the Total DeltaV for the passed in situation

Parameters
situationsituation of the calc
Returns
DeltaV in m/s
DeltaVStageInfo VesselDeltaV.GetStage ( int  stage)
inline

Get the StageInfo List entry that matches the passed in stage number.

Parameters
stageThe stage number we want.
Returns
The matching StageInfo list entry or Null.
void VesselDeltaV.SetCalcsDirty ( bool  resetPartCaches,
bool  syncListInstances = false 
)
inline

Set the DeltaV calculations dirty (force a recalculation).

Parameters
resetPartCachesIf true will reset Part/PartSet HashSets on all stages - generates garbage. If falise will not.
syncListInstancesIf true will re-sync DV List instances.

Member Data Documentation

bool VesselDeltaV.currentStageActivated

True if the current stage is activated.

DeltaVEngineStageSet VesselDeltaV.engineStageSet

Contains the Engine Info and Stage Info for this Instance used for DV calculations and UI display.

int VesselDeltaV.lowestStageWithDeltaV

Will be stage to the lowest Stage Number (highest up the staging stack) that produces any DeltaV.

Property Documentation

Mode VesselDeltaV.ActiveMode
get

Are we running in Vessel or Ship mode

bool VesselDeltaV.DoStockSimulation
get

Set this to false on the Instance will stop Stock DV simulation for running on this instance.

bool VesselDeltaV.IsReady
get

Is this Instance Ready? (Run a DV calculation of the whole vessel at least once)

List<DeltaVEngineInfo> VesselDeltaV.OperatingEngineInfo
get

List of EngineInfo on the Vessel used in UI display.

List<DeltaVStageInfo> VesselDeltaV.OperatingStageInfo
get

List of StageInfo for each stage in the Vessel used for UI display purposes.

List<DeltaVPartInfo> VesselDeltaV.PartInfo
get

A list of all the Parts in the Ship/Vessel

List<int> VesselDeltaV.SeparationStageIndexes
get

A list of Stages where Parts Decouple

ShipConstruct VesselDeltaV.Ship
get

The ShipConstruct reference if this instance is related to a ShipConstruct. If it's related to a Vessel then this reference will be null.

bool VesselDeltaV.SimulationRunning
get

Is there a DeltaV simulation currently running?

double VesselDeltaV.TotalBurnTime
get

The Total Simulated Burn time for the Vessel/Ship.

double VesselDeltaV.TotalDeltaVActual
get

The Total Simulated DeltaV produced by the Vessel/Ship in flight.

double VesselDeltaV.TotalDeltaVASL
get

The Total Simulated DeltaV produced by the Vessel/Ship at ASL

double VesselDeltaV.TotalDeltaVVac
get

The Total Simulated DeltaV produced by the Vessel/Ship in Vacuum

bool VesselDeltaV.UpdateFlightScene
get

True if a DeltaV simulation running in Flight

Vessel VesselDeltaV.Vessel
get

The Vessel reference if this instance is related to a Vessel. If it's related to a ShipConstruct then this reference will be null.


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