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
nullwithout an impact.- Return type:
Trajectories.Patchornull- Game Scenes:
Flight
- Trajectories.impactPosition(referenceFrame)#
The position of the impact, or
nullwithout one.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the position.
- Return type:
[number, number, number]ornull- 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
nullwithout one.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the velocity.
- Return type:
[number, number, number]ornull- 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:
ArrayofTrajectories.Patch- Game Scenes:
Flight
- Trajectories.plannedDirection(referenceFrame)#
The direction that the descent profile sets for the vessel.
- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the direction.
- Returns:
The direction, or
nullwithout a target.- Return type:
[number, number, number]ornull- Game Scenes:
Flight
- Trajectories.correctedDirection(referenceFrame)#
The
Trajectories.plannedDirection(), corrected to steer towards the target.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the direction.
- Returns:
The direction, or
nullwithout a target.- Return type:
[number, number, number]ornull- 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.CelestialBodyornull) – The body of the target, by default the body the active vessel orbits.
- Game Scenes:
Flight
- Trajectories.getTargetBody()#
The body of the target, or
nullwithout a target.- Property:
Read-only, cannot be set
- Return type:
SpaceCenter.CelestialBodyornull- Game Scenes:
Flight
- Trajectories.targetPosition(referenceFrame)#
The position of the target, or
nullwithout a target.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the position.
- Return type:
[number, number, number]ornull- Game Scenes:
Flight
- Trajectories.clearTarget()#
Clears the target.
- Game Scenes:
Flight
- Trajectories.getDescentProfile()#
The descent profile.
- Property:
Read-only, cannot be set
- Return type:
- 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