Service#
- public class Trajectories#
Provides functionality to interact with Trajectories.
Note
Trajectories predicts the trajectory of the active vessel only.
- boolean getAvailable()#
Whether Trajectories is available.
- Patch impactPatch()#
The patch of the trajectory that ends in an impact.
- Returns:
The patch, or
nullwithout an impact.- Game Scenes:
Flight
- org.javatuples.Triplet<Double, Double, Double> impactPosition(SpaceCenter.ReferenceFrame referenceFrame)#
The position of the impact, or
nullwithout one.- Parameters:
referenceFrame (
SpaceCenter.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.
- org.javatuples.Triplet<Double, Double, Double> impactVelocity(SpaceCenter.ReferenceFrame referenceFrame)#
The velocity at the impact, or
nullwithout one.- Parameters:
referenceFrame (
SpaceCenter.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.
- org.javatuples.Triplet<Double, Double, Double> plannedDirection(SpaceCenter.ReferenceFrame referenceFrame)#
The direction that the descent profile sets for the vessel.
- Parameters:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the direction.
- Returns:
The direction, or
nullwithout a target.- Game Scenes:
Flight
- org.javatuples.Triplet<Double, Double, Double> correctedDirection(SpaceCenter.ReferenceFrame referenceFrame)#
The
Trajectories.plannedDirection(SpaceCenter.ReferenceFrame), corrected to steer towards the target.- Parameters:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the direction.
- Returns:
The direction, or
nullwithout a target.- Game Scenes:
Flight
Note
Suitable as the target direction of the auto-pilot.
- void setTarget(SpaceCenter.ReferenceFrame referenceFrame, org.javatuples.Triplet<Double, Double, Double> position, SpaceCenter.CelestialBody body)#
Sets the target.
- Parameters:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the position.position (
org.javatuples.Triplet<Double,Double,Double>) – The position of the target.body (
SpaceCenter.CelestialBody) – The body of the target, by default the body the active vessel orbits.
- Game Scenes:
Flight
- SpaceCenter.CelestialBody getTargetBody()#
The body of the target, or
nullwithout a target.- Game Scenes:
Flight
- org.javatuples.Triplet<Double, Double, Double> targetPosition(SpaceCenter.ReferenceFrame referenceFrame)#
The position of the target, or
nullwithout a target.- Parameters:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the position.
- Game Scenes:
Flight
- void clearTarget()#
Clears the target.
- Game Scenes:
Flight
- DescentProfile getDescentProfile()#
The descent profile.
- Game Scenes:
Flight
- boolean getAlwaysUpdate()#
- void setAlwaysUpdate(boolean value)#
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