API String

Richard Bunt edited this page Jul 5, 2015 · 10 revisions

API strings are used to identify values or functions within KSP, such as v.altitude which is mapped to the altitude of the vessel you are currently flying. The API strings which are currently supported are listed below.

p.paused

  • Returns an integer indicating the state of antenna. 0 - Flight scene; 1 - Paused; 2 - No power; 3 - Off; 4 - Not found.
  • Plotable

v.setYaw

  • Yaw [float yaw]
  • Not Plotable

v.setPitch

  • Pitch [float pitch]
  • Not Plotable

v.setRoll

  • Roll [float roll]
  • Not Plotable

v.setFbW

  • Set Fly by Wire On or Off [int state]
  • Not Plotable

v.setPitchYawRollXYZ

  • Set pitch, yaw, roll, X, Y and Z [float pitch, yaw, roll, x, y, z]
  • Not Plotable

v.setAttitude

  • Set pitch, yaw, roll [float pitch, yaw, roll]
  • Not Plotable

v.setTranslation

  • Set X, Y and Z [float x, y, z]
  • Not Plotable

f.stage

  • Stage
  • Not Plotable

f.setThrottle

  • Set Throttle [float magnitude]
  • Not Plotable

f.throttle

  • Throttle
  • Plotable

f.throttleUp

  • Throttle Up
  • Not Plotable

f.throttleZero

  • Throttle Zero
  • Not Plotable

f.throttleFull

  • Throttle Full
  • Not Plotable

f.throttleDown

  • Throttle Down
  • Not Plotable

f.rcs

  • RCS [optional bool on/off]
  • Not Plotable

f.sas

  • SAS [optional bool on/off]
  • Not Plotable

f.light

  • Light [optional bool on/off]
  • Not Plotable

f.gear

  • Gear [optional bool on/off]
  • Not Plotable

f.brake

  • Brake [optional bool on/off]
  • Not Plotable

f.abort

  • Abort [optional bool on/off]
  • Not Plotable

f.ag1

  • Action Group 1 [optional bool on/off]
  • Not Plotable

f.ag2

  • Action Group 2 [optional bool on/off]
  • Not Plotable

f.ag3

  • Action Group 3 [optional bool on/off]
  • Not Plotable

f.ag4

  • Action Group 4 [optional bool on/off]
  • Not Plotable

f.ag5

  • Action Group 5 [optional bool on/off]
  • Not Plotable

f.ag6

  • Action Group 6 [optional bool on/off]
  • Not Plotable

f.ag7

  • Action Group 7 [optional bool on/off]
  • Not Plotable

f.ag8

  • Action Group 8 [optional bool on/off]
  • Not Plotable

f.ag9

  • Action Group 9 [optional bool on/off]
  • Not Plotable

f.ag10

  • Action Group 10 [optional bool on/off]
  • Not Plotable

v.rcsValue

  • Query RCS value
  • Plotable

v.sasValue

  • Query SAS value
  • Plotable

v.lightValue

  • Query light value
  • Plotable

v.brakeValue

  • Query brake value
  • Plotable

v.gearValue

  • Query gear value
  • Plotable

mj.smartassoff

  • Smart ASS Off
  • Not Plotable

mj.node

  • Node
  • Not Plotable

mj.prograde

  • Prograde
  • Not Plotable

mj.retrograde

  • Retrograde
  • Not Plotable

mj.normalplus

  • Normal Plus
  • Not Plotable

mj.normalminus

  • Normal Minus
  • Not Plotable

mj.radialplus

  • Radial Plus
  • Not Plotable

mj.radialminus

  • Radial Minus
  • Not Plotable

mj.targetplus

  • Target Plus
  • Not Plotable

mj.targetminus

  • Target Minus
  • Not Plotable

mj.relativeplus

  • Relative Plus
  • Not Plotable

mj.relativeminus

  • Relative Minus
  • Not Plotable

mj.parallelplus

  • Parallel Plus
  • Not Plotable

mj.parallelminus

  • Parallel Minus
  • Not Plotable

mj.surface

  • Surface [float heading, float pitch]
  • Not Plotable

mj.surface2

  • Surface [double heading, double pitch, double roll]
  • Not Plotable

t.timeWarp

  • Time Warp [int rate]
  • Not Plotable

