Skip to content

Defined variables

MOARdV edited this page Apr 28, 2017 · 154 revisions

These are variables known to RasterPropMonitorComputer that powers much of the internals of this kit, which the components need to have on the pod that houses their IVA -- there is always exactly one per pod. Whenever this manual refers to variables, these are the ones it means. Over time, the list got very long and now contains something over 150 different values you can display or use to drive a prop.

If you feel a useful variable is missing, I'm ready to add it in, provided I don't need to write more than a page of code to acquire it. If I do need to write more than a page of code to acquire it, you always have the option of sending in a pull request, or failing that -- i.e. when the variables can only be acquired by interfacing to a third party plugin -- making your own Variable handlers to provide them.

There are currently no provisions to use any kind of mathematical or logical expressions as variables (with the exception of Custom Variables. If you need a specific expression not covered in this list as it is, it's always possible to add one more variable, and currently this is preferred -- please poke me.

See also Variable handlers.

Speeds

  • VERTSPEED -- Vertical speed in m/s.
  • VERTSPEEDLOG10 -- Vertical speed in a pseudo-log10 format, where speeds between -1 and 1 are unchanged, and values outside that range are converted using (log10(abs(vertical speed))+1) * sign(vertical speed). For instance, -100m/s becomes -3. This format is useful for scaled vertical speed indicators.
  • VERTSPEEDROUNDED -- Vertical speed rounded to 0.05, for use in indicators rather than straight display.
  • RADARALTVERTSPEED -- Vertical speed as measured using the radar altimeter.
  • SURFSPEED -- Surface speed in m/s.
  • SURFSPEEDMACH -- Surface speed as a Mach number (Mach 1 is the speed of sound).
  • ORBTSPEED -- Orbital speed in m/s.
  • TRGTSPEED -- Speed relative to target in m/s.
  • APPROACHSPEED -- Speed of approach to target rather than just relative to target. Positive if you're closing in, negative if you're gaining distance.
  • HORZVELOCITY -- Horizontal component of surface velocity in m/s.
  • HORZVELOCITYFORWARD -- The forward/back component of the surface velocity. For aircraft and rovers, "forward" is the front of the craft. For landers, "forward" is the vector perpendicular to local surface "up" and craft "right".
  • HORZVELOCITYRIGHT -- Left/right component of the surface velocity.
  • TGTRELX, TGTRELY, TGTRELZ, -- Components of speed relative to target, in m/s.
  • SELECTEDSPEED -- Speed value that depends on which speed display mode (orbit, surface, target) is currently globally selected.
  • BESTSPEEDATIMPACT -- The highest speed you can be expected to have assuming that your current trajectory will result in a ground impact, and you maintain the highest possible thrust. 0 if you can't impact the ground anytime soon. A rough estimate.
  • SPEEDATIMPACT -- The speed you can be expected to have at impact, assuming your current trajectory will result in a ground impact and you maintain the thrust that you have currently. 0 if you can't impact the ground anytime soon. A rough estimate.
  • ACCELPROGRADE, ACCELNORMAL, ACCELRADIAL -- Return the craft's current acceleration, decomposed into its orbit-relative cardinal components.
  • ACCELSURFPROGRADE -- As above, but relative to the craft's surface forward velocity.
  • ACCELFORWARD, ACCELRIGHT, ACCELTOP -- As above, but relative to the craft's orientation ('forward' is the top of a rocket or the nose of a space plane).

Atmosphere-specific

  • EASPEED -- Equivalent airspeed as per the standard equivalent airspeed equation. I'm told knowing that is very important if you use anything approaching realistic aerodynamics.
  • IASPEED -- Indicated airspeed as per the standard IAS equation.
  • TERMINALVELOCITY -- The terminal velocity at the craft's current altitude. Meaningless in vacuum (so you should probably use another variable, like ATMPRESSURE, to determine if it's useful).
  • ATMPRESSURE -- Current atmospheric pressure.
  • ATMDENSITY -- Current atmospheric density.
  • DYNAMICPRESSURE -- Current dynamic pressure in kPa.
  • ATMOSPHEREDEPTH -- A value between 0 (no atmosphere) to 1 (deepest atmosphere). Usually identical to the stock atmosphere gauge, although there may be times when it's not. It can be used to drive your own atmosphere gauge of the same kind with JSIVariableAnimator.

Altitudes

  • ALTITUDE -- Altitude above sea level in meters.
  • RADARALT -- Altitude above the ground in meters.
  • RADARALTOCEAN -- Altitude above the ground OR above the sea level -- depending on whether you're flying over an ocean or not.
  • ALTITUDEBOTTOM -- Altitude above the ground from the currently lowest point of the ship, i.e. landing legs. Considered equal to RADARALT for all altitudes above 500 meters to save on processing, so direct display of this value is not recommended -- a VariableAnimator toggle light is a better idea.
  • DISTTOATMOSPHERETOP -- The distance in meters from the vessel to the top of the atmosphere, or to the 0 ASL datum if there is no atmosphere. If the vessel is above the atmosphere / datum, the value is negative.
  • TERRAINHEIGHT -- Height of the terrain itself, that is, altitude above the sea level minus radar altitude.
  • TERRAINDELTA -- How much the said height of terrain changed in the last second, in meters.
  • ALTITUDELOG10, RADARALTLOG10, RADARALTOCEANLOG10, ALTITUDEBOTTOMLOG10, TERRAINHEIGHTLOG10 -- Each of these values returned in a pseudo-log10 format: For values between -1 and 1, the altitude is unchanged. Values outside that range are converted using (log10(abs(vertical speed))+1) * sign(vertical speed). For instance, -100m becomes -3. This format is useful for scaled altimeters.

