ostk.physics.Environment

class Environment(*args, **kwargs)

Bases: pybind11_object

Environment modelling

Overloaded function.

  1. __init__(self: ostk.physics.Environment, instant: ostk.physics.time.Instant, objects: list[ostk::physics::environment::Object], set_global_instance: bool = False) -> None

    Constructor

    Args:

    instant (Instant): An Instant. objects (list[Object]): List of objects. set_global_instance (bool, optional): True if the global environment instance should be set. Defaults to False.

  2. __init__(self: ostk.physics.Environment, central_celestial_object: ostk::physics::environment::Object, objects: list[ostk::physics::environment::Object], instant: ostk.physics.time.Instant = 2000-01-01 11:58:55.816 [UTC], set_global_instance: bool = False) -> None

    Constructor

    Args:

    central_celestial_object (Object): A central celestial object. objects (list[Object]): List of objects. instant (Instant, optional): An Instant. Default is J2000 epoch. set_global_instance (bool, optional): True if the global environment instance should be set. Defaults to False.

Methods

access_celestial_object_with_name

Access celestial object with a given name.

access_central_celestial_object

Access the central celestial object.

access_global_instance

Access the global environment instance.

access_object_with_name

Access an object with a given name.

access_objects

Access the objects in the environment.

default

Get the default Environment object.

get_instant

Get instant.

get_object_names

Get names of objects.

has_central_celestial_object

Returns true if the environment has a central celestial object.

has_global_instance

Check if the global environment instance is set.

has_object_with_name

Returns true if environment contains objects with a given name.

intersects

Returns true if a given geometry intersects any of the environment objects.

is_defined

Check if the environment is defined,

is_position_in_eclipse

Is position in eclipse.

reset_global_instance

Reset the global environment instance.

set_instant

Set the instant of the environment.

undefined

Get an undefined Environment object.

access_celestial_object_with_name(
self: ostk.physics.Environment,
name: ostk.core.type.String,
) ostk::physics::environment::object::Celestial

Access celestial object with a given name.

Parameters:

name (str) -- The name of the celestial object.

Returns:

The celestial object with the given name.

Return type:

Celestial

access_central_celestial_object(
self: ostk.physics.Environment,
) ostk::physics::environment::object::Celestial

Access the central celestial object.

Returns:

The central celestial object.

Return type:

Celestial

static access_global_instance() ostk.physics.Environment

Access the global environment instance.

Returns:

The global environment instance.

Return type:

Environment

access_object_with_name(
self: ostk.physics.Environment,
name: ostk.core.type.String,
) ostk::physics::environment::Object

Access an object with a given name.

Parameters:

name (str) -- An object name.

Returns:

The object with the given name.

Return type:

Object

access_objects(
self: ostk.physics.Environment,
) list[ostk::physics::environment::Object]

Access the objects in the environment.

Returns:

The list of objects.

Return type:

list(Object)

static default(set_global_instance: bool = False) ostk.physics.Environment

Get the default Environment object.

Parameters:

(set_global_instance) -- True if the global environment instance should be set.

Returns:

The default Environment object.

Return type:

Environment

get_instant(self: ostk.physics.Environment) ostk.physics.time.Instant

Get instant.

Returns:

The instant.

Return type:

Instant

get_object_names(
self: ostk.physics.Environment,
) list[ostk.core.type.String]

Get names of objects.

Returns:

List of objects names.

Return type:

list(str)

has_central_celestial_object(self: ostk.physics.Environment) bool

Returns true if the environment has a central celestial object.

Returns:

True if the environment has a central celestial object, False otherwise.

Return type:

bool

static has_global_instance() bool

Check if the global environment instance is set.

Returns:

True if the global environment instance is set, False otherwise.

Return type:

bool

has_object_with_name(
self: ostk.physics.Environment,
name: ostk.core.type.String,
) bool

Returns true if environment contains objects with a given name.

Parameters:

name (str) -- The name of the object.

Returns:

True if environment contains objects with a given name, False otherwise.

Return type:

bool

intersects(
self: ostk.physics.Environment,
geometry: ostk::physics::environment::object::Geometry,
objects_to_ignore: list[ostk::physics::environment::Object] = [],
) bool

Returns true if a given geometry intersects any of the environment objects.

Parameters:
  • geometry (Geometry) -- The geometry to check for intersection.

  • objects_to_ignore (list[Object], optional) -- List of objects to ignore during intersection check.

Returns:

True if the geometry intersects with any objects, False otherwise.

Return type:

bool

is_defined(self: ostk.physics.Environment) bool

Check if the environment is defined,

Returns:

True if the environment is defined, False otherwise,

Return type:

bool

is_position_in_eclipse(
self: ostk.physics.Environment,
position: ostk.physics.coordinate.Position,
) bool

Is position in eclipse.

Parameters:

position (Position) -- A position.

Returns:

True if the position is in eclipse, False otherwise.

Return type:

bool

static reset_global_instance() None

Reset the global environment instance.

set_instant(
self: ostk.physics.Environment,
instant: ostk.physics.time.Instant,
) None

Set the instant of the environment.

Parameters:

instant (Instant) -- The new instant of the environment.

static undefined() ostk.physics.Environment

Get an undefined Environment object.

Returns:

An undefined Environment object.

Return type:

Environment