Service#

Provides functionality to interact with Trajectories.

Note

Trajectories predicts the trajectory of the active vessel only.

Trajectories.getAvailable()#

Whether Trajectories is available.

Property:

Read-only, cannot be set

Return type:

boolean

Trajectories.impactPatch()#

The patch of the trajectory that ends in an impact.

Returns:

The patch, or null without an impact.

Return type:

Trajectories.Patch or null

Game Scenes:

Flight

Trajectories.impactPosition(referenceFrame)#

The position of the impact, or null without one.

Arguments:
Return type:

[number, number, number] or null

Game Scenes:

Flight

Note

In a reference frame that rotates with the body, the position includes the rotation of the body until the impact.

Trajectories.impactVelocity(referenceFrame)#

The velocity at the impact, or null without one.

Arguments:
Return type:

[number, number, number] or null

Game Scenes:

Flight

Note

In a reference frame that rotates with the body, the velocity includes the rotation of the body until the impact.

Trajectories.patches()#

The patches of the trajectory.

Return type:

Array of Trajectories.Patch

Game Scenes:

Flight

Trajectories.plannedDirection(referenceFrame)#

The direction that the descent profile sets for the vessel.

Arguments:
Returns:

The direction, or null without a target.

Return type:

[number, number, number] or null

Game Scenes:

Flight

Trajectories.correctedDirection(referenceFrame)#

The Trajectories.plannedDirection(), corrected to steer towards the target.

Arguments:
Returns:

The direction, or null without a target.

Return type:

[number, number, number] or null

Game Scenes:

Flight

Note

Suitable as the target direction of the auto-pilot.

Trajectories.setTarget(referenceFrame, position[, body])#

Sets the target.

Arguments:
  • referenceFrame (SpaceCenter.ReferenceFrame) – The reference frame for the position.

  • position ([number, number, number]) – The position of the target.

  • body (SpaceCenter.CelestialBody or null) – The body of the target, by default the body the active vessel orbits.

Game Scenes:

Flight

Trajectories.getTargetBody()#

The body of the target, or null without a target.

Property:

Read-only, cannot be set

Return type:

SpaceCenter.CelestialBody or null

Game Scenes:

Flight

Trajectories.targetPosition(referenceFrame)#

The position of the target, or null without a target.

Arguments:
Return type:

[number, number, number] or null

Game Scenes:

Flight

Trajectories.clearTarget()#

Clears the target.

Game Scenes:

Flight

Trajectories.getDescentProfile()#

The descent profile.

Property:

Read-only, cannot be set

Return type:

Trajectories.DescentProfile

Game Scenes:

Flight

Trajectories.getAlwaysUpdate()#
Trajectories.setAlwaysUpdate(value)#

Whether Trajectories updates the trajectory continuously.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

Note

When false, Trajectories.updateTrajectory() updates the trajectory.

Trajectories.updateTrajectory()#

Updates the trajectory.

Game Scenes:

Flight