Patch#
- class Trajectories.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.
- Patch.position(referenceFrame)#
The position of the impact, or
nullwithout one.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the position.
- Return type:
[number, number, number]ornull- Game Scenes:
Flight
Note
In a reference frame that rotates with
Trajectories.Patch.getBody(), the position includes the rotation of the body until the impact.
- Patch.velocity(referenceFrame)#
The velocity at the impact, or
nullwithout one.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the velocity.
- Return type:
[number, number, number]ornull- Game Scenes:
Flight
Note
In a reference frame that rotates with
Trajectories.Patch.getBody(), the velocity includes the rotation of the body until the impact.
- Patch.getBody()#
The celestial body that the patch is relative to.
- Property:
Read-only, cannot be set
- Return type:
- Game Scenes:
Flight
- Patch.getStartUT()#
The universal time at the start of the patch, in seconds.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Patch.getEndUT()#
The universal time at the end of the patch, in seconds.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
Note
For a patch that ends in an impact, this is the time of the impact.
- Patch.getAtmospheric()#
Whether the patch is inside an atmosphere.
- Property:
Read-only, cannot be set
- Return type:
boolean- Game Scenes:
Flight
- Patch.atmosphericTrajectory(referenceFrame)#
The points of an atmospheric patch, or
nullfor a patch in space.- Arguments:
referenceFrame (
SpaceCenter.ReferenceFrame) – The reference frame for the positions.
- Return type:
Arrayof[number, number, number, number]ornull- Game Scenes:
Flight
Note
Each point is a tuple
(ut, x, y, z). In a reference frame that rotates withTrajectories.Patch.getBody(), the positions include the rotation of the body until each point.
- Patch.getOrbitalTrajectory()#
The orbit of a patch in space, or
nullfor an atmospheric patch.- Property:
Read-only, cannot be set
- Return type:
SpaceCenter.Orbitornull- Game Scenes:
Flight