t.universalTime

  • Universal Time
  • Plotable

t.pause

  • Pause game
  • Not Plotable

t.unpause

  • Unpause game
  • Not Plotable

tar.name

  • Target Name
  • Plotable

tar.type

  • Target Type
  • Plotable

tar.distance

  • Target Distance
  • Plotable

tar.o.relativeVelocity

  • Target Relative Velocity
  • Plotable

tar.o.velocity

  • Target Velocity
  • Plotable

tar.o.PeA

  • Target Periapsis
  • Plotable

tar.o.ApA

  • Target Apoapsis
  • Plotable

tar.o.timeToAp

  • Target Time to Apoapsis
  • Plotable

tar.o.timeToPe

  • Target Time to Periapsis
  • Plotable

tar.o.inclination

  • Target Inclination
  • Plotable

tar.o.eccentricity

  • Target Eccentricity
  • Plotable

tar.o.period

  • Target Orbital Period
  • Plotable

tar.o.argumentOfPeriapsis

  • Target Argument of Periapsis
  • Plotable

tar.o.timeToTransition1

  • Target Time to Transition 1
  • Plotable

tar.o.timeToTransition2

  • Target Time to Transition 2
  • Plotable

tar.o.sma

  • Target Semimajor Axis
  • Plotable

tar.o.lan

  • Target Longitude of Ascending Node
  • Plotable

tar.o.maae

  • Target Mean Anomaly at Epoch
  • Plotable

tar.o.timeOfPeriapsisPassage

  • Target Time of Periapsis Passage
  • Plotable

tar.o.trueAnomaly

  • Target True Anomaly
  • Plotable

tar.o.orbitingBody

  • Target Orbiting Body
  • Plotable

o.relativeVelocity

  • Relative Velocity
  • Plotable

o.PeA

  • Periapsis
  • Plotable

o.ApA

  • Apoapsis
  • Plotable

o.timeToAp

  • Time to Apoapsis
  • Plotable

o.timeToPe

  • Time to Periapsis
  • Plotable

o.inclination

  • Inclination
  • Plotable

o.eccentricity

  • Eccentricity
  • Plotable

o.epoch

  • Epoch
  • Plotable

o.period

  • Orbital Period
  • Plotable

o.argumentOfPeriapsis

  • Argument of Periapsis
  • Plotable

o.timeToTransition1

  • Time to Transition 1
  • Plotable

o.timeToTransition2

  • Time to Transition 2
  • Plotable

o.sma

  • Semimajor Axis
  • Plotable

o.lan

  • Longitude of Ascending Node
  • Plotable

o.maae

  • Mean Anomaly at Epoch
  • Plotable

o.timeOfPeriapsisPassage

  • Time of Periapsis Passage
  • Plotable

o.trueAnomaly

  • True Anomaly
  • Plotable

s.sensor

  • Sensor Information [string sensor type]
  • Plotable

s.sensor.temp

  • Temperature sensor information
  • Plotable

s.sensor.pres

  • Pressure sensor information
  • Plotable

s.sensor.grav

  • Gravity sensor information
  • Plotable

s.sensor.acc

  • Acceleration sensor information
  • Plotable

v.altitude

  • Altitude
  • Plotable

v.heightFromTerrain

  • Height from Terrain
  • Plotable

v.terrainHeight

  • Terrain Height
  • Plotable

v.missionTime

  • Mission Time
  • Plotable

v.surfaceVelocity

  • Surface Velocity
  • Plotable

v.surfaceVelocityx

  • Surface Velocity x
  • Plotable

v.surfaceVelocityy

  • Surface Velocity y
  • Plotable

v.surfaceVelocityz

  • Surface Velocity z
  • Plotable

v.angularVelocity

  • Angular Velocity
  • Plotable

v.orbitalVelocity

  • Orbital Velocity
  • Plotable

v.surfaceSpeed

  • Surface Speed
  • Plotable

v.verticalSpeed

  • Vertical Speed
  • Plotable

v.geeForce

  • G-Force
  • Plotable

v.atmosphericDensity

  • Atmospheric Density
  • Plotable

v.long

  • Longitude
  • Plotable

v.lat

  • Latitude
  • Plotable

