Patch#

class Patch#

A patch of the trajectory, at its position in 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.

position(reference_frame)#

The position of the impact, or None without one.

Parameters:

reference_frame (SpaceCenter.ReferenceFrame) – The reference frame for the position.

Return type:

tuple(float, float, float) or None

Game Scenes:

Flight

Note

In a reference frame that rotates with Patch.body, the position includes the rotation of the body until the impact.

velocity(reference_frame)#

The velocity at the impact, or None without one.

Parameters:

reference_frame (SpaceCenter.ReferenceFrame) – The reference frame for the velocity.

Return type:

tuple(float, float, float) or None

Game Scenes:

Flight

Note

In a reference frame that rotates with Patch.body, the velocity includes the rotation of the body until the impact.

body#

The celestial body that the patch is relative to.

Attribute:

Read-only, cannot be set

Return type:

SpaceCenter.CelestialBody

Game Scenes:

Flight

start_ut#

The universal time at the start of the patch, in seconds.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

end_ut#

The universal time at the end of the patch, in seconds.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

Note

For a patch that ends in an impact, this is the time of the impact.

atmospheric#

Whether the patch is inside an atmosphere.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

atmospheric_trajectory(reference_frame)#

The points of an atmospheric patch, or None for a patch in space.

Parameters:

reference_frame (SpaceCenter.ReferenceFrame) – The reference frame for the positions.

Return type:

list(tuple(float, float, float, float)) or None

Game Scenes:

Flight

Note

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

orbital_trajectory#

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

Attribute:

Read-only, cannot be set

Return type:

SpaceCenter.Orbit or None

Game Scenes:

Flight