.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.Trajectories Service ======= .. type:: public class Trajectories Provides functionality to interact with Trajectories. .. note:: Trajectories predicts the trajectory of the active vessel only. .. method:: boolean getAvailable() Whether Trajectories is available. .. method:: Patch impactPatch() The patch of the trajectory that ends in an impact. :returns: The patch, or ``null`` without an impact. :Game Scenes: Flight .. method:: org.javatuples.Triplet impactPosition(SpaceCenter.ReferenceFrame referenceFrame) The position of the impact, or ``null`` without one. :param SpaceCenter.ReferenceFrame 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. .. method:: org.javatuples.Triplet impactVelocity(SpaceCenter.ReferenceFrame referenceFrame) The velocity at the impact, or ``null`` without one. :param SpaceCenter.ReferenceFrame 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. .. method:: java.util.List patches() The patches of the trajectory. :Game Scenes: Flight .. method:: org.javatuples.Triplet plannedDirection(SpaceCenter.ReferenceFrame referenceFrame) The direction that the descent profile sets for the vessel. :param SpaceCenter.ReferenceFrame referenceFrame: The reference frame for the direction. :returns: The direction, or ``null`` without a target. :Game Scenes: Flight .. method:: org.javatuples.Triplet correctedDirection(SpaceCenter.ReferenceFrame referenceFrame) The :meth:`Trajectories.plannedDirection(SpaceCenter.ReferenceFrame)`, corrected to steer towards the target. :param SpaceCenter.ReferenceFrame 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. .. method:: void setTarget(SpaceCenter.ReferenceFrame referenceFrame, org.javatuples.Triplet position, SpaceCenter.CelestialBody body) Sets the target. :param SpaceCenter.ReferenceFrame referenceFrame: The reference frame for the position. :param org.javatuples.Triplet position: The position of the target. :param SpaceCenter.CelestialBody body: The body of the target, by default the body the active vessel orbits. :Game Scenes: Flight .. method:: SpaceCenter.CelestialBody getTargetBody() The body of the target, or ``null`` without a target. :Game Scenes: Flight .. method:: org.javatuples.Triplet targetPosition(SpaceCenter.ReferenceFrame referenceFrame) The position of the target, or ``null`` without a target. :param SpaceCenter.ReferenceFrame referenceFrame: The reference frame for the position. :Game Scenes: Flight .. method:: void clearTarget() Clears the target. :Game Scenes: Flight .. method:: DescentProfile getDescentProfile() The descent profile. :Game Scenes: Flight .. method:: boolean getAlwaysUpdate() .. method:: void setAlwaysUpdate(boolean value) Whether Trajectories updates the trajectory continuously. :Game Scenes: Flight .. note:: When ``false``, :meth:`Trajectories.updateTrajectory()` updates the trajectory. .. method:: void updateTrajectory() Updates the trajectory. :Game Scenes: Flight