Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
VehiclePhysics.Engine Class Reference
Inheritance diagram for VehiclePhysics.Engine:
VehiclePhysics.Block

Classes

class  ClutchSettings
 
struct  EngineSpecs
 
class  Settings
 
struct  StateVars
 

Public Types

enum  ClutchType { ClutchType.LockRatio, ClutchType.DiskFriction, ClutchType.TorqueConverter, ClutchType.TorqueConverterLimited }
 
enum  IdleControlType { IdleControlType.Passive, IdleControlType.Active }
 
enum  RpmLimiterMode { RpmLimiterMode.InjectionCut, RpmLimiterMode.InjectionLimit }
 

Public Member Functions

float AddFrictionTorque (float frictionTorque)
 
float CalculatePowerInKw (float rpm)
 
float CalculateSpecificFuelConsumption (float rpm)
 
float CalculateTorque (float rpm, float throttle=1.0f)
 
override bool CheckConnections ()
 
float ClampPowerTorque (float powerTorque, float rpm)
 
override void EvaluateTorqueDownstream ()
 
void GetEngineSpecifications (ref EngineSpecs data, float deltaRpm=5.0f)
 
float GetFrictionTorque (float rpm)
 
float GetMaxFuelRate (float rpm)
 
float GetMaxPowerTorque (float rpm)
 
float GetMaxPowerTorqueRaw (float rpm)
 
override void GetState (ref State S)
 
StateVars GetStateVars ()
 
override void GetSubstepDerivative (ref Derivative D)
 
override void PreStep ()
 
void ResetFrictionTorque ()
 
override void SetState (State S)
 
void SetStateVars (StateVars stateVars)
 
override void SetSubstepState (State S)
 
- Public Member Functions inherited from VehiclePhysics.Block
 Block ()
 
virtual void ComputeStateUpstream ()
 
void CountConnections ()
 
bool DisconnectInput (int inputSlot)
 
bool DisconnectOutput (int outputSlot)
 

Public Attributes

float allowedFuelRatio = 1.0f
 
bool autoRpms = false
 
float clutchInput = 0.0f
 
ClutchSettings clutchSettings = new ClutchSettings()
 
float damping = 1.0f
 
int ignitionInput = 0
 
Settings settings = new Settings()
 
float targetRpms = -1.0f
 
float tcsRatio = 1.0f
 
float tcsRpms = -1.0f
 
float tcsThrottleFactor = 1.0f
 
float tempDebug1 = 0.0f
 
float tempDebug2 = 0.0f
 
float throttleInput = 0.0f
 

Static Public Attributes

static float KwToHp = 1.341022f
 
- Static Public Attributes inherited from VehiclePhysics.Block
static float RpmToW = (2.0f * Mathf.PI) / 60.0f
 
static float WToRpm = 60.0f / (2.0f * Mathf.PI)
 

Protected Member Functions

override void Initialize ()
 
- Protected Member Functions inherited from VehiclePhysics.Block
void SetInputs (int count)
 
void SetOutputs (int count)
 

Properties

float sensorClutchLock [get]
 
float sensorFlywheelTorque [get]
 
float sensorFuelRate [get]
 
float sensorLoad [get]
 
float sensorOutputTorque [get]
 
float sensorPower [get]
 
float sensorRpm [get]
 
bool sensorRpmLimiter [get]
 
bool sensorStalled [get]
 
bool sensorStarting [get]
 
bool sensorTcsEngaged [get]
 
bool sensorWorking [get]
 
- Properties inherited from VehiclePhysics.Block
int connectedInputs [get]
 
int connectedOutputs [get]
 
bool hasInputs [get]
 
bool hasOutputs [get]
 
Connection[] inputs [get]
 
