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.RxFunction

Rotation 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: If true interpret input as being in degrees.

Returns:

  • r::Array{<:Real, 2}: Rotation matrix

References:

  1. O. Montenbruck, and E. Gill, Satellite Orbits: Models, Methods and Applications, 2012, p.27.
source
SatelliteDynamics.RyFunction

Rotation 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: If true interpret input as being in degrees.

Returns:

  • r::Array{<:Real, 2}: Rotation matrix

References:

  1. O. Montenbruck, and E. Gill, Satellite Orbits: Models, Methods and Applications, 2012, p.27.
source
SatelliteDynamics.RzFunction

Rotation 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: If true interpret input as being in degrees.

Returns:

  • r::Array{<:Real, 2}: Rotation matrix

References:

  1. O. Montenbruck, and E. Gill, Satellite Orbits: Models, Methods and Applications, 2012, p.27.
source

Quaternions

SatelliteDynamics.QuaternionType

The Quaternion type defines a scalar-first quaternion for representation of attitude.

Data members:

  • q0::Float64: Scalar part of quaternion
  • q1::Float64: First vector component of quaternion
  • q2::Float64: Second vector component of quaternion
  • q3::Float64: Third vector component of quaternion

References:

  1. J. Diebel, Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 58(15-16) (2006).
source
SatelliteDynamics.as_vectorFunction

Return quaternion as a vector.

Equivalent to q[:]

Arguments:

  • q::Quaternion: Quaternion

Returns:

  • vec::Array{Float64, 1}: Quaternion as a (4,) vector
source

Return Euler angles as a vector.

Equivalent to: [e.phi, e.theta, e.psi] for EulerAngle e

Arguments:

  • e::EulerAngle Euler Angle

Returns:

  • evec::Array{Float64, 1} Euler angles components in vector form.
source
SatelliteDynamics.as_matrixFunction

Return the rotation matrix representation of a Quaternion.

Arguments:

  • q::Quaternion: Quaternion

Returns:

  • mat::Array{Float64, 2}: Rotation Matrix on SO(3).
source
SatelliteDynamics.slerpFunction

Perform 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 Quaternion
  • q2::Quaternion: Ending Quaternion
  • t::Real: Normalized interpolation time. [0, 1]

Returns:

  • q:Quaternion: Quaternion attitude interpolation from q1 toward q2 at time t.
source

EulerAngle

SatelliteDynamics.EulerAngleType

The 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 angle
  • theta::Float64: Second Euler angle
  • psi::Float64: Third Euler angle

References:

  1. J. Diebel, Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 58(15-16) (2006).
source

EulerAxis

SatelliteDynamics.EulerAxisType

The EulerAxis type provides a representation of the Euler angle-and-axis attitude representation.

Data members:

  • theta::Float64: Angle of rotation
  • vec::Array{Float64, 1}: Axis of rotation

References:

  1. J. Diebel, Representing attitude: Euler angles, unit quaternions, and rotation vectors. Matrix 58(15-16) (2006).
source