Masses

  • MASSDRY -- Dry mass of the ship, i.e. excluding resources.
  • MASSWET -- Total mass of the ship.
  • MASSRESOURCES -- Mass of the resources alone, i.e. wet minus dry.
  • MASSPROPELLANT -- Mass of the propellants alone, i.e. only of those resources that the currently enabled engines consider propellants.
  • MASSPROPELLANTSTAGE -- Mass of the propellants for the current stage only.

Thrust and related parameters

None of these parameters know anything about vectors and orientations, mind.

  • THRUST -- Total amount of thrust currently produced by the engines in kilonewtons (kN).
  • THRUSTMAX -- Maximum amount of thrust the currently enabled engines can produce, accounting for the engines' Thrust Limit tweakable.
  • THRUSTMAXRAW -- Maximum amount of thrust the currently enabled engines can produce if their Thrust Limit is 100%.
  • THRUSTLIMIT -- The current weighted thrust limit of all enabled engines.
  • TWR -- Thrust to weight relative to the body currently being orbited calculated from the current throttle level.
  • TWRMAX -- TWR you would get at full throttle.
  • ACCEL -- Current acceleration in m/s^2
  • MAXACCEL -- Maximum acceleration in m/s^2
  • DRAG -- The force of drag on the vessel, in kilonewtons (kN).
  • DRAGACCEL -- The effect of drag on the vessel in m/s^2.
  • LIFT -- The force of lift on the vessel, in kilonewtons (kN).
  • LIFTACCEL -- The effect of lift on the vessel in m/s^2.
  • GFORCE -- G forces being experienced by the vessel in g.
  • REALISP -- Actual combined ISP of all currently enabled engines.
  • MAXISP -- Maximum combined ISP of all currently enabled engines.
  • EFFECTIVEACCEL -- Acceleration actually experienced, including gravitational, in m/s^2.
  • ENGINECOUNT, ACTIVEENGINECOUNT -- The count of the number of engines on the current stage, and the number of active engines.
  • HOVERPOINT -- A number between 0 (no throttle) and 1 (full throttle) representing the level of the throttle the ship has to have to negate acceleration from gravity in the point it's currently located. If even the full throttle is insufficient, it will return 1.
  • HOVERPOINTEXISTS -- Returns 1 if it is possible to hover by negating gravity acceleration, i.e. if it required less than a full throttle, and -1 if a full throttle will not be sufficient.
  • DELTAV -- The full delta V of the vessel. BEWARE: There is no proper staging simulation in this calculation, so the returned value is very probably nonsense.
  • DELTAVSTAGE -- The delta V of the current stage. BEWARE: There is no proper staging simulation in this calculation -- it relies on what KSP says about which resources are available in the current stage, and that is often a lie, so the returned value is very probably nonsense.
  • CURRENTENGINEFUELFLOW, MAXENGINEFUELFLOW -- The current fuel consumption rate and the maximum fuel consumption rate for all active engines, in grams/second. These values are derived directly from the engine stats (Isp and thrust).
  • CURRENTINTAKEAIRFLOW -- The current airflow rate across all enabled intakes in grams/second.

State of control inputs

  • THROTTLE -- Current state of the engine throttle, a number from 0 to 1.
  • EFFECTIVETHROTTLE -- Current effective state of the throttle, i.e. the actual thrust currently enabled engines produce divided by the maximum thrust they can produce, which in many engines lags behind the directed throttle. This value takes thrust limits into account.
  • EFFECTIVERAWTHROTTLE -- The current effective state of the throttle, ignoring any thrust limits applied to the engines.

Other control inputs range from -1 to 1:

  • STICKPITCH, STICKROLL, STICKYAW -- Current state of the orientation input.
  • STICKPITCHTRIM, STICKROLLTRIM, STICKYAWTRIM -- Current state of orientation trimmers -
  • STICKRCSX, STICKRCSY, STICKRCSZ -- Current state of RCS input.

In addition, the SAS mode is reported through the following variables:

  • SASMODESTABILITY: Returns 1 if SAS is currently configured for stability assist, 0 otherwise.
  • SASMODEPROGRADE: Returns 1 if SAS is holding prograde, -1 if SAS is holding retrograde, or 0 otherwise.
  • SASMODENORMAL: Returns 1 if SAS is pointing towards orbital normal, -1 if SAS is pointing anti-normal, or 0 otherwise.
  • SASMODERADIAL: Returns 1 if SAS is pointing towards orbital radial +, -1 if SAS is pointing radial -, or 0 otherwise.
  • SASMODETARGET: Returns 1 if SAS is pointing towards the target, -1 if SAS is pointing away from the target, or 0 otherwise.
  • SASMODEMANEUVER: Returns 1 is SAS is pointing towards the maneuver node, or 0 otherwise.

