Service#

class Trajectories#

Provides functionality to interact with Trajectories.

Note

Trajectories predicts the trajectory of the active vessel only.

bool Available { get; }#

Whether Trajectories is available.

Game Scenes:

All

Patch ImpactPatch ()#

The patch of the trajectory that ends in an impact.

Returns:

The patch, or null without an impact.

Game Scenes:

Flight

Tuple<double, double, double> ImpactPosition (SpaceCenter.ReferenceFrame referenceFrame)#

The position of the impact, or null without one.

Parameters:
  • referenceFrame – The reference frame for the position.

Game Scenes:

Flight

Note

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

Tuple<double, double, double> ImpactVelocity (SpaceCenter.ReferenceFrame referenceFrame)#

The velocity at the impact, or null without one.

Parameters:
  • referenceFrame – The reference frame for the velocity.

Game Scenes:

Flight

Note

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

IList<Patch> Patches ()#

The patches of the trajectory.

Game Scenes:

Flight

Tuple<double, double, double> PlannedDirection (SpaceCenter.ReferenceFrame referenceFrame)#

The direction that the descent profile sets for the vessel.

Parameters:
  • referenceFrame – The reference frame for the direction.

Returns:

The direction, or null without a target.

Game Scenes:

Flight

Tuple<double, double, double> CorrectedDirection (SpaceCenter.ReferenceFrame referenceFrame)#

The Trajectories.PlannedDirection, corrected to steer towards the target.

Parameters:
  • referenceFrame – The reference frame for the direction.

Returns:

The direction, or null without a target.

Game Scenes:

Flight

Note

Suitable as the target direction of the auto-pilot.

void SetTarget (SpaceCenter.ReferenceFrame referenceFrame, Tuple<double, double, double> position, SpaceCenter.CelestialBody body = null)#

Sets the target.

Parameters:
  • referenceFrame – 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.

Game Scenes:

Flight

SpaceCenter.CelestialBody TargetBody { get; }#

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

Game Scenes:

Flight

Tuple<double, double, double> TargetPosition (SpaceCenter.ReferenceFrame referenceFrame)#

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

Parameters:
  • referenceFrame – The reference frame for the position.

Game Scenes:

Flight

void ClearTarget ()#

Clears the target.

Game Scenes:

Flight

DescentProfile DescentProfile { get; }#

The descent profile.

Game Scenes:

Flight

bool AlwaysUpdate { get; set; }#

Whether Trajectories updates the trajectory continuously.

Game Scenes:

Flight

Note

When false, Trajectories.UpdateTrajectory updates the trajectory.

void UpdateTrajectory ()#

Updates the trajectory.

Game Scenes:

Flight