Active/passive conventions, frames & multiplication order
Names such as “ZYX” or “quaternion” are not sufficient to specify an orientation interchange. Signs, frame direction, vector layout, and multiplication order matter. The formulas below describe this app as implemented; they do not silently substitute a different library’s convention.
State the source and destination frames
For column vectors, define C_B←A so that v_B = C_B←A v_A: the same physical vector is expressed in frame B instead of frame A. Entry (i, j) is the dot product of destination basis axis i with source basis axis j. Each row describes a destination axis in source-frame coordinates. The inverse mapping is C_A←B = C_B←Aᵀ for an orthogonal rotation.
Passive rotation changes the coordinate frame. Active rotation moves an object or vector in a fixed frame. In the paired convention used here, the active matrix for the same parameter angles is R = Cᵀ. Do not mix an active matrix from one source with a passive matrix from another just because their labels both say “rotation matrix”.
The visualization uses rows of the displayed matrix for its rotated axes in Passive mode and columns in Active mode. Dashed axes are the fixed reference and solid RGB axes are the rotated reference. Dragging the view changes the camera only; it does not change the converted orientation. NED and NWU buttons select camera presets, not transformations of your uploaded attitude data.
The elementary passive matrices
Positive angles use the following passive matrices. Angles a in these formulas are in radians. The sine signs are the opposite of the familiar active, column-vector matrices; transposing each matrix produces the paired active version.
A frame mapping is meaningful only after assigning source and destination frames. The converter does not know whether your axes are world/body, sensor/vehicle, NED/ENU, or camera/object. Record that information alongside the numbers. Camera labels and model drawings cannot infer missing frame metadata.
C_X(a) = [1 0 0; 0 cos(a) sin(a); 0 −sin(a) cos(a)] C_Y(a) = [cos(a) 0 −sin(a); 0 1 0; sin(a) 0 cos(a)] C_Z(a) = [cos(a) sin(a) 0; −sin(a) cos(a) 0; 0 0 1]
Sequence notation means an ordered matrix product
For sequence ijk, this app constructs C = C_k(γ) C_j(β) C_i(α). Here α belongs to the first axis, β to the second, and γ to the third. For ZYX with Z = 10°, Y = 20°, X = 30°, the product is C_X(30°) C_Y(20°) C_Z(10°). It is not C_Z(30°) C_Y(20°) C_X(10°).
The rightmost matrix acts first on a column vector. Thus the Z step acts first, followed by Y and then X. Matrix multiplication is not commutative: swapping X and Y generally changes the orientation. Intrinsic/extrinsic terminology differs across libraries; the explicit product is the safest definition to compare.
Sequence mode loops through steps in the order shown. It updates total = step × total, giving C_final = C_n ⋯ C_2 C_1. Step 1 (the rightmost factor) acts first on a column vector. “Invert” transposes a step. A transpose is the inverse only when the step is a valid orthogonal rotation; it does not repair scale or shear.
v_1 = C_1 v_0 v_2 = C_2 v_1 = C_2 C_1 v_0 C_final = C_3 C_2 C_1
How the existing Active-mode paths behave
Interactive quaternion, Euler, and axis-angle input pass the Passive/Active choice into their conversion functions. Those functions return a passive matrix or its transpose. DCM input is accepted as entered. Bulk non-matrix input currently constructs a passive matrix regardless of the mode toggle; the parser has no Active-mode argument. Sequence paste steps use that same parser. Use Passive mode for the worked examples and for consistent comparisons across input methods.
On output, Active mode transposes the raw stored matrix for display and for representation extraction. Euler extraction uses the reversed distinct-axis sequence, and the formatter swaps the first and third extracted values back into the selector’s axis order. Toggling Active is therefore not simply a cosmetic relabeling. For an identity check, follow the exact transpose path rather than assuming the displayed matrix always equals the raw input.
This behavior has been retained to preserve existing conversions and conventions. If your downstream system requires an active matrix, start with a verified passive matrix C and deliberately use Cᵀ, keeping the frame direction and exported parameter convention explicit. Do not repeatedly transpose values to make a drawing “look right”.