Skip to content

Reference: Units Module

RotationAngle Class

psiqworkbench.Units.RotationAngle

RotationAngle(mag: float, units: str)

RotationAngle is a class with magnitude and units.

In Workbench, these are primarily used to handle conversion between rotation units (radians, degrees, turns).

Parameters:

Name Type Description Default
mag float

Magnitude

required
units str

Units such as 'deg' or 'rad'

required

to

to(to_units: str)

Return equivalent RotationAngle in units specified.

Parameters:

Name Type Description Default
to_units str

Units to convert the angle to ('deg' or 'rad').

required

psiqworkbench.Units.rad module-attribute

rad = RotationAngle(1, 'rad')

Rotation angle that corresponds to 1 radian.

psiqworkbench.Units.deg module-attribute

deg = RotationAngle(1, 'deg')

Rotation angle that corresponds to 1 degree.