v.dynamicPressure

  • Dynamic Pressure
  • Plotable

v.name

  • Name
  • Plotable

v.body

  • Body Name
  • Plotable

v.angleToPrograde

  • Angle to Prograde
  • Plotable

b.name

  • Body Name [body id]
  • Plotable

b.maxAtmosphere

  • Body Atmosphere Depth [body id]
  • Plotable

b.radius

  • Body Radius [body id]
  • Plotable

b.atmosphereContainsOxygen

  • Atmosphere contains oxygen [body id]
  • Plotable

b.soi

  • Body Sphere of Influence [body id]
  • Plotable

b.rotationPeriod

  • Rotation Period [body id]
  • Plotable

b.tidallyLocked

  • Tidally Locked [body id]
  • Plotable

b.number

  • Number of Bodies
  • Plotable

b.o.gravParameter

  • Body Gravitational Parameter [body id]
  • Plotable

b.o.relativeVelocity

  • Relative Velocity [body id]
  • Plotable

b.o.PeA

  • Periapsis [body id]
  • Plotable

b.o.ApA

  • Apoapsis [body id]
  • Plotable

b.o.timeToAp

  • Time to Apoapsis [body id]
  • Plotable

b.o.timeToPe

  • Time to Periapsis [body id]
  • Plotable

b.o.inclination

  • Inclination [body id]
  • Plotable

b.o.eccentricity

  • Eccentricity [body id]
  • Plotable

b.o.period

  • Orbital Period [body id]
  • Plotable

b.o.argumentOfPeriapsis

  • Argument of Periapsis [body id]
  • Plotable

b.o.timeToTransition1

  • Time to Transition 1 [body id]
  • Plotable

b.o.timeToTransition2

  • Time to Transition 2 [body id]
  • Plotable

b.o.sma

  • Semimajor Axis [body id]
  • Plotable

b.o.lan

  • Longitude of Ascending Node [body id]
  • Plotable

b.o.maae

  • Mean Anomaly at Epoch [body id]
  • Plotable

b.o.timeOfPeriapsisPassage

  • Time of Periapsis Passage [body id]
  • Plotable

b.o.trueAnomaly

  • True Anomaly [body id]
  • Plotable

b.o.phaseAngle

  • Phase Angle [body id]
  • Plotable

r.resource

  • Resource Information [string resource type]
  • Not Plotable

r.resourceCurrent

  • Resource Information for Current Stage [string resource type]
  • Not Plotable

r.resourceCurrentMax

  • Max Resource Information for Current Stage [string resource type]
  • Not Plotable

r.resourceMax

  • Max Resource Information [string resource type]
  • Not Plotable

a.api

  • API Listing
  • Not Plotable

a.ip

  • IP Addresses
  • Not Plotable

a.apiSubSet

  • Subset of the API Listing [string api1, string api2, ... , string apiN]
  • Not Plotable

a.version

  • Telemachus Version
  • Plotable

n.heading2

  • Heading
  • Plotable

n.pitch2

  • Pitch
  • Plotable

n.roll2

  • Roll
  • Plotable

n.rawheading2

  • Raw Heading
  • Plotable

n.rawpitch2

  • Raw Pitch
  • Plotable

n.rawroll2

  • Raw Roll
  • Plotable

n.heading

  • Heading calculated using the position of the vessels root part
  • Plotable

n.pitch

  • Pitch calculated using the position of the vessels root part
  • Plotable

n.roll

  • Roll calculated using the position of the vessels root part
  • Plotable

n.rawheading

  • Raw Heading calculated using the position of the vessels root part
  • Plotable

n.rawpitch

  • Raw Pitch calculated using the position of the vessels root part
  • Plotable

n.rawroll

  • Raw Roll calculated using the position of the vessels root part
  • Plotable

m.toggleMapView

  • Toggle Map View
  • Not Plotable

m.enterMapView

  • Enter Map View
  • Not Plotable

m.exitMapView

  • Exit Map View
  • Not Plotable

dock.ax

  • Docking x Angle
  • Plotable

dock.ay

  • Relative Pitch Angle
  • Plotable

dock.az

  • Docking z Angle
  • Plotable

dock.x

  • Target x Distance
  • Plotable

dock.y

  • Target y Distance
  • Plotable