Attitude Kinematics¶
quaternion_derivative builtin ¶
quaternion_derivative(q: Quaternion, angular_velocity: ndarray, scalar_first: bool) -> ndarray
Computes the time derivative of an attitude quaternion from the body-frame angular velocity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q | Quaternion | Attitude quaternion transforming frame A to frame B. | required |
angular_velocity | ndarray | Angular velocity of B relative to A, expressed in B, shape (3,). Units: (rad/s) | required |
scalar_first | bool | If True, the returned array is | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Quaternion derivative, shape (4,), ordered per |
ndarray |
|
Example
References
J. Diebel, Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors, 2006. Eq. 157.
angular_velocity_from_quaternion_derivative builtin ¶
angular_velocity_from_quaternion_derivative(q: Quaternion, q_dot: ndarray, scalar_first: bool) -> ndarray
Recovers the body-frame angular velocity from an attitude quaternion and its time derivative.
Exact inverse of quaternion_derivative for a unit quaternion whose derivative is tangent to the unit-quaternion manifold. A radial (norm-drift) component of q_dot is projected out, so quaternion derivatives obtained by numerical differentiation or integration are accepted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q | Quaternion | Attitude quaternion transforming frame A to frame B. | required |
q_dot | ndarray | Quaternion derivative, shape (4,), ordered per | required |
scalar_first | bool | If True, | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Angular velocity of B relative to A, expressed in B, |
ndarray | shape (3,). Units: (rad/s) |
Example
References
J. Diebel, Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors, 2006. Eq. 147.
euler_rates_to_angular_velocity builtin ¶
euler_rates_to_angular_velocity(angles: EulerAngle, rates: ndarray) -> ndarray
Converts Euler-angle rates to the body-frame angular velocity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angles | EulerAngle | Euler angles in brahe application order. Units: (rad) | required |
rates | ndarray | Angle rates | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Angular velocity of frame B relative to frame A, |
ndarray | expressed in B, shape (3,). Units: (rad/s) |
Example
References
J. Diebel, Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors, 2006. Eqs. 38 and 40.
angular_velocity_to_euler_rates builtin ¶
angular_velocity_to_euler_rates(angles: EulerAngle, angular_velocity: ndarray) -> ndarray
Converts body-frame angular velocity to Euler-angle rates.
Exact inverse of euler_rates_to_angular_velocity away from the sequence's gimbal-lock singularity. Sequences with three distinct axes are singular at θ = ±90°; sequences that repeat the first axis are singular at θ = 0° and θ = 180°. This function raises within roughly 1e-6 rad of either condition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angles | EulerAngle | Euler angles in brahe application order. Units: (rad) | required |
angular_velocity | ndarray | Body-frame angular velocity, shape (3,). Units: (rad/s) | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Angle rates |
ndarray | shape (3,). Units: (rad/s) |
Raises:
| Type | Description |
|---|---|
BraheError | If |
Example
References
J. Diebel, Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors, 2006. Eq. 40.