ostk.physics.coordinate.frame.Manager

class Manager

Bases: pybind11_object

Reference frame manager (thread-safe).

Manages the lifecycle and caching of reference frames. This is a singleton class.

The following environment variable can be defined:

  • "OSTK_PHYSICS_FRAME_MANAGER_MAX_TRANSFORM_CACHE_SIZE" will override the default maximum transform cache size (default: 1000)

Methods

access_cached_transform

Access a cached transform between two frames at a given instant.

access_frame_with_name

Access a frame by name.

add_cached_transform

Add a transform to the cache.

add_frame

Add a frame to the manager.

clear_all_frames

Clear all frames from the manager.

get

Get manager singleton.

get_all_frame_names

Get all registered frame names.

has_frame_with_name

Check if a frame with the given name exists.

remove_frame_with_name

Remove a frame by name.

access_cached_transform(
self: ostk.physics.coordinate.frame.Manager,
from_frame: ostk.physics.coordinate.Frame,
to_frame: ostk.physics.coordinate.Frame,
instant: ostk.physics.time.Instant,
) ostk::physics::coordinate::Transform

Access a cached transform between two frames at a given instant.

Parameters:
  • from_frame (Frame) -- Source frame.

  • to_frame (Frame) -- Destination frame.

  • instant (Instant) -- Instant at which the transform is requested.

Returns:

Cached transform if found, undefined transform otherwise.

Return type:

Transform

access_frame_with_name(
self: ostk.physics.coordinate.frame.Manager,
frame_name: ostk.core.type.String,
) ostk.physics.coordinate.Frame

Access a frame by name.

Parameters:

frame_name (str) -- Name of the frame.

Returns:

Frame with the given name, or None if not found.

Return type:

Frame

add_cached_transform(
self: ostk.physics.coordinate.frame.Manager,
from_frame: ostk.physics.coordinate.Frame,
to_frame: ostk.physics.coordinate.Frame,
instant: ostk.physics.time.Instant,
transform: ostk::physics::coordinate::Transform,
) None

Add a transform to the cache.

Parameters:
  • from_frame (Frame) -- Source frame.

  • to_frame (Frame) -- Destination frame.

  • instant (Instant) -- Instant at which the transform applies.

  • transform (Transform) -- Transform to cache.

add_frame(
self: ostk.physics.coordinate.frame.Manager,
frame: ostk.physics.coordinate.Frame,
) None

Add a frame to the manager.

Parameters:

frame (Frame) -- Frame to add.

clear_all_frames(self: ostk.physics.coordinate.frame.Manager) None

Clear all frames from the manager.

This removes all registered frames and clears the transform cache.

static get() ostk.physics.coordinate.frame.Manager

Get manager singleton.

Returns:

Reference to the manager instance.

Return type:

Manager

get_all_frame_names(
self: ostk.physics.coordinate.frame.Manager,
) list[ostk.core.type.String]

Get all registered frame names.

Returns:

List of all frame names.

Return type:

list[str]

has_frame_with_name(
self: ostk.physics.coordinate.frame.Manager,
frame_name: ostk.core.type.String,
) bool

Check if a frame with the given name exists.

Parameters:

frame_name (str) -- Name of the frame.

Returns:

True if frame exists.

Return type:

bool

remove_frame_with_name(
self: ostk.physics.coordinate.frame.Manager,
frame_name: ostk.core.type.String,
) None

Remove a frame by name.

Parameters:

frame_name (str) -- Name of the frame to remove.