Engine¶
Some of the Parts returned by LIST PARTS will be of type Engine. It is also possible to get just the Engine parts by executing LIST ENGINES, for example:
LIST ENGINES IN myVariable.
FOR eng IN myVariable {
print "An engine exists with ISP = " + eng:ISP.
}.
-
structure
Engine¶ Members¶ Suffix Type (units) Description All suffixes of PartACTIVATETurn engine on SHUTDOWNTurn engine off THRUSTLIMITscalar (%) Tweaked thrust limit MAXTHRUSTscalar (kN) Untweaked thrust limit MAXTHRUSTAT(pressure)scalar (kN) Max thrust at the specified pressure (in standard Kerbin atmospheres). THRUSTscalar (kN) Current thrust AVAILABLETHRUSTscalar (kN) Available thrust at full throttle accounting for thrust limiter AVAILABLETHRUSTAT(pressure)scalar (kN) Available thrust at the specified pressure (in standard Kerbin atmospheres). FUELFLOWscalar (l/s maybe) Rate of fuel burn ISPscalar Specific impulse ISPAT(pressure)scalar Specific impulse at the given pressure (in standard Kerbin atmospheres). VACUUMISPscalar Vacuum specific impulse VISPscalar Synonym for VACUUMISP SEALEVELISPscalar Specific impulse at Kerbin sealevel SLISPscalar Synonym for SEALEVELISP FLAMEOUTBoolean Check if no more fuel IGNITIONBoolean Check if engine is active ALLOWRESTARTBoolean Check if engine can be reactivated ALLOWSHUTDOWNBoolean Check if engine can be shutdown THROTTLELOCKBoolean Check if throttle can not be changed MULTIMODEBoolean Check if engine has multiple modes MODESListList (string) of the engine modes MODEstring Name of the current mode (only if multiple) TOGGLEMODESwitch to another mode (only if multiple) PRIMARYMODEBoolean Is the engine in primary mode? (only if multiple) AUTOSWITCHBoolean Can the engine switch modes automatically? (only if multiple) HASGIMBALBoolean Check if engine has gimbal GIMBALGimbalGimbal of this engine (only if available)
Note
Engine is a type of Part, and therefore can use all the suffixes of Part. Shown below are only the suffixes that are unique to Engine.
-
Engine:
ACTIVATE()¶ Call to make the engine turn on.
-
Engine:
SHUTDOWN()¶ Call to make the engine turn off.
-
Engine:
THRUSTLIMIT¶ Access: Get/Set Type: scalar (%) If this an engine with a thrust limiter (tweakable) enabled, what percentage is it limited to? Note that this is expressed as a percentage, not a simple 0..1 coefficient. e.g. To set thrustlimit to half, you use a value of 50.0, not 0.5.
This value is not allowed to go outside the range [0..100]. If you attempt to do so, it will be clamped down into the allowed range.
Note that although a kerboscript is allowed to set the value to a very precise number (for example 10.5123), the stock in-game display widget that pops up when you right-click the engine will automatically round it to the nearest 0.5 whenever you open the panel. So if you do something like
set ship:part[20]:thrustlimit to 10.5123.in your script, then look at the rightclick menu for the engine, the very act of just looking at the menu will cause it to become 10.5 instead of 10.5123. There isn’t much that kOS can to to change this. It’s a user interface decision baked into the stock game.
-
Engine:
MAXTHRUST¶ Access: Get only Type: scalar (kN) How much thrust would this engine give at its current atmospheric pressure and velocity if the throttle was max at 1.0, and the thrust limiter was max at 100%. Note this might not be the engine’s actual max thrust it could have under other air pressure conditions. Some engines have a very different value for MAXTHRUST in vacuum as opposed to at sea level pressure. Also, some jet engines have a very different value for MAXTHRUST depending on how fast they are currently being rammed through the air.
-
Engine:
MAXTHRUSTAT(pressure)¶ Parameters: - pressure – atmospheric pressure (in standard Kerbin atmospheres)
Return type: scalar (kN)
How much thrust would this engine give if both the throttle and thrust limtier was max at the current velocity, and at the given atmospheric pressure. Use a pressure of 0.0 for vacuum, and 1.0 for sea level (on Kerbin) (or more than 1 for thicker atmospheres like on Eve).
-
Engine:
THRUST¶ Access: Get only Type: scalar (kN) How much thrust is this engine giving at this very moment.
-
Engine:
AVAILABLETHRUST¶ Access: Get only Type: scalar (kN) Taking into account the thrust limiter tweakable setting, how much thrust would this engine give if the throttle was max at its current thrust limit setting and atmospheric pressure and velocity conditions.
-
Engine:
AVAILABLETHRUSTAT(pressure)¶ Parameters: - pressure – atmospheric pressure (in standard Kerbin atmospheres)
Return type: scalar (kN)
Taking into account the thrust limiter tweakable setting, how much thrust would this engine give if the throttle was max at its current thrust limit setting and velocity, but at a different atmospheric pressure you pass into it. The pressure is measured in ATM’s, meaning 0.0 is a vacuum, 1.0 is seal level at Kerbin.
-
Engine:
FUELFLOW¶ Access: Get only Type: scalar (Liters/s? maybe) Rate at which fuel is being burned. Not sure what the units are.
-
Engine:
ISPAT(pressure)¶ Parameters: - pressure – atmospheric pressure (in standard Kerbin atmospheres)
Return type: Specific impulse at the given atmospheric pressure. Use a pressure of 0 for vacuum, and 1 for sea level (on Kerbin).
-
Engine:
VACUUMISP¶ Access: Get only Type: scalar Vacuum specific impulse
-
Engine:
SEALEVELISP¶ Access: Get only Type: scalar Specific impulse at Kerbin sealevel.
-
Engine:
FLAMEOUT¶ Access: Get only Type: Boolean Is this engine failed because it is starved of a resource (liquidfuel, oxidizer, oxygen)?
-
Engine:
IGNITION¶ Access: Get only Type: Boolean Has this engine been ignited? If both
Engine:IGNITIONandEngine:FLAMEOUTare true, that means the engine could start up again immediately if more resources were made available to it.
-
Engine:
ALLOWRESTART¶ Access: Get only Type: Boolean Is this an engine that can be started again? Usually True, but false for solid boosters.
-
Engine:
ALLOWSHUTDOWN¶ Access: Get only Type: Boolean Is this an engine that can be shut off once started? Usually True, but false for solid boosters.
-
Engine:
THROTTLELOCK¶ Access: Get only Type: Boolean Is this an engine that is stuck at a fixed throttle? (i.e. solid boosters)
-
Engine:
MULTIMODE¶ Access: Get only Type: Boolean Does this engine have multiple modes (i.e. RAPIER)? Check this before calling multi-mode specific suffixes.
-
Engine:
MODES¶ Access: Get only Type: Listof stringsLists names of modes of this engine if multimode, returns a list of 1 string “Single mode” otherwise.
-
Engine:
MODE¶ Access: Get only Type: string Name of the current mode. Only assessible for multi-mode engines.
-
Engine:
TOGGLEMODE()¶ Call to switch to another mode. Only assessible for multi-mode engines.
-
Engine:
PRIMARYMODE¶ Access: Get/Set Type: Boolean True for primary mode, false for secondary. Setting to other value equals toggling the mode. Only assessible for multi-mode engines.
-
Engine:
AUTOSWITCH¶ Access: Get/Set Type: Boolean Is automatic switching enabled? Can set to switch between manual and automatic switching. Only assessible for multi-mode engines.
-
Engine:
GIMBAL¶ Access: Get only Type: GimbalReturns the
Gimbalattached to this engine. Only accessible if the gimbal is present (UseEngine:HASGIMBALto check if available).