
Explore attitude representations—direct cosine matrices, Euler angles, and quaternions—and learn when to use and how to convert between them, with Python analysis and a C++ math library for Unity.
Explore the course outline and key attitude representations, including the direct cosine matrix and quaternions, with theory, implementation, examples, and a comparison of their advantages and disadvantages.
Set up a Python environment for the course using Python 3, NumPy, and Matplotlib, with desktop or web IDE options and beginner resources.
Set up your C++ environment for the attitude metho library with a flexible approach, assuming basic C++ knowledge and using Ubuntu 18, VS Code, and terminal.
Explore attitude representations that describe an object's orientation in three dimensional space, mapping between world and body frames using coordinate systems, a direct cosine matrix, Euler angles, and quaternions.
Gain a quick foundation in basic linear algebra, covering matrices and vectors, their notation and operations—addition, scalar and matrix multiplication, transpose, determinant, inverse, identity, and orthogonal matrices.
Outline a lightweight c++11 attitude math library using vector and matrix classes, dcom matrix and quaternion representations, with automatic transformations, easy element access, and no memory allocation or virtual inheritance.
Learn to implement a C++ vector3 class for an attitude mathematics library, including constructors, union-based data storage, operator overloads, dot and cross products, norm, normalization, and unit tests using Catch.
Develop a 3x3 matrix class in C++ for the AML library, including unions-based storage, constructors, matrix and scalar operators, matrix-vector multiplication, transpose, determinant, inverse, diag, and streaming, with unit tests.
Demonstrates how a rotation transformation matrix represents attitude and transforms a vector from the world frame to the body frame, via a 3x3 orthogonal matrix with unit determinant.
Differentiate point and vector transformations by shifting frames before rotation: rotate vectors around the origin, but transform points by subtracting the frame origin and then applying the rotation.
Explain two rotation conventions: column vectors with pre multiplication and row vectors with post multiplication; transpose converts between them or implies opposite world-to-body convention.
The direct cosine matrix, or DCM, defines a rotation matrix by mapping axes from frame A to frame B using cosines of inter-axis angles.
Learn single-axis rotations with direction cosine matrices for x, y, and z axes, and implement these rotation matrices in Python to rotate vectors by matrix multiplication.
Explore the difference between rotating axes (passive rotation) and rotating the vector (active rotation) using a 45-degree example, and show how the rotation matrix with a negative angle switches perspectives.
Chain moldable single axis rotations to transform vectors between frames using successive rotation matrices from A to B to C, then verify with a single A to C rotation.
Explore intrinsic and extrinsic rotations, comparing how rotations apply to the intermediate frame versus the original frame, and learn to convert sequences by reversing their order, with Euler angles.
Study attitude kinematics with the direct carrison matrix representation, mapping world to body. Derive dcm rate from body-frame angular rates using a skew-symmetric omega, and note frame transformations.
Demonstrate that linear interpolation of rotation matrices to form a dcm produces invalid matrices, and show using an attitude representation to interpolate before converting to a dcm.
Chain the world-to-aircraft and aircraft-to-camera rotations to derive the world-to-camera transformation; use the transpose of the camera-to-aircraft rotation to invert it.
Understand pre multiplication rotation matrices from sequential z, y, and x axis rotations and their post multiplication counterparts via transpose, reversing order, and axis-specific transposes.
Transform the aircraft's world rotation into the gimbal camera frame, negate it, and set the gimbal rotation rate to counteract the aircraft so the target stays centered in view.
Develop and implement a c++ dcm class in the aml library, adding header and source files, single-axis rotation matrices, validation, normalization, and dcm kinematics.
Express any rotation with three euler angles (phi theta psi) on three axes, forming an axis rotation matrix; note 12 valid orders among 27 axis sequences, including roll pitch yaw.
Explain Euler angle conventions using the right-hand rule, defining positive rotations about axes, and outlining phi, theta, and psi ranges, including wrapping for phi/psi and non-wrapping theta with in-range representations.
Derive and apply the Euler XYZ rotation sequence, linking yaw, pitch, and roll to the DCM rotation matrix, with Python examples converting between matrices and Euler angles.
Explore the inverse tangent implementation and why atan2 preserves quadrant information, returning values from -pi to pi rather than -pi/2 to pi/2, using A and B as numerator and denominator.
Explore the ZXZ Euler angle sequence, building the rotation matrix from z, x, z rotations and converting back to Euler angles with Python code to illustrate spin mutation precession.
Convert between Euler angle sequences using the direction cosine matrix, deriving and back-converting angles from one sequence to another, algebraically or numerically, with Python examples.
Learn Euler angle kinematics for the x y z sequence: derive attitude from body rates, explore singularities at 90 degrees or zero pitch, and illustrate first‑order integration in Python.
Learn how to perform Euler angle interpolation between attitudes, explore linear interpolation on the angles, angle wrapping, and how the path can be shorter or longer, with Python examples.
Convert Euler angles between the X Y Z and Z X said sequences using a rotation matrix, recover the attitude angles, and wrap to an in-range, equivalent representation.
Compute the bearing angle of the target relative to the aircraft by forming world-to-aircraft and aircraft-to-camera rotation matrices, then chain them to obtain the world-to-camera orientation.
Implement a new C++ Euler angle class in the attitude math library, including header and source files, sequence handling, and conversions between angles and DCMs with kinematics and interpolation.
Explore how quaternions extend complex numbers by pairing a scalar with a vector part along i, j, k axes, enabling conjugation, norm, inverse, and matrix-vector multiplication.
Learn how unit quaternions encode attitude and rotations, with the real part as half the angle and the imaginary part as the axis, enabling world-to-body transforms.
Explore how quaternions convert to DCM rotation matrices and back, with practical Python examples for quaternion conjugates, inverses, and vector rotation transformations.
Learn how to convert between quaternions and Euler angles across multiple rotation sequences by mapping quaternion data to direction cosine matrices and back, using Python demonstrations.
Derive quaternion kinematics from body and world angular rates, rotate with the Kitani matrix, and demonstrate quaternion normalization for smooth, singularity-free attitude integration.
Explore quaternion interpolation using spherical linear interpolation on the unit sphere to achieve the shortest rotation path between two rotations, keeping unit-length quaternions and smooth motion.
Compute Aquitania representing a 30-degree rotation about a given axis by deriving angles A, B, C from the axis components and constructing the Kitani quaternion with Q4, Q1, Q2, Q3.
Explains how to compute rotation from one earth position (latitude and longitude) to another by chaining geodetic frame rotations around x and y axes, using inverses, and Kitani quaternions.
Compare quaternion-based attitude integration with Euler angle methods using Python, over 20 seconds from world-aligned initial attitude. Results show quaternions avoid singularities, while Euler angles diverge near 90 degrees.
Develop and implement a C++ quaternion class in a library, covering constructors, operators, conjugate, norm, inverse, normalization, dot product, and matrix or Euler angle conversions, plus vector rotation and interpolation.
Develop a robust c++ quaternion class with unit validation and dcm conversion, implement quaternion to/from other angles (x,y,z sequences), perform kitani integration, and provide lerp and slerp interpolation with tests.
Compare attitude representations like DCM, Euler angles, and quaternions, examining ease of interpretation, storage, numerical issues, interpolation, singularities, and why quaternions are favored for simulation.
Integrate attitude across DCM, Euler angles, and quaternions with a first-order method, convert results between representations, and save output to Attitude Results for 20 seconds at dt=0.001.
Conclude by solidifying attitude representations and transformations, and empower you to solve problems with the included reference materials, cheat sheets, and a free C++ attitude math library.
The source code for the C++ Attitude Math Library can be downloaded below.
You need to learn know Attitude Representations and Transformations!
Engineers, Game Developers, 3D Graphics Programmers all require fundamental knowledge of attitude representations and transformations.
These concepts are used extensively in engineering, simulation, games, computer graphics, and so on.
Why focus on Attitude
Different attitude representations have different limitations, advantages and disadvantages.
Different standards and conventions which can be confusing and are commonly misunderstood.
Difficult for beginners to comprehend rotation transformations
Fundamental concept used in engineering and programming (from autopilot control systems to computer games)
So you don’t waste time trying to solve or debug problems that would be easily avoided with this knowledge! Become a Subject Matter Expert!
Who is this course for:
University students or independent learners.
Aerospace Engineers. This is their bread and butter!
Engineering professionals who wants to brush up on the math theory and skills related to simulation and analysis.
Programmers who wish to understand the basic concepts behind attitude representations and transformations and how to use them from scratch or in existing products (i.e. Unity or other 3D engines).
Anyone already proficient with math “in theory” and want to learn how to implement the theory in code.
So what are you waiting for??
Watch the course instruction video and free samples so that you can get an idea of what the course is like. If you think this course will help you then sign up, money back guarantee if this course is not right for you.
I hope to see you soon in the course!
Steve