ostk.physics.environment.gravitational.earth.Manager

class Manager

Bases: Manager

Earth gravitational model data manager.

Fetches and manages necessary gravity model data files.

The following environment variables can be defined:

  • "OSTK_PHYSICS_ENVIRONMENT_GRAVITATIONAL_EARTH_MANAGER_MODE" will override "DefaultMode"

  • "OSTK_PHYSICS_ENVIRONMENT_GRAVITATIONAL_EARTH_MANAGER_LOCAL_REPOSITORY" will override "DefaultLocalRepository"

Methods

clear_local_repository

Clear the local repository.

fetch_data_files_for_type

Fetch data file from remote.

get

Get manager singleton.

get_local_repository

Get the local repository.

get_local_repository_lock_timeout

Get the local repository lock timeout.

get_mode

Get the manager mode.

has_data_files_for_type

Returns true if manager has data file for the given model type.

local_data_files_for_type

Returns list of file objects for the given type.

reset

Reset the manager.

set_local_repository

Set the local repository.

set_mode

Set the manager mode.

class Mode(self: ostk.physics.Manager.Mode, value: int)

Bases: pybind11_object

Members:

Manual

Automatic

property name
clear_local_repository(self: ostk.physics.Manager) None

Clear the local repository.

fetch_data_files_for_type(
self: ostk.physics.environment.gravitational.earth.Manager,
model_type: ostk.physics.environment.gravitational.Earth.Type,
) None

Fetch data file from remote.

Parameters:

model_type (EarthGravitationalModel::Type) -- A model type.

static get() ostk.physics.environment.gravitational.earth.Manager

Get manager singleton.

Returns:

Reference to manager.

Return type:

Manager

get_local_repository(
self: ostk.physics.Manager,
) ostk.core.filesystem.Directory

Get the local repository.

Returns:

Local repository.

Return type:

Directory

get_local_repository_lock_timeout(
self: ostk.physics.Manager,
) ostk::physics::time::Duration

Get the local repository lock timeout.

Returns:

Local repository lock timeout.

Return type:

Duration

get_mode(self: ostk.physics.Manager) ostk.physics.Manager.Mode

Get the manager mode.

Returns:

Manager mode.

Return type:

Mode

has_data_files_for_type(
self: ostk.physics.environment.gravitational.earth.Manager,
model_type: ostk.physics.environment.gravitational.Earth.Type,
) bool

Returns true if manager has data file for the given model type.

Parameters:

model_type (EarthGravitationalModel::Type) -- A model type.

Returns:

True if manager has data file for the given model type.

Return type:

bool

local_data_files_for_type(
self: ostk.physics.environment.gravitational.earth.Manager,
model_type: ostk.physics.environment.gravitational.Earth.Type,
) list[ostk.core.filesystem.File]

Returns list of file objects for the given type.

Parameters:

model_type (EarthGravitationalModel::Type) -- A model type.

Returns:

list of Files.

Return type:

list[File]

reset(self: ostk.physics.Manager) None

Reset the manager.

set_local_repository(
self: ostk.physics.Manager,
directory: ostk.core.filesystem.Directory,
) None

Set the local repository.

Parameters:

directory (Directory) -- Local repository.

set_mode(self: ostk.physics.Manager, mode: ostk.physics.Manager.Mode) None

Set the manager mode.

Parameters:

mode (Mode) -- Manager mode.