Connection[] outputs [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from VehiclePhysics.Block
static bool Connect (Block inputUnit, int inputSlot, Block outputUnit, int outputSlot)
 
static bool Connect (Block inputUnit, Block outputUnit)
 
static bool Connect (Block inputUnit, Block outputUnit, int outputSlot)
 
static bool Connect (params Block[] blocks)
 

Member Enumeration Documentation

Enumerator
LockRatio 
DiskFriction 
TorqueConverter 
TorqueConverterLimited 
Enumerator
Passive 
Active 
Enumerator
InjectionCut 
InjectionLimit 

Member Function Documentation

float VehiclePhysics.Engine.AddFrictionTorque ( float  frictionTorque)
inline
float VehiclePhysics.Engine.CalculatePowerInKw ( float  rpm)
inline
float VehiclePhysics.Engine.CalculateSpecificFuelConsumption ( float  rpm)
inline
float VehiclePhysics.Engine.CalculateTorque ( float  rpm,
float  throttle = 1.0f 
)
inline
override bool VehiclePhysics.Engine.CheckConnections ( )
inlinevirtual

Reimplemented from VehiclePhysics.Block.

float VehiclePhysics.Engine.ClampPowerTorque ( float  powerTorque,
float  rpm 
)
inline
override void VehiclePhysics.Engine.EvaluateTorqueDownstream ( )
inlinevirtual

Reimplemented from VehiclePhysics.Block.

void VehiclePhysics.Engine.GetEngineSpecifications ( ref EngineSpecs  data,
float  deltaRpm = 5.0f 
)
inline
float VehiclePhysics.Engine.GetFrictionTorque ( float  rpm)
inline
float VehiclePhysics.Engine.GetMaxFuelRate ( float  rpm)
inline
float VehiclePhysics.Engine.GetMaxPowerTorque ( float  rpm)
inline
float VehiclePhysics.Engine.GetMaxPowerTorqueRaw ( float  rpm)
inline
override void VehiclePhysics.Engine.GetState ( ref State  S)
inlinevirtual

Reimplemented from VehiclePhysics.Block.

StateVars VehiclePhysics.Engine.GetStateVars ( )
inline
override void VehiclePhysics.Engine.GetSubstepDerivative ( ref Derivative  D)
inlinevirtual

Reimplemented from VehiclePhysics.Block.

override void VehiclePhysics.Engine.Initialize ( )
inlineprotectedvirtual

Reimplemented from VehiclePhysics.Block.

override void VehiclePhysics.Engine.PreStep ( )
inlinevirtual

Reimplemented from VehiclePhysics.Block.

void VehiclePhysics.Engine.ResetFrictionTorque ( )
inline
override void VehiclePhysics.Engine.SetState ( State  S)
inlinevirtual

Reimplemented from VehiclePhysics.Block.

void VehiclePhysics.Engine.SetStateVars ( StateVars  stateVars)
inline
override void VehiclePhysics.Engine.SetSubstepState ( State  S)
inlinevirtual

Reimplemented from VehiclePhysics.Block.

Member Data Documentation

float VehiclePhysics.Engine.allowedFuelRatio = 1.0f
bool VehiclePhysics.Engine.autoRpms = false
float VehiclePhysics.Engine.clutchInput = 0.0f
ClutchSettings VehiclePhysics.Engine.clutchSettings = new ClutchSettings()
float VehiclePhysics.Engine.damping = 1.0f
int VehiclePhysics.Engine.ignitionInput = 0
float VehiclePhysics.Engine.KwToHp = 1.341022f
static
Settings VehiclePhysics.Engine.settings = new Settings()
float VehiclePhysics.Engine.targetRpms = -1.0f
float VehiclePhysics.Engine.tcsRatio = 1.0f
float VehiclePhysics.Engine.tcsRpms = -1.0f
float VehiclePhysics.Engine.tcsThrottleFactor = 1.0f
float VehiclePhysics.Engine.tempDebug1 = 0.0f
float VehiclePhysics.Engine.tempDebug2 = 0.0f
float VehiclePhysics.Engine.throttleInput = 0.0f

Property Documentation

float VehiclePhysics.Engine.sensorClutchLock
get
float VehiclePhysics.Engine.sensorFlywheelTorque
get
float VehiclePhysics.Engine.sensorFuelRate
get
float VehiclePhysics.Engine.sensorLoad
get
float VehiclePhysics.Engine.sensorOutputTorque
get
float VehiclePhysics.Engine.sensorPower
get
float VehiclePhysics.Engine.sensorRpm
get
bool VehiclePhysics.Engine.sensorRpmLimiter
get
bool VehiclePhysics.Engine.sensorStalled
get
bool VehiclePhysics.Engine.sensorStarting
get
bool VehiclePhysics.Engine.sensorTcsEngaged
get
bool VehiclePhysics.Engine.sensorWorking
get

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