ostk.physics.data.Direction

class Direction(
self: ostk.physics.data.Direction,
value: numpy.ndarray[numpy.float64[3, 1]],
frame: ostk.physics.coordinate.Frame,
)

Bases: Vector

Direction.

A unit vector, expressed in a given frame.

Construct a Direction.

Parameters:
  • numpy.ndarray -- Value

  • Frame -- Frame

Methods

get_frame

Get frame.

get_unit

Get unit.

get_value

Get value.

in_frame

Convert to frame.

in_unit

Convert to unit.

is_defined

Check if the vector is defined.

to_string

Convert to (formatted) string.

undefined

Create an undefined direction.

get_frame(self: ostk.physics.data.Vector) ostk.physics.coordinate.Frame

Get frame.

Returns:

Frame.

Return type:

Frame

get_unit(self: ostk.physics.data.Vector) ostk.physics.Unit

Get unit.

Returns:

Unit.

Return type:

Unit

get_value(
self: ostk.physics.data.Vector,
) numpy.ndarray[numpy.float64[3, 1]]

Get value.

Returns:

Value.

Return type:

numpy.ndarray

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

Convert to frame.

Parameters:
Returns:

Vector in frame.

Return type:

Vector

in_unit(
self: ostk.physics.data.Vector,
unit: ostk.physics.Unit,
) ostk.physics.data.Vector

Convert to unit.

Parameters:

unit (Unit) -- Unit.

Returns:

Vector in unit.

Return type:

Vector

is_defined(self: ostk.physics.data.Vector) bool

Check if the vector is defined.

Returns:

True if defined.

Return type:

bool

to_string(
self: ostk.physics.data.Vector,
precision: ostk.core.type.Integer = 6,
) ostk.core.type.String

Convert to (formatted) string.

Parameters:

precision (Integer) -- Precision.

Returns:

String representation.

Return type:

str

static undefined() ostk.physics.data.Direction

Create an undefined direction.

Returns:

Undefined direction.

Return type:

Direction