Maneuver node

Maneuver node values only report on the first maneuver node if more than one is plotted.

  • MNODEEXISTS -- Returns 1 if a maneuver node exists. -1 otherwise.
  • MNODETIMESECS -- time until/after the current maneuver node, in seconds. Is negative before the node and positive after.
  • MNODEDV -- Delta V remaining in the current maneuver node.
  • MNODEBURNTIMESECS -- A rough estimation of the expected time required to complete the burn, in seconds.
  • MNODEDVPROGRADE, MNODEDVNORMAL, MNODEDVRADIAL -- The decomposition of the maneuver node dV into the orbital reference frame, or 0 if no node is scheduled.
  • MNODEPERIAPSIS, MNODEAPOAPSIS, MNODEINCLINATION, MNODEECCENTRICITY -- The orbital parameters that will result after the maneuver node executes, or NaN if no node is scheduled.
  • MNODETARGETCLOSESTAPPROACHTIME, MNODETARGETCLOSESTAPPROACHDISTANCE, MNODERELATIVEINCLINATION -- The closest approach time and distance, and the relative inclination, with a target after the maneuver has executed, or NaN if no node is schedule or no target exists.

Orbit parameters

  • ORBITMAKESSENSE -- Returns 1 if your vessel has an orbit to speak of, -1 otherwise.
  • ORBITBODY -- Name of the body we're orbiting.
  • PERIAPSIS -- Periapsis of the current orbit in meters.
  • APOAPSIS -- Periapsis of the current orbit in meters.
  • INCLINATION -- Inclination of the current orbit in degrees.
  • ECCENTRICITY -- Eccentricity of the current orbit.
  • ORBPERIODSECS -- Period of the current orbit, in seconds.
  • SEMIMAJORAXIS -- The semimajor axis of the current orbit.
  • TIMETOATMOSPHERESECS -- Time until the current orbit crosses the top of the atmosphere. If the orbit does not cross the atmosphere, or the body does not have an atmosphere, the result is 0.
  • TIMETOAPSECS -- Time to apoapsis, in seconds.
  • TIMETOPESECS -- Time to periapsis, in seconds.
  • TIMETOANEQUATORIAL -- Time to the equatorial ascending node.
  • TIMETODNEQUATORIAL -- Time to the equatorial descending node.
  • TIMESINCELASTAP -- The time to apoapsis, in seconds, subtracted from the period of the orbit.
  • TIMESINCELASTPE -- The time to periapsis, in seconds, subtracted from the period of the orbit.
  • ENCOUNTEREXISTS -- Whether the current orbit results in an encounter. 0 if it doesn't, 1 if it results in a SOI change inward (i.e. to a moon), and -1 if it results in a SOI change outward (i.e. an escape).
  • ENCOUNTERTIME -- Time until the encounter in seconds if one exists, 0 otherwise.
  • ENCOUNTERBODY -- Name of the celestial body that the encounter will be with, or the one to the SOI of which the ship will escape if that is an escape. An empty string otherwise.
  • NEXTAPSIS -- The altitude of the next apsis in the current orbit, in meters.
  • TIMETONEXTAPSIS -- The time to the next apsis in the current orbit, in seconds. 0 if the value is not valid.
  • NEXTAPSISTYPE -- Returns -1 for periapsis, 1 for apoapsis, or 0 if neither (such as when landed, or in a hyperbolic orbit after the periapsis).

Time

  • UTSECS -- Universal time, in seconds. The first year is number 1, not 0, so a number of seconds equal to the length of the year (whatever it is this season) is added to the actual number received from the system.
  • TIMEOFDAYSECS -- Only the time of day component of Universal Time (so, from 0 to 6 * 60 * 60 if the game is set to Kerbal time, or 0 to 24 * 60 * 60 if set to Earth time). Useful for a clock or something similar.
  • METSECS -- Mission Elapsed Time, in seconds.
  • ISONKERBINTIME -- Returns 1 if the game is set to report time in Kerbin-orbit relative units, i.e. assumes a 6 hour day and a 426-day year. 0 otherwise.

Names

  • NAME -- Name of the current vessel.
  • TARGETNAME -- Name of the target.
  • VESSELTYPE -- Vessel type of the current vessel, a string.
  • TARGETTYPE -- Type of the current target, if it's a vessel, "Port" if it's a docking node, "Celestial" if it's a celestial body, "Position" if it's something else, like a MechJeb position target.

