Service#
Provides functionality to interact with Trajectories.
Note
Trajectories predicts the trajectory of the active vessel only.
-
Trajectories.available:
boolean# Whether Trajectories is available.
- Attribute:
Read-only, cannot be set
-
staticmethod Trajectories.impact_patch():
Trajectories.Patch|nil# The patch of the trajectory that ends in an impact.
- Returns:
The patch, or
nilwithout an impact.
-
staticmethod Trajectories.impact_position(reference_frame:
SpaceCenter.ReferenceFrame):Tuple|nil# The position of the impact, or
nilwithout one.- Parameters:
reference_frame – The reference frame for the position.
Note
In a reference frame that rotates with the body, the position includes the rotation of the body until the impact.
-
staticmethod Trajectories.impact_velocity(reference_frame:
SpaceCenter.ReferenceFrame):Tuple|nil# The velocity at the impact, or
nilwithout one.- Parameters:
reference_frame – The reference frame for the velocity.
Note
In a reference frame that rotates with the body, the velocity includes the rotation of the body until the impact.
-
staticmethod Trajectories.patches():
List# The patches of the trajectory.
-
staticmethod Trajectories.planned_direction(reference_frame:
SpaceCenter.ReferenceFrame):Tuple|nil# The direction that the descent profile sets for the vessel.
- Parameters:
reference_frame – The reference frame for the direction.
- Returns:
The direction, or
nilwithout a target.
-
staticmethod Trajectories.corrected_direction(reference_frame:
SpaceCenter.ReferenceFrame):Tuple|nil# The
Trajectories.planned_direction(), corrected to steer towards the target.- Parameters:
reference_frame – The reference frame for the direction.
- Returns:
The direction, or
nilwithout a target.
Note
Suitable as the target direction of the auto-pilot.
-
staticmethod Trajectories.set_target(
reference_frame:SpaceCenter.ReferenceFrame,
position:Tuple,
body?:SpaceCenter.CelestialBody|Types.none
)# Sets the target.
- Parameters:
reference_frame – The reference frame for the position.
position – The position of the target.
body – The body of the target, by default the body the active vessel orbits.
-
Trajectories.target_body:
SpaceCenter.CelestialBody|nil# The body of the target, or
nilwithout a target.- Attribute:
Read-only, cannot be set
-
staticmethod Trajectories.target_position(reference_frame:
SpaceCenter.ReferenceFrame):Tuple|nil# The position of the target, or
nilwithout a target.- Parameters:
reference_frame – The reference frame for the position.
- staticmethod Trajectories.clear_target()#
Clears the target.
-
Trajectories.descent_profile:
Trajectories.DescentProfile# The descent profile.
- Attribute:
Read-only, cannot be set
-
Trajectories.always_update:
boolean# Whether Trajectories updates the trajectory continuously.
- Attribute:
Can be read or written
Note
When
False,Trajectories.update_trajectory()updates the trajectory.
- staticmethod Trajectories.update_trajectory()#
Updates the trajectory.