Attitude
The attitude module contains function for common attitude operations, different attitude representations (Quaternions, Euler Angles, Euler Axis & Angle, Rotation Matrices), and transformations between different attitude representations.
SatelliteDynamics.Rx — FunctionRotation matrix, for a rotation about the x-axis.
Arguments:
angle::Real: Counter-clockwise angle of rotation as viewed looking back along the postive direction of the rotation axis.use_degrees:Bool: Iftrueinterpret input as being in degrees.
Returns:
r::Array{<:Real, 2}: Rotation matrix
References:
- O. Montenbruck, and E. Gill, Satellite Orbits: Models, Methods and Applications, 2012, p.27.
SatelliteDynamics.Ry — FunctionRotation matrix, for a rotation about the y-axis.
Arguments:
angle::Real: Counter-clockwise angle of rotation as viewed looking back along the postive direction of the rotation axis.use_degrees:Bool: Iftrueinterpret input as being in degrees.
Returns:
r::Array{<:Real, 2}: Rotation matrix
References:
- O. Montenbruck, and E. Gill, Satellite Orbits: Models, Methods and Applications, 2012, p.27.
SatelliteDynamics.Rz — FunctionRotation matrix, for a rotation about the z-axis.
Arguments:
angle::Real: Counter-clockwise angle of rotation as viewed looking back along the postive direction of the rotation axis.use_degrees:Bool: Iftrueinterpret input as being in degrees.
Returns:
r::Array{<:Real, 2}: Rotation matrix
References:
- O. Montenbruck, and E. Gill, Satellite Orbits: Models, Methods and Applications, 2012, p.27.
Quaternions
SatelliteDynamics.Quaternion — TypeThe Quaternion type defines a scalar-first quaternion for representation of attitude.
Data members:
q0::Float64: Scalar part of quaternionq1::Float64: First vector component of quaternionq2::Float64: Second vector component of quaternionq3::Float64: Third vector component of quaternion
References:
- J. Diebel, Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 58(15-16) (2006).
SatelliteDynamics.as_vector — FunctionReturn quaternion as a vector.
Equivalent to q[:]
Arguments:
q::Quaternion: Quaternion
Returns:
vec::Array{Float64, 1}: Quaternion as a (4,) vector
Return Euler angles as a vector.
Equivalent to: [e.phi, e.theta, e.psi] for EulerAngle e
Arguments:
e::EulerAngleEuler Angle
Returns:
evec::Array{Float64, 1}Euler angles components in vector form.
SatelliteDynamics.as_matrix — FunctionReturn the rotation matrix representation of a Quaternion.
Arguments:
q::Quaternion: Quaternion
Returns:
mat::Array{Float64, 2}: Rotation Matrix on SO(3).
SatelliteDynamics.slerp — FunctionPerform spherical linear interpolation (SLERP) on two quaternions. Interpolatles from quaternion, q1, to quaternion, q2, at normalized interpolation time, t.
Interpolation time must be in the range [0, 1] a value of 0 will return q1, while a value of 1 will return q2.
Arguments:
q1::Quaternion: Starting Quaternionq2::Quaternion: Ending Quaterniont::Real: Normalized interpolation time. [0, 1]
Returns:
q:Quaternion: Quaternion attitude interpolation from q1 toward q2 at time t.
EulerAngle
SatelliteDynamics.EulerAngle — TypeThe EulerAngle type provides a represenation of EulerAngles for storing attitude information.
Valid sequences are: 121, 123, 131, 132, 212, 213, 231, 232, 312, 313, 321, 323.
Data members:
seq::Integer: Order of application of angles with respect to body axis.phi::Float64: First Euler angletheta::Float64: Second Euler anglepsi::Float64: Third Euler angle
References:
- J. Diebel, Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 58(15-16) (2006).
EulerAxis
SatelliteDynamics.EulerAxis — TypeThe EulerAxis type provides a representation of the Euler angle-and-axis attitude representation.
Data members:
theta::Float64: Angle of rotationvec::Array{Float64, 1}: Axis of rotation
References:
- J. Diebel, Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 58(15-16) (2006).