Crew

  • CREW_<id>_<suffix> -- Names of crewmembers. IDs start with 0, the list is vessel-global. Valid suffixes are FULL, FIRST, LAST, PRESENT, EXISTS, STUPIDITY, COURAGE, BADASS, WHEE, PANIC, TITLE, LEVEL, EXPERIENCE. For example, with Jebediah Kerman being the only occupant of the only capsule on the ship, depending on the suffix:
    • FIRST will produce "Jebediah", LAST will produce "Kerman" and FULL will produce "Jebediah Kerman". An empty string if the seat is unoccupied.
    • PRESENT qualifier is a number, -1 if the seat is empty and 1 if it is occupied.
    • EXISTS does the same depending on whether a seat with that number exists, regardless of whether it's occupied or not.
    • STUPIDITY, COURAGE are values between 0 and 1.
    • BADASS is either 0 or 1.
    • WHEE and PANIC change over time, and are the two basic numbers that go into Kerbal expressions, which range from 0 to 1 and can be used to construct biomonitors.
    • TITLE is the crewmember's job title, as listed in his experience trait. For 0.90, this can be "Pilot", "Engineer", or "Scientist".
    • LEVEL is the crewmember's level at his title.
    • EXPERIENCE is the amount of experience the crewmember has in his job.
  • CREWLOCAL_<id>_<...> -- Same, but for the seats in the local pod only, rather than global for the entire vessel.

CommNet

  • COMMNETCONNECTED -- Returns 1 if the vessel is connected to CommNet.
  • COMMNETSIGNALSTRENGTH -- Returns the CommNet signal strength (between 0 and 1).
  • COMMNETVESSELCONTROLSTATE -- Returns the current control state of the vessel. 0 = NONE, 2 = PROBE, 4 = KERBAL, 8 = PARTIAL, 10 = PROBE PARTIAL, 12 = KERBAL PARTIAL, 16 = FULL, 18 = PROBE FULL, 20 = KERBAL FULL. (In all likelihood, 0, 10, 12, 18, and 20 are the most likely results)

Coordinates

  • LATITUDE -- Latitude of the vessel in degrees. Negative is south.
  • LONGITUDE -- Longitude of the vessel in degrees. Negative is west.
  • LATITUDETGT, LONGITUDETGT -- Same as above, but of a target vessel.
  • TARGETLATITUDE, TARGETLONGITUDE -- Same as above, but with an aliased name (for consistency).

These variables produce numeric output. If you wish to format it into degrees, minutes and seconds, use the DMS formatting options. (see Writing page definition files)

