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 null without one.

Arguments:
Return type:

[number, number, number] or null

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 null without one.

Arguments:
Return type:

[number, number, number] or null

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:

SpaceCenter.CelestialBody

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 null for a patch in space.

Arguments:
Return type:

Array of [number, number, number, number] or null

Game Scenes:

Flight

Note

Each point is a tuple (ut, x, y, z). In a reference frame that rotates with Trajectories.Patch.getBody(), the positions include the rotation of the body until each point.

Patch.getOrbitalTrajectory()#

The orbit of a patch in space, or null for an atmospheric patch.

Property:

Read-only, cannot be set

Return type:

SpaceCenter.Orbit or null

Game Scenes:

Flight