ConversionUtility#
- class ansys.stk.core.stkutil.ConversionUtility#
Object that contains a unit conversion utility.
Overview#
Convert the specified quantity value from a given unit to another unit. |
|
Convert the specified date from a given unit to another unit. |
|
Convert the specified quantity values from a given unit to another unit. |
|
Convert the specified dates from a given unit to another unit. |
|
Create an Quantity interface with the given dimension, unit and value. |
|
Create an Date interface with the given unit and value. |
|
Create an IPosition interface with earth as its central body. |
|
Convert the specified position values from a given position type to another position type. |
|
Create an IDirection interface. |
|
Create an IOrientation interface. |
|
Create an IOrbitState interface with earth as its central body. |
|
Create an IPosition interface using the supplied central body. |
|
Create an IOrbitState interface using the supplied central body. |
|
Return a Direction Cosine Matrix (DCM). |
|
Return a Direction Cosine Matrix (DCM) as an array. |
|
Create a cartesian vector. |
|
Convert the direction to cartesian vector. |
|
Convert the position to cartesian vector. |
Import detail#
from ansys.stk.core.stkutil import ConversionUtility
Method detail#
- ConversionUtility.convert_quantity(self, dimension_name: str, from_unit: str, to_unit: str, from_value: float) float #
Convert the specified quantity value from a given unit to another unit.
- ConversionUtility.convert_date(self, from_unit: str, to_unit: str, from_value: str) str #
Convert the specified date from a given unit to another unit.
- ConversionUtility.convert_quantity_array(self, dimension_name: str, from_unit: str, to_unit: str, quantity_values: list) list #
Convert the specified quantity values from a given unit to another unit.
- ConversionUtility.convert_date_array(self, from_unit: str, to_unit: str, from_values: list) list #
Convert the specified dates from a given unit to another unit.
- ConversionUtility.new_quantity(self, dimension: str, unit_abbrv: str, value: float) Quantity #
Create an Quantity interface with the given dimension, unit and value.
- ConversionUtility.new_date(self, unit_abbrv: str, value: str) Date #
Create an Date interface with the given unit and value.
- ConversionUtility.new_position_on_earth(self) IPosition #
Create an IPosition interface with earth as its central body.
- Returns:
IPosition
- ConversionUtility.convert_position_array(self, position_type: PositionType, position_array: list, convert_to: PositionType) list #
Convert the specified position values from a given position type to another position type.
- ConversionUtility.new_direction(self) IDirection #
Create an IDirection interface.
- Returns:
IDirection
- ConversionUtility.new_orientation(self) IOrientation #
Create an IOrientation interface.
- Returns:
IOrientation
- ConversionUtility.new_orbit_state_on_earth(self) IOrbitState #
Create an IOrbitState interface with earth as its central body.
- Returns:
IOrbitState
- ConversionUtility.new_position_on_cb(self, central_body_name: str) IPosition #
Create an IPosition interface using the supplied central body.
- Parameters:
central_body_name :
str
- Returns:
IPosition
- ConversionUtility.new_orbit_state_on_cb(self, central_body_name: str) IOrbitState #
Create an IOrbitState interface using the supplied central body.
- Parameters:
central_body_name :
str
- Returns:
IOrbitState
- ConversionUtility.query_direction_cosine_matrix(self, input_orientation: IOrientation) Tuple[ICartesian3Vector, ICartesian3Vector, ICartesian3Vector] #
Return a Direction Cosine Matrix (DCM).
- Parameters:
input_orientation :
IOrientation
- Returns:
Tuple[ICartesian3Vector, ICartesian3Vector, ICartesian3Vector]
- ConversionUtility.query_direction_cosine_matrix_array(self, input_orientation: IOrientation) list #
Return a Direction Cosine Matrix (DCM) as an array.
- Parameters:
input_orientation :
IOrientation
- Returns:
- ConversionUtility.new_cartesian3_vector(self) ICartesian3Vector #
Create a cartesian vector.
- Returns:
ICartesian3Vector
- ConversionUtility.new_cartesian3_vector_from_direction(self, input_direction: IDirection) ICartesian3Vector #
Convert the direction to cartesian vector.
- Parameters:
input_direction :
IDirection
- Returns:
ICartesian3Vector
- ConversionUtility.new_cartesian3_vector_from_position(self, input_position: IPosition) ICartesian3Vector #
Convert the position to cartesian vector.
- Parameters:
input_position :
IPosition
- Returns:
ICartesian3Vector