Orientation

  • HEADING, PITCH, ROLL -- should be obvious.
  • ANGLEOFATTACK, SIDESLIP -- Maybe less obvious. The angular difference between the nose of the craft and the surface velocity vector in the pitch axis and yaw axis, respectively.
  • PITCHRATE, ROLLRATE, YAWRATE -- The rate of rotation on each axis in degrees per second.
  • PITCHPROGRADE, YAWPROGRADE and family -- Pitch and Yaw angles relative to the craft's nose for each of the six cardinal orbital vectors (PROGRADE, RETROGRADE, RADIALIN, RADIALOUT, NORMALPLUS, NORMALMINUS, SURFPROGRADE, SURFRETROGRADE, so for instance, YAWRADIALOUT), maneuver nodes (NODE) and targets (TARGET, TARGETRELPLUS, TARGETRELMINUS). Note that these values tend to go towards +/-90 when they're nearly perpendicular (meaning both yaw and pitch may be 90 at the same time, even if it looks like it shouldn't be on the navball). If there is no maneuver node, its yaw and pitch report zero. Likewise, if there is no valid target, its yaw and pitch values report zero.

Rendezvous and docking

  • TARGETEXISTS -- Returns 1 if the target is a vessel, -1 if there's no target, and 0 if the target exists but isn't a vessel.
  • TARGETSAMESOI -- Returns 1 if the target is in the same SoI as the active vessel, or 0 if there's no target or the target orbits a different body.
  • TARGETISDOCKINGPORT -- Returns 1 if the target is a a docking port, -1 if there's no target, and 0 if the target exists but isn't a docking port.
  • TARGETISVESSELORPORT -- Returns -1 if there is not target, 1 if the target is a vessel OR a docking port, and 0 otherwise.
  • TARGETISCELESTIAL -- Returns 1 if the target is a a celestial body, -1 if there's no target, and 0 if the target exists but isn't a celestial body.
  • TARGETISPOSITION -- Returns 1 if the target is a position, -1 if there's no target, or 0 if the target exists, but it isn't a position.
  • TARGETSITUATION -- Returns the same as SITUATION but for target, if it's a vessel. An empty string otherwise.
  • TARGETORBITBODY -- The name of the body your target orbits.
  • TARGETALTITUDE -- The altitude of the target above sea level. -1 if there's no target.
  • TARGETDISTANCE -- Distance to the target in meters. -1 if there's no target.
  • TARGETGROUNDDISTANCE -- Distance to the target in meters, as measured from the ground. This makes sense to measure ground distance from the vessel to the target, since it measures the distance from the ground directly below the vessel to the ground directly below the target. -1 if there's no target or if the target is a planet or moon.
  • TARGETSEMIMAJORAXIS -- The semimajor axis of the target's orbit.
  • TARGETDISTANCEX, TARGETDISTANCEY, TARGETDISTANCEZ -- Distance to the target separated by axis.
  • TARGETDISTANCESCALEDX, TARGETDISTANCESCALEDY -- The X and Y distance scaled based on Z distance, and clamped to the range -100 to +100 inclusive, which makes them useful for animating a docking alignment reticle.
  • RELATIVEINCLINATION -- Relative inclination of the target orbit. Returns -1 if there's no target or if the target orbits a different reference body.
  • TARGETANGLEX, TARGETANGLEY, TARGETANGLEZ -- Angles between axes of the capsule and a target docking port.
  • TARGETAPOAPSIS, TARGETPERIAPSIS, TARGETINCLINATION, TARGETECCENTRICITY, TARGETORBITALVEL, TARGETTIMETOAPSECS, TARGETORBPERIODSECS, TARGETTIMETOPESECS, -- parameters of the target's orbit, if one exists. Same considerations as for the vessel's own orbital parameters apply.
  • TIMETOANWITHTARGETSECS/TIMETODNWITHTARGETSECS -- Time to ascending/descending node with target.
  • TARGETANGLEDEV -- Angle between the vector pointing directly at target and the vessel's heading, from 0 to 180. Equals to 180 when there's no target.
  • TARGETCLOSESTAPPROACHTIME -- Time until the closest approach to an orbiting target, in seconds.
  • TARGETCLOSESTAPPROACHDISTANCE -- Distance at such a closest approach.
  • TARGETLAUNCHTIMESECS -- Time until the launch-to-intercept window with the target, in seconds.
  • TARGETPLANELAUNCHTIMESECS -- Time until the launch-to-plane window with the target, in seconds (the time when an inclined target's orbit crosses the launch site).
  • TARGETSIGNALSTRENGTH -- The signal strength (as a number 0 or higher) of a tracked asteroid, or -1 if the target isn't an asteroid.
  • TARGETSIGNALSTRENGTHCAPTION -- The caption KSP applies to the signal strength (such as "Weak" or "Very Weak"), returned as a string, or an empty string if the target is not an asteroid.
  • TARGETLASTOBSERVEDTIMEUT -- The absolute UT that the asteroid was last observed, or -1 if the target is not an asteroid.
  • TARGETLASTOBSERVEDTIMESECS -- The time before the present when the asteroid was last observed, in seconds (a positive value), or -1 if the target is not an asteroid.
  • TARGETSIZECLASS -- The size class of the target, as a string ("A", "B", etc), or an empty string if the target is not an asteroid.

Resources

  • ELECOUTPUTALTERNATOR, ELECOUTPUTFUELCELL, ELECOUTPUTGENERATOR, and ELECOUTPUTSOLAR -- Report the current power production rate in units/second for each of ModuleAlternator (typically on engines), ModuleResourceConverter (Fuel Cell parts), ModuleGenerator (eg, RTG), and ModuleDeployableSolarPanel (solar panels). These values are irrespective of the current available power levels.

Notice that resource quantities are rounded down to 0.01, because otherwise they never become properly zero, which hinders the neat formatting features. If your resource requires a more fine grained measurement, poke me and we'll talk about it. Every resource can be addressed by name (I.e. 'SYSR_ELECTRICCHARGE') to get it's current quantity, and suffixed with a qualifier:

  • MAX -- Maximum possible amount per ship.
  • STAGEMAX -- Maximum possible amount in current stage.
  • PERCENT -- A ratio, a number between 0 and 1 -- 1 means the current amount is equal to maximum. You can use formatters to print it as actual percentile.
  • STAGEPERCENT -- The same, but for current stage only.
  • DENSITY -- Density of the resource, i.e. mass per unit.
  • DELTA -- The amount of resource being currently consumed, per second of game time. Drain is positive, generation is negative.
  • DELTAINV -- The same, but inverted -- drain is negative, generation is positive.
  • MASS -- Mass of the resource.
  • MAXMASS -- What the mass of the resource would be if the tanks were full.
  • STAGEMASS -- Same as mass, but for current stage only.
  • STAGEMAXMASS -- Same as max mass, but for current stage only.

For example, SYSR_LIQUIDFUEL is the total current amount of LiquidFuel, SYSR_LIQUIDFUELMAX is the maximum possible amount, SYSR_LIQUIDFUELSTAGE is the amount of fuel in current stage, SYSR_LIQUIDFUELSTAGEMAX is the maximum possible amount of fuel in the current stage, SYSR_LIQUIDFUELMASS is the mass of the fuel, etc.

BEWARE: At the time of writing, all the 'STAGE' qualifiers display exactly the same data as the stock resource tab displays when you click the 'stage only' checkbox. When it is wrong, they will also be wrong in the same way. Unfortunately it is known to be at times wrong. Figuring out whether a resource is actually accessible in the current stage in KSP or not is nontrivial.

The name of the resource when addressed as SYSR_ is produced from the system resource name (as given in resources.cfg) converted to upper case, with every space, if any (I'm not sure if any currently published mods have resources with spaces in their names, but just in case) replaced with a -. Underscores will also be replaces with a -, so a resource named Food_TAC will become SYSR_FOOD-TAC.

An alphabetically sorted list of all resources present in the craft is available as well:

  • LISTR_<id>_<qualifier> -- where id's start with 0. There are two separate qualifiers for this form of addressing the resource records:
    • NAME -- A string, the name of the resource that got that number in the alphabetic list.
    • VAL -- current amount of the resource. I.e. to get the current amount of resource number 0 in list, you use LISTR_0_VAL, and LISTR_0_STAGEVAL will give it for the resources in current stage only.

Planetary reference information

There are two sets of these, for the body currently being orbited (ORBITBODY) and for the body currently being targeted, if any (TARGETBODY). The latter set always returns -1 if the target is not a planetary body or if there is no target.

  • ORBITBODYATMOSPHERE -- 1 if the body has an atmosphere, -1 otherwise.
  • ORBITBODYOXYGEN -- 1 if that atmosphere contains oxygen, -1 otherwise.
  • ORBITBODYSCALEHEIGHT -- Atmosphere scale height in kilometers.
  • ORBITBODYSURFACETEMP, ORBITBODYSURFACETEMPKELVIN -- Temperature of the surface of the body in Celsius / Kelvin.
  • ORBITBODYRADIUS -- Radius in meters.
  • ORBITBODYMASS -- Mass in kilograms.
  • ORBITBODYROTATIONPERIOD -- Rotational period in seconds.
  • ORBITBODYSOI -- Radius of the sphere of influence in meters.
  • ORBITBODYGEEASL -- Gravitational acceleration at sea level in g.
  • ORBITBODYGM -- Grav parameter: Gravitational constant G multiplied by mass in kilograms.
  • ORBITBODYINDEX -- The index in the FlightGlobals list that identifies the body.
  • ORBITBODYATMOSPHERETOP -- Altitude of the top edge of atmosphere. Actual atmosphere often peters out slightly below that.
  • ORBITBODYESCAPEVEL -- Escape velocity.
  • ORBITBODYAREA -- Surface area.
  • ORBITBODYSYNCORBITALTITUDE, ORBITBODYSYNCORBITVELOCITY, ORBITBODYSYNCORBITCIRCUMFERENCE -- Parameters of the synchronous orbit around your current body, assuming one fits within it's sphere of influence. If it doesn't, the ALTITUDE will be equal to double.NaN, i.e. print as "NaN".
  • TARGETBODYATMOSPHERE, TARGETBODYOXYGEN, TARGETBODYSCALEHEIGHT, TARGETBODYSURFACETEMP, TARGETBODYSURFACETEMPKELVIN, TARGETBODYRADIUS, TARGETBODYMASS, TARGETBODYROTATIONPERIOD, TARGETBODYSOI, TARGETBODYGEEASL, TARGETBODYGM, TARGETBODYINDEX, TARGETBODYATMOSPHERETOP, TARGETBODYESCAPEVEL, TARGETBODYAREA, TARGETBODYSYNCORBITALTITUDE, TARGETBODYSYNCORBITVELOCITY, TARGETBODYSYNCORBITCIRCUMFERENCE -- Equivalents of the above for the targeted celestial body, always return -1 if the target is not a celestial body of if there's no target.

Protractor

These variables compute planetary transfer values for a celestial target. In case the target is not a celestial body, or when there is no valid orbit, all of those angles and times will be negative.

  • TARGETBODYPHASEANGLE -- Returns the computed phase angle for a body, in degrees. When the phase angle is zero, the planets are aligned for a Hohmann transfer orbit. Returns -1 if the current target is not a planet or moon.
  • TARGETBODYPHASEANGLESECS -- Returns the number of seconds until the phase angle is zero. Returns -1 if the current target is not a planet or moon.
  • TARGETBODYEJECTIONANGLE -- Returns the ejection angle for the vessel, in degrees. When the ejection angle approaches zero, start your transfer burn. Returns -1 when it is not applicable.
  • TARGETBODYEJECTIONANGLESECS -- The number of seconds until the ejection angle is zero. Returns -1 when it is not applicable.
  • TARGETBODYMOONEJECTIONANGLE -- Returns the ejection angle for launching from a moon and using the moon's planet for a gravity assist for transferring to another planet. Returns -1 when not orbiting a moon and not targeting another planet.
  • TARGETBODYEJECTIONALTITUDE -- Returns the altitude above a planet at which the transfer burns needs to start when transferring from a moon.
  • TARGETBODYDELTAV -- An estimate of the delta-V required to intercept the targeted body.

Career variables

  • REPUTATION -- the current value of career mode reputation.
  • FUNDS -- The current value of career mode funds.

Meta-variables

That is, variables relating to the state of KSP itself.

  • ISLOADED_<assembly name> -- Returns 1 if a specific plugin is loaded and 0 otherwise, allowing you to enable or disable and switch around pages based on what functionality is available. The name is in upper case, i.e. MechJeb2.dll is seen as ISLOADED_MECHJEB2. A full list of assemblies loaded into memory and the variable names they will be recognized under is printed into the log during startup.
  • RPMVERSION -- A string containing the current version and build number of RasterPropMonitor.
  • STOREDSTRING_<number> -- Strings recovered from the MODULE definition block of RasterPropMonitorComputer, in order of appearance in the storedStrings configuration parameter, i.e. STOREDSTRING_0, STOREDSTRING_1, etc.
  • TIMEWARPACTIVE -- Returns 1 when any time warp is active, or 0 otherwise.
  • TIMEWARPCURRENT -- Returns the current time warp (1.0 if the craft is not currently warping).
  • TIMEWARPNONPHYSICS -- Returns 1 when on-rails time warp is active, or 0 otherwise.
  • TIMEWARPPHYSICS -- Returns 1 when physics time warp is active, or 0 otherwise.

Per-pod persistent variables may be queried by prefixing the variable's name with PERSISTENT_. Note that names are case-sensitive, so if the persistent variable has lower-case characters, you will need to use lower-case characters in the persistent variable. NOTE: Unlike most variables, if a persistent variable doesn't exist, RPM will return -1 instead of the name of the string.

Plugin state functions can be queried using a query formatted as 'PLUGIN_(PluginModule):(PluginMethod)', such as PLUGIN_JSIParachutes:DeployParachutesState. These queries will return '1' if the state is 'true', '0' if it is false, or '-1' if the method does not exist.

Two pseudo-variables exist. They were originally added for use with math variables (see Custom Variables), but they could conceivably be used almost anywhere a regular variable could be evaluated, except on a monitor page (due to the way these variables are evaluated).

  • MetersToFeet -- A scalar used to convert meters to feet (that is, 3.2808399).
  • MetersPerSecondToKnots -- A scalar used to convert meters per second to knots (that is, 1.94384449).
  • MetersPerSecondToFeetPerMinute -- A scalar to convert m/s to fpm (that is, 196.850394).

Miscellaneous

  • AGMEMO0..AGMEMO9 -- The ten Action Group label variables are parsed out of the vessel description that you can edit while in VAB/SPH. Any line that starts with AG0=,AG1=...AG9= will be parsed and returned as a string to enable you to let the user mark action group switches. If the line contains a | character, the portion of the line before this character will be returned if the action group is active, while the portion of the line after this character will be returned if it is not.
  • AGSTATE0..AGSTATE9 -- Ten Action Group state variables return 1 if the specified action group is 'on' and 0 if it's 'off'. (They actually are 'on' and 'off' even though they often aren't used that way.)
  • BIOMENAME -- The name of the biome the ship is currently in as per science experiment description -- exactly the way MechJeb returns it, because that is where the method originally comes from.
  • BIOMEID -- The same, but reduced to the name of the biome itself, without distinguishing between altitudes and other conditions.
  • EXTERNALTEMPERATURE, EXTERNALTEMPERATUREKELVIN -- The temperature outside of the craft, again in Celsius and Kelvin. This temperature includes thermal heating effects from high speed.
  • AMBIENTTEMPERATURE, AMBIENTTEMPERATUREKELVIN -- The temperature outside of the craft, again in Celsius and Kelvin. This value is not affected by atmospheric heating from high speeds.
  • FLIGHTUIMODE -- Returns 1 if the UI is in the Docking mode, -1 if it's in the Staging mode, 0 if it's in the Orbital mode, i.e. in the map view.
  • GEAR, BRAKES, SAS, LIGHTS, RCS -- Status of the said systems returned as 1 if they are turned on and 0 if they are turned off. To format it in a smooth fashion, use a variation on {0:on;;OFF} format string.
  • ISDOCKINGPORTREFERENCE -- Returns 1 if the current reference transform ('control from here') part is a docking port, 0 otherwise. It cannot normally be 1 unless the user changes it with JSITargetMenu page handler.
  • ISCLAWREFERENCE -- Does the same as above for grappling claws, which also can be reference parts.
  • ISREMOTEREFERENCE -- Returns 1 if the reference part is something other than a pod, like a docking port or a claw. Will still return 0 if it's not the same pod the player is in.
  • LATERALBRAKEDISTANCE -- Returns an estimate of the shortest distance that would be required to shed all lateral speed. This could be useful when trying to make a precision landing. Returns -1 if the estimate can't be made (for instance, if there's 0 thrust available).
  • PERIOD_#HZ -- A periodic variable that switches between 0 and 1 with the period specified in '#'. For instance, PERIOD_2HZ will switch 0-1-0-1 every second. The '#' can be any positive number.
  • PODTEMPERATURE, PODTEMPERATUREKELVIN -- The temperature of the interior of the pod in Celsius and Kelvin, respectively.
  • PODMAXTEMPERATURE, PODMAXTEMPERATUREKELVIN -- The maximum temperature of the pod in Celsius and Kelvin.
  • PODSKINTEMPERATURE, PODSKINTEMPERATUREKELVIN -- the temperature of the exterior of the pod in Celsius and Kelvin, respectively.
  • PODMAXSKINTEMPERATURE, PODMAXSKINTEMPERATUREKELVIN -- the maximum temperature of the exterior of the pod in Celsius and Kelvin, respectively.
  • PRECISIONCONTROL -- Returns 1 if the control inputs are currently in precision mode; 0 otherwise.
  • PODNETFLUX -- The net flux affecting the pod. If this value is negative, the pod is cooling; if it's positive, the pod is warming.
  • HEATSHIELDTEMPERATURE, HEATSHIELDTEMPERATUREKELVIN -- The current temperature of the hottest heat shield on the craft in Celsius and Kelvin.
  • HEATSHIELDTEMPERATUREFLUX -- the net flux on the part hottest heat shield on the craft (to track whether it is heating or cooling).
  • HOTTESTPARTTEMP, HOTTESTPARTMAXTEMP, HOTTESTPARTTEMPRATIO -- The current temperature in K, the max temperature in K, and the temperature ratio (current / max) of the hottest part. The hottest part is the part whose current temperature is closest to its max temperature, when checking both skin temperature and interior temperature.
  • HOTTESTPARTNAME -- The name of the hottest part.
  • HOTTESTENGINETEMP, HOTTESTENGINEMAXTEMP, HOTTESTENGINETEMPRATIO -- The same as HOTTESTPART* above, but only looking at engines (parts with ModuleEngines or ModuleEnginesFX).
  • RANDOM -- A random number between 0 and 1. Useless on itself but may be interesting when used as an input to JSIVariableAnimator.
  • RANDOMNORMAL -- A Box-Muller approximation of a normal distribution with a mean 0 and stddev 1. For practical purposes, this value returns a value in the range (-7, +7).
  • PERIODRANDOM_# -- A random number between 0 and 1 that is only updated every '#' update ticks, where '#' must be an integer.
  • SCIENCECOUNT -- Number of experiments stored in the vessel.
  • SCIENCEDATA -- Amount of science data in Mits stored in the entire vessel.
  • SITUATION -- Current vessel situation, i.e "flying", "orbiting", etc. A predefined string.
  • SLOPEANGLE -- The angle between the normal vector of the surface and vertical, i.e. how high would your pitch be if your vertically-oriented ship landed there. Always positive when it's known. Returns -1 if it isn't, so you can hide the output.
  • SPEEDDISPLAYMODE -- Current state of the global FlightUI speed display mode (the surface/orbit/target switch in GUI and in IVA). Affects what the prograde/retrograde markers on the navball actually mean. Returns 1 if the mode is Orbit, 0 if the mode is Surface, and -1 if the mode is Target, i.e. to display it, you can use {0:ORB;TGT;SRF} or something to that effect.
  • STAGE -- Number of current stage.
  • STAGEREADY -- 1 when the next stage can be separated right now, 0 otherwise.
  • SUICIDEBURNSTARTSECS -- An estimate of how many seconds remain before you need to burn retrograde at full thrust to avoid lithobraking. Returns NaN if your periapsis is positive or the equation otherwise can't be solved.
  • TIMETOIMPACTSECS -- A very, very rough estimate of the time of contact with the ground, provided no further thrust is applied. Does not take atmosphere or slamming into the side of a mountain into consideration, nor does it account for the fact planets are round. Should still be useful. Returns -1 if you aren't falling down yet.

Compound conditions

Mostly, these variables exist to express reasonable compounds of variables which are commonly requested, originally to prevent the need for making an actual logical/arithmetic expression parser. Most of them are devised to be used for alarms using JSIVariableAnimator.

To make it easier for IVA developers to customize their indicators, one can create Custom Variables, Mapped Variables, and Math Variables. Please refer to their documentation page Custom Variables for more detail.

  • CUSTOM_ -- A prefix for user-defined Custom Variables.
  • MAPPED_ -- A prefix for user-defined Mapped Variables.
  • MATH_ -- A prefix for user-defined Math Variables
  • GEARALARM -- Returns 1 if radar altitude is less than 100m, vertical speed is negative, and gear is not extended.
  • GROUNDPROXIMITYALARM -- Returns 1 if, in the time remaining until ground impact, at maximum possible current acceleration, it is impossible to produce a ground impact speed lower than 10m/s.
  • ALTITUDEALARM -- Returns 1 if vertical speed is negative and radar altitude is less than 150m.
  • TUMBLEALARM -- Returns 1 if vertical speed is negative, radar altitude is less than 100m and horizontal velocity is higher than 5m/s -- so you're in danger of tumbling when you actually do land.
  • SLOPEALARM -- Returns 1 if vertical speed is negative, radar altitude is less than 100m, and ground slope is higher than 15 degrees.
  • DOCKINGANGLEALARM -- Returns 1 if the target is a docking node, it's 10m away or closer, you're approaching the target, and it's X and Y deviation angles are higher than 1.5 degrees.
  • DOCKINGSPEEDALARM -- Returns 1 if the target is a docking node, it's 15m away or closer and you're approaching the target faster than at 2.5m/s.
  • ENGINEOVERHEATALARM -- Returns 1 if any of the currently enabled engines has a temperature that is 0.9 of it's explosion temperature or higher. (For reference, MechJeb limits the thrust when engines heat up to 0.95)
  • ENGINEFLAMEOUTALARM -- Returns 1 if any of the current enabled engines have flamed out (either an air-breather that has no air, or an engine that's out of fuel).
  • PODTEMPERATUREALARM -- Returns 1 if the temperature of the pod itself is over 85% of it's maximum temperature, 0 if it's over 75%, and -1 otherwise.
  • IMPACTALARM -- Returns 1 if the current surface velocity exceeds the pod's crashTolerance rating. By itself, it's not useful (it'll be true in orbit, for instance) - this alarm value is intended to be used in a CUSTOM_ compound variable.