Patch#
- public class Patch#
A patch of the trajectory, at its position in
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.
- org.javatuples.Triplet<Double, Double, Double> position(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
Patch.getBody(), the position includes the rotation of the body until the impact.
- org.javatuples.Triplet<Double, Double, Double> velocity(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
Patch.getBody(), the velocity includes the rotation of the body until the impact.
- SpaceCenter.CelestialBody getBody()#
The celestial body that the patch is relative to.
- Game Scenes:
Flight
- double getStartUT()#
The universal time at the start of the patch, in seconds.
- Game Scenes:
Flight
- 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.
- boolean getAtmospheric()#
Whether the patch is inside an atmosphere.
- Game Scenes:
Flight
- java.util.List<org.javatuples.Quartet<Double, Double, Double, Double>> atmosphericTrajectory(SpaceCenter.ReferenceFrame referenceFrame)#
The points of an atmospheric patch, or
nullfor a patch in space.- Parameters:
referenceFrame (
SpaceCenter.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 withPatch.getBody(), the positions include the rotation of the body until each point.
- SpaceCenter.Orbit getOrbitalTrajectory()#
The orbit of a patch in space, or
nullfor an atmospheric patch.- Game Scenes:
Flight