.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.Trajectories Patch ===== .. type:: public class Patch A patch of the trajectory, at its position in :meth:`Trajectories.patches()`. .. note:: Trajectories computes the trajectory again as the vessel flies, and the patch reads the latest one. Throws an exception if the trajectory has fewer patches. .. method:: org.javatuples.Triplet position(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 :meth:`Patch.getBody()`, the position includes the rotation of the body until the impact. .. method:: org.javatuples.Triplet velocity(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 :meth:`Patch.getBody()`, the velocity includes the rotation of the body until the impact. .. method:: SpaceCenter.CelestialBody getBody() The celestial body that the patch is relative to. :Game Scenes: Flight .. method:: double getStartUT() The universal time at the start of the patch, in seconds. :Game Scenes: Flight .. method:: double getEndUT() The universal time at the end of the patch, in seconds. :Game Scenes: Flight .. note:: For a patch that ends in an impact, this is the time of the impact. .. method:: boolean getAtmospheric() Whether the patch is inside an atmosphere. :Game Scenes: Flight .. method:: java.util.List> atmosphericTrajectory(SpaceCenter.ReferenceFrame referenceFrame) The points of an atmospheric patch, or ``null`` for a patch in space. :param SpaceCenter.ReferenceFrame referenceFrame: The reference frame for the positions. :Game Scenes: Flight .. note:: Each point is a tuple ``(ut, x, y, z)``. In a reference frame that rotates with :meth:`Patch.getBody()`, the positions include the rotation of the body until each point. .. method:: SpaceCenter.Orbit getOrbitalTrajectory() The orbit of a patch in space, or ``null`` for an atmospheric patch. :Game Scenes: Flight