ostk.physics.coordinate.Position

class Position(self: ostk.physics.coordinate.Position, coordinates: numpy.ndarray[numpy.float64[3, 1]], unit: ostk.physics.unit.Length.Unit, frame: ostk::physics::coordinate::Frame)

Bases: pybind11_object

Position.

Constructs a position.

Parameters:

Methods

access_frame

Access the frame of reference.

get_coordinates

Get the coordinates.

get_unit

Get the unit.

in_frame

Get the position in another frame of reference.

in_meters

Get the position in meters.

in_unit

Get the position in the unit.

is_defined

Check if the Position is defined.

is_near

Check if the Position is near another Position.

meters

Create a position in meters.

to_string

Create a string representation.

undefined

Get undefined position.

access_frame(
self: ostk.physics.coordinate.Position,
) ostk::physics::coordinate::Frame

Access the frame of reference.

Returns:

Frame of reference.

Return type:

Frame

get_coordinates(
self: ostk.physics.coordinate.Position,
) numpy.ndarray[numpy.float64[3, 1]]

Get the coordinates.

Returns:

Coordinates.

Return type:

numpy.ndarray

get_unit(
self: ostk.physics.coordinate.Position,
) ostk.physics.unit.Length.Unit

Get the unit.

Returns:

Unit.

Return type:

Unit

in_frame(
self: ostk.physics.coordinate.Position,
frame: ostk::physics::coordinate::Frame,
instant: ostk.physics.time.Instant,
) ostk.physics.coordinate.Position

Get the position in another frame of reference.

Parameters:
  • frame (Frame) -- Frame of reference.

  • instant (Instant) -- Instant.

Returns:

Position in another frame of reference.

Return type:

Position

in_meters(
self: ostk.physics.coordinate.Position,
) ostk.physics.coordinate.Position

Get the position in meters.

Returns:

Position in meters.

Return type:

Position

in_unit(
self: ostk.physics.coordinate.Position,
arg0: ostk.physics.unit.Length.Unit,
) ostk.physics.coordinate.Position

Get the position in the unit.

Returns:

Position in the unit.

Return type:

Position

is_defined(self: ostk.physics.coordinate.Position) bool

Check if the Position is defined.

Returns:

True if the Position is defined.

Return type:

bool

is_near(
self: ostk.physics.coordinate.Position,
position: ostk.physics.coordinate.Position,
tolerance: ostk.physics.unit.Length,
) bool

Check if the Position is near another Position.

Parameters:
  • position (Position) -- Position to compare with.

  • tolerance (Length) -- Tolerance.

Returns:

True if the Position is near another Position.

Return type:

bool

static meters(coordinates: numpy.ndarray[numpy.float64[3, 1]], frame: ostk::physics::coordinate::Frame) ostk.physics.coordinate.Position

Create a position in meters.

Parameters:
Returns:

Position in meters.

Return type:

Position

to_string(
self: ostk.physics.coordinate.Position,
precision: ostk.core.type.Integer = Integer.Undefined(),
) ostk.core.type.String

Create a string representation.

Parameters:

precision (Integer) -- Precision.

Returns:

String representation.

Return type:

String

static undefined() ostk.physics.coordinate.Position

Get undefined position.

Returns:

Undefined position.

Return type:

Position