Attitude Sensor Fusion

Gyroscope, star tracker, Sun sensor, and magnetometer fusion; quaternion attitude propagation, multiplicative attitude-error estimation, vector measurements, gyro-bias estimation, safe-mode attitude determination, fine-pointing navigation, sensor validity, observability, numerical robustness, and Monte Carlo verification.

4.2.21 Attitude Sensor Fusion

Spacecraft attitude determination rarely relies on a single sensor. Different attitude sensors provide different kinds of information, operate at different update rates, have different noise characteristics, and remain useful under different mission conditions.

A practical attitude-estimation system therefore combines information from several sensors such as:

The purpose of attitude sensor fusion is to obtain a continuous estimate of spacecraft orientation and angular motion that is more accurate, more robust, and more available than the estimate produced by any individual sensor.

The fundamental idea is

\[ \boxed{ \text{High-rate attitude propagation} + \text{absolute attitude/vector measurements} \rightarrow \text{continuous attitude estimate} } \]

Gyroscopes are especially useful for short-term propagation because they provide high-rate angular-velocity information.

Absolute-reference sensors such as star trackers, Sun sensors, and magnetometers prevent the gyro-integrated attitude from drifting indefinitely.

Thus the architecture is conceptually

\[ \boxed{ \text{Gyro Propagation} \rightarrow \text{Predicted Attitude} \rightarrow \text{Reference-Sensor Correction} } \]

This section develops that idea in detail.

4.2.21.1 What Is Spacecraft Attitude?

The attitude of a spacecraft describes the orientation of its body-fixed coordinate frame relative to a reference frame.

Typical reference frames include:

Let

\[ \mathcal F_I \]

denote an inertial reference frame and

\[ \mathcal F_B \]

the spacecraft body frame.

The attitude defines the rotation between these frames.

It may be represented using:

For spacecraft estimation, quaternions are particularly common because they avoid singularities associated with Euler angles.

4.2.21.2 Quaternion Attitude Representation

A quaternion can be written as

\[ \boxed{ \mathbf q = \begin{bmatrix} q_0\\ \mathbf q_v \end{bmatrix} } \]

where

\[ q_0 \]

is the scalar component and

\[ \mathbf q_v = \begin{bmatrix} q_1\\ q_2\\ q_3 \end{bmatrix} \]

is the vector component.

The unit-quaternion constraint is

\[ \boxed{ \mathbf q^T\mathbf q=1. } \]

This constraint must be maintained during propagation and correction.

The quaternion represents the same physical attitude as

\[ -\mathbf q. \]

Therefore,

\[ \boxed{ \mathbf q \equiv -\mathbf q. } \]

This sign ambiguity must be considered when comparing quaternions.

Why the unit constraint matters

A quaternion has four numerical components but represents only three rotational degrees of freedom. The unit-norm constraint is therefore part of the physical definition of the attitude state, not an optional numerical detail.

4.2.21.3 Why Quaternions Are Preferred

Quaternions are widely used in spacecraft attitude estimation because they:

A three-angle parameterization may become singular at particular orientations.

Quaternions avoid that problem at the cost of introducing one redundant state constrained by

\[ \|\mathbf q\|=1. \]

4.2.21.4 Angular Velocity

Let spacecraft angular velocity be

\[ \boldsymbol\omega = \begin{bmatrix} \omega_x\\ \omega_y\\ \omega_z \end{bmatrix}. \]

The gyroscope measures angular rate approximately as

\[ \boxed{ \boldsymbol\omega_m = \boldsymbol\omega + \mathbf b_g + \mathbf n_g } \]

where

The true angular rate used for propagation is therefore approximated by

\[ \boxed{ \hat{\boldsymbol\omega} = \boldsymbol\omega_m-\hat{\mathbf b}_g. } \]

The quality of attitude propagation depends strongly on the quality of the bias estimate.

4.2.21.5 Quaternion Kinematics

Quaternion attitude evolves according to angular velocity.

A common form is

\[ \boxed{ \dot{\mathbf q} = \frac12 \mathbf\Omega(\boldsymbol\omega) \mathbf q } \]

where

\[ \mathbf\Omega(\boldsymbol\omega) = \begin{bmatrix} 0 & -\omega_x & -\omega_y & -\omega_z\\ \omega_x & 0 & \omega_z & -\omega_y\\ \omega_y & -\omega_z & 0 & \omega_x\\ \omega_z & \omega_y & -\omega_x & 0 \end{bmatrix} \]

for one common quaternion convention.

The exact matrix signs depend on the chosen convention, so the quaternion convention must remain consistent throughout:

Convention must be fixed before implementation

Quaternion kinematics are convention-dependent. The signs in the Omega matrix, the direction of the DCM, and the order of quaternion multiplication must all follow the same convention.

4.2.21.6 Gyroscope-Based Attitude Propagation

At each time step, the gyro measurement is bias-corrected:

\[ \hat{\boldsymbol\omega}_k = \boldsymbol\omega_{m,k} - \hat{\mathbf b}_{g,k}. \]

Then the attitude is propagated:

\[ \boxed{ \hat{\mathbf q}_{k+1}^{-} = \Phi_q(\hat{\boldsymbol\omega}_k,\Delta t) \hat{\mathbf q}_{k}^{+}. } \]

Here

\[ \Phi_q \]

represents quaternion propagation over the time interval.

The superscripts

\[ - \]

and

\[ + \]

typically denote:

Thus:

\[ \boxed{ \hat{\mathbf q}^{+} \rightarrow \text{gyro propagation} \rightarrow \hat{\mathbf q}^{-}. } \]

4.2.21.7 First-Order Quaternion Propagation

For sufficiently small \(\Delta t\),

\[ \mathbf q_{k+1} \approx \left[ \mathbf I + \frac12 \mathbf\Omega(\boldsymbol\omega_k)\Delta t \right] \mathbf q_k. \]

This is simple but may lose accuracy for:

More accurate implementations use:

4.2.21.8 Quaternion Increment Form

Define the rotation increment

\[ \Delta\boldsymbol\theta = \boldsymbol\omega\Delta t. \]

Let

\[ \Delta\theta = \|\Delta\boldsymbol\theta\|. \]

Then the incremental quaternion may be written

\[ \boxed{ \delta\mathbf q = \begin{bmatrix} \cos(\Delta\theta/2)\\ \mathbf u \sin(\Delta\theta/2) \end{bmatrix} } \]

where

\[ \mathbf u = \frac{\Delta\boldsymbol\theta}{\Delta\theta}. \]

The propagated attitude becomes

\[ \boxed{ \mathbf q_{k+1} = \delta\mathbf q \otimes \mathbf q_k } \]

or the reverse multiplication order depending on convention.

4.2.21.9 Why Gyro Propagation Drifts

Even if gyro noise is small, any persistent bias integrates into attitude error.

For approximately constant bias,

\[ \mathbf b_g, \]

the accumulated angular error grows approximately as

\[ \boxed{ \delta\boldsymbol\theta(t) \approx \mathbf b_g t. } \]

Therefore a gyroscope can provide excellent short-term attitude propagation but cannot generally provide bounded long-term absolute attitude on its own.

This is why absolute-reference sensors are required.

Why gyro-only attitude cannot remain bounded

Gyro bias integrates approximately linearly into attitude error. Even a very small constant bias therefore becomes significant when absolute attitude references are absent for long periods.

4.2.21.10 Gyroscope Bias State

A common attitude-estimator state contains

\[ \boxed{ \mathbf x = \begin{bmatrix} \mathbf q\\ \mathbf b_g \end{bmatrix}. } \]

The gyro bias may be modeled as constant:

\[ \dot{\mathbf b}_g=0 \]

or as a random walk:

\[ \boxed{ \dot{\mathbf b}_g = \mathbf w_b. } \]

A first-order Gauss-Markov model may also be used:

\[ \boxed{ \dot{\mathbf b}_g = -\frac1{\tau_b}\mathbf b_g + \mathbf w_b. } \]

The appropriate model depends on the physical gyro characteristics.

4.2.21.11 Why Bias Estimation Is Essential

Suppose the gyro bias is not estimated.

Then the propagated attitude continuously drifts.

Even when absolute sensors occasionally correct attitude, the error repeatedly grows between updates.

Estimating bias allows the filter to learn the systematic component of the gyro measurement.

The architecture becomes

\[ \boxed{ \text{Absolute Attitude Residual} \rightarrow \text{Estimate Gyro Bias} \rightarrow \text{Improve Future Propagation}. } \]

This is one of the most important benefits of attitude sensor fusion.

Bias estimation improves future propagation

Absolute-reference sensors do more than correct the current attitude. Their residuals allow the estimator to infer gyro bias, which reduces the error accumulated during subsequent gyro-only propagation.

4.2.21.12 Star Tracker Measurements

A star tracker observes stars and compares measured star patterns with a catalog.

Depending on the processing architecture, the star tracker may provide:

A quaternion measurement can be written as

\[ \boxed{ \mathbf q_{ST} = \mathbf q \otimes \delta\mathbf q_{ST} } \]

where

\[ \delta\mathbf q_{ST} \]

represents measurement error.

Star trackers generally provide high-accuracy absolute attitude but at a lower update rate than gyroscopes.

4.2.21.13 Role of the Star Tracker

A star tracker provides the long-term attitude reference that limits gyro drift.

Conceptually,

\[ \boxed{ \text{Gyro} = \text{high-rate relative rotation information} } \]

while

\[ \boxed{ \text{Star Tracker} = \text{accurate absolute attitude reference}. } \]

Combining both produces a continuously available attitude estimate with:

4.2.21.14 Direct Quaternion Measurement Fusion

If the star tracker outputs an attitude quaternion

\[ \mathbf q_m, \]

one should not simply compute

\[ \mathbf q_m-\hat{\mathbf q}. \]

Instead define a relative quaternion:

\[ \boxed{ \delta\mathbf q = \mathbf q_m \otimes \hat{\mathbf q}^{-1}. } \]

For small error,

\[ \delta\mathbf q \approx \begin{bmatrix} 1\\ \frac12\delta\boldsymbol\theta \end{bmatrix}. \]

Then the residual can be represented using the three-dimensional error vector

\[ \boxed{ \delta\boldsymbol\theta. } \]

This is the basis of the MEKF approach.

Why quaternion subtraction is avoided

Two quaternions live on the unit-quaternion manifold. A multiplicative relative quaternion respects that geometry and avoids treating four constrained quaternion components as independent Euclidean states.

4.2.21.15 Why a Multiplicative Attitude Error Is Preferred

The quaternion itself has four components but only three rotational degrees of freedom.

A multiplicative error representation separates:

\[ \boxed{ \text{Nominal Quaternion} } \]

from

\[ \boxed{ \text{Three-Dimensional Attitude Error}. } \]

Instead of estimating four unconstrained quaternion corrections, the filter estimates

\[ \delta\boldsymbol\theta. \]

The nominal quaternion is then corrected multiplicatively.

This naturally preserves the geometry of rotations.

4.2.21.16 MEKF Attitude Error State

A typical error state is

\[ \boxed{ \delta\mathbf x = \begin{bmatrix} \delta\boldsymbol\theta\\ \delta\mathbf b_g \end{bmatrix}. } \]

The covariance therefore has dimension

\[ 6\times6 \]

for this simple case.

The full quaternion is propagated separately outside the linear covariance state.

This is one reason the MEKF is particularly common for spacecraft attitude determination.

4.2.21.17 Attitude-Error Dynamics

For small errors, the attitude-error dynamics may be approximated as

\[ \boxed{ \delta\dot{\boldsymbol\theta} = - [\hat{\boldsymbol\omega}\times] \delta\boldsymbol\theta - \delta\mathbf b_g - \mathbf n_g. } \]

Here

\[ [\hat{\boldsymbol\omega}\times] \]

is the skew-symmetric matrix.

For

\[ \mathbf a = \begin{bmatrix} a_x\\ a_y\\ a_z \end{bmatrix}, \]

\[ [\mathbf a\times] = \begin{bmatrix} 0 & -a_z & a_y\\ a_z & 0 & -a_x\\ -a_y & a_x & 0 \end{bmatrix}. \]

These linearized dynamics drive covariance propagation.

Meaning of the attitude-error dynamics

The first term rotates the existing attitude-error vector with the estimated body rate, while bias error and gyro noise drive new attitude error. These dynamics explain how bias uncertainty couples directly into attitude covariance.

4.2.21.18 Vector Measurements

Not all attitude sensors directly provide a quaternion.

Many sensors measure the direction of a known reference vector.

Suppose an inertial-frame reference vector is

\[ \mathbf v^I. \]

The predicted body-frame observation is

\[ \boxed{ \hat{\mathbf v}^{B} = \mathbf C_{BI}(\hat{\mathbf q}) \mathbf v^I. } \]

A sensor provides

\[ \mathbf v_m^B. \]

The residual is

\[ \boxed{ \mathbf r = \mathbf v_m^B - \hat{\mathbf v}^{B}. } \]

This formulation is used for sensors such as:

4.2.21.19 Sun Sensor Measurements

A Sun sensor measures the direction from the spacecraft toward the Sun in the body frame.

Let the inertial Sun vector be

\[ \mathbf s^I. \]

The predicted body-frame Sun vector is

\[ \boxed{ \hat{\mathbf s}^{B} = \mathbf C_{BI}(\hat{\mathbf q}) \mathbf s^I. } \]

The sensor measurement is

\[ \mathbf s_m^B. \]

Then the residual is

\[ \boxed{ \mathbf r_s = \mathbf s_m^B - \hat{\mathbf s}^{B}. } \]

This residual provides attitude information.

4.2.21.20 What a Single Vector Can and Cannot Determine

A single vector constrains two rotational degrees of freedom.

Rotation about that same vector remains unobservable from the vector alone.

Therefore:

\[ \boxed{ \text{One Reference Vector} \rightarrow \text{Incomplete 3-D Attitude Observability}. } \]

For example, a Sun sensor alone cannot determine rotation about the Sun direction.

This is why multiple non-collinear references are useful.

Observability interpretation

A vector measurement fixes the direction of one body axis relative to a known inertial direction, but rotation about that measured direction leaves the vector unchanged. That remaining rotational degree of freedom cannot be recovered from the vector alone.

4.2.21.21 Two-Vector Attitude Determination

Suppose two known inertial vectors are available:

\[ \mathbf v_1^I, \qquad \mathbf v_2^I, \]

with corresponding body measurements

\[ \mathbf v_1^B, \qquad \mathbf v_2^B. \]

If the two reference directions are not collinear, full attitude can generally be determined.

Typical combinations include:

Thus:

\[ \boxed{ \text{Two Independent Vector References} \rightarrow \text{Full Attitude Information}. } \]

4.2.21.22 Magnetometer Measurements

A magnetometer measures the local geomagnetic field vector.

Let an Earth magnetic-field model provide

\[ \mathbf B^I. \]

The predicted body-frame field is

\[ \boxed{ \hat{\mathbf B}^{B} = \mathbf C_{BI}(\hat{\mathbf q}) \mathbf B^I. } \]

The magnetometer provides

\[ \mathbf B_m^B. \]

Then

\[ \boxed{ \mathbf r_B = \mathbf B_m^B - \hat{\mathbf B}^{B}. } \]

This residual contributes attitude information.

4.2.21.23 Limitations of Magnetometer Attitude Information

Magnetometer measurements can be affected by:

Therefore the measurement model is more realistically

\[ \boxed{ \mathbf B_m = \mathbf C_{BI}\mathbf B^I + \mathbf b_B + \mathbf n_B. } \]

Here

\[ \mathbf b_B \]

represents magnetic bias.

Calibration is therefore important.

4.2.21.24 Magnetometer Calibration

A practical magnetometer model may include

\[ \boxed{ \mathbf B_m = \mathbf S_B \mathbf C_{BI}\mathbf B^I + \mathbf b_B + \mathbf n_B } \]

where

\[ \mathbf S_B \]

may include:

Poor calibration can directly appear as attitude-estimation bias.

4.2.21.25 Sun Sensor and Magnetometer Fusion

Sun and magnetic vectors are frequently used together for coarse attitude determination.

The estimator receives

\[ \mathbf s_m^B \]

and

\[ \mathbf B_m^B. \]

Together, when sufficiently non-collinear, they provide full three-axis attitude information.

This is especially useful in:

4.2.21.26 Geometric Conditioning of Two Vectors

If the two reference vectors become nearly parallel, attitude determination becomes poorly conditioned.

Let

\[ \gamma = \cos^{-1} \left( \frac{ \mathbf v_1^T\mathbf v_2 }{ \|\mathbf v_1\|\|\mathbf v_2\| } \right). \]

As

\[ \gamma\rightarrow0 \]

or

\[ \gamma\rightarrow\pi, \]

the information provided by the two vectors becomes nearly redundant.

Therefore:

\[ \boxed{ \text{Good Vector Separation} \rightarrow \text{Better Attitude Observability}. } \]

Geometry controls conditioning

Even when two vectors are mathematically non-collinear, nearly parallel vectors provide weak independent information. The resulting attitude solution can therefore be highly sensitive to noise.

4.2.21.27 TRIAD Method

The TRIAD method constructs orthogonal triads using two vector observations.

From the reference vectors,

\[ \mathbf t_1^I = \frac{\mathbf v_1^I}{\|\mathbf v_1^I\|}, \]

\[ \mathbf t_2^I = \frac{ \mathbf t_1^I \times \mathbf v_2^I }{ \| \mathbf t_1^I \times \mathbf v_2^I \| }, \]

\[ \mathbf t_3^I = \mathbf t_1^I \times \mathbf t_2^I. \]

A corresponding body triad is constructed.

Then the attitude matrix is obtained from the two triads.

TRIAD is useful for coarse or initial attitude determination.

4.2.21.28 Wahba's Problem

A more general vector-attitude determination problem is Wahba's problem.

Given reference vectors

\[ \mathbf v_i^I \]

and measured body vectors

\[ \mathbf v_i^B, \]

find the rotation minimizing

\[ \boxed{ J(\mathbf C) = \frac12 \sum_i a_i \| \mathbf v_i^B - \mathbf C\mathbf v_i^I \|^2. } \]

The weights

\[ a_i \]

represent confidence in each measurement.

Many classical attitude-determination algorithms solve or approximate this problem.

4.2.21.29 QUEST

QUEST is a computationally efficient solution to Wahba's problem.

It can combine multiple vector measurements such as:

QUEST produces a best-fit quaternion estimate.

It is particularly useful for:

A recursive filter can then use that quaternion as an attitude measurement.

4.2.21.30 Static Attitude Determination Versus Dynamic Filtering

Algorithms such as TRIAD and QUEST estimate attitude from measurements at one time.

A Kalman-type attitude estimator adds dynamics.

Therefore:

\[ \boxed{ \text{TRIAD/QUEST} = \text{Instantaneous Attitude Determination} } \]

while

\[ \boxed{ \text{MEKF/ESKF} = \text{Recursive Dynamic Attitude Estimation}. } \]

Dynamic filters can also estimate:

Static and recursive methods solve different problems

TRIAD and QUEST solve an instantaneous attitude-determination problem. Recursive filters additionally exploit time evolution, gyro propagation, covariance, and bias states.

4.2.21.31 Typical Attitude-Fusion Architecture

A representative architecture is

\[ \boxed{ \begin{array}{c} \text{Gyroscope}\\ \downarrow\\ \text{Quaternion Propagation}\\ \downarrow\\ \hat{\mathbf q}^{-}\\ \downarrow\\ \text{Predict Sensor Measurements}\\ \downarrow\\ \text{Form Residuals}\\ \downarrow\\ \text{MEKF Update}\\ \downarrow\\ \hat{\mathbf q}^{+},\hat{\mathbf b}_g \end{array} } \]

Absolute-reference sensors enter only when measurements are available.

4.2.21.32 Multi-Rate Attitude Fusion

Gyroscopes may operate at

\[ 100\text{–}1000~\mathrm{Hz}, \]

while star trackers may update at only a few hertz.

Sun sensors and magnetometers may have yet another rate.

Therefore the estimator usually propagates at gyro rate:

\[ \boxed{ \text{Gyro Measurement} \rightarrow \text{Prediction at Every IMU Step} } \]

and performs corrections asynchronously whenever other sensors arrive:

\[ \boxed{ \text{Absolute Measurement Arrives} \rightarrow \text{Measurement Update}. } \]

This is naturally an event-driven estimation architecture.

Why event-driven updates are natural

The gyro defines the high-rate propagation clock, while lower-rate absolute sensors update the filter only when data arrive. This avoids forcing all sensors onto one artificial sample rate.

4.2.21.33 Star Tracker Update

At time

\[ t_k, \]

the filter may receive

\[ \mathbf q_{ST,k}. \]

The relative quaternion is

\[ \delta\mathbf q_k = \mathbf q_{ST,k} \otimes (\hat{\mathbf q}_k^-)^{-1}. \]

The small-angle residual becomes approximately

\[ \boxed{ \mathbf r_k \approx 2\, \delta\mathbf q_{v,k}. } \]

This residual is used in the Kalman correction.

4.2.21.34 Vector-Sensor Linearization

For

\[ \mathbf v^B = \mathbf C_{BI}(\mathbf q) \mathbf v^I, \]

a small attitude perturbation gives approximately

\[ \delta\mathbf v^B \approx - [\hat{\mathbf v}^{B}\times] \delta\boldsymbol\theta. \]

Therefore the measurement Jacobian is commonly

\[ \boxed{ \mathbf H = \begin{bmatrix} -[\hat{\mathbf v}^{B}\times] & \mathbf 0 \end{bmatrix} } \]

for an error state containing attitude error and gyro-bias error.

This is an important equation for Sun-sensor and magnetometer fusion.

Why the skew matrix appears

A small attitude perturbation changes a predicted vector primarily in the tangent plane perpendicular to that vector. The skew-symmetric matrix is the linear mapping from small rotation error to vector-measurement error.

4.2.21.35 Kalman Measurement Update

The innovation is

\[ \boxed{ \mathbf r_k = \mathbf z_k - h(\hat{\mathbf x}_k^-). } \]

The innovation covariance is

\[ \boxed{ \mathbf S_k = \mathbf H_k \mathbf P_k^- \mathbf H_k^T + \mathbf R_k. } \]

The Kalman gain is

\[ \boxed{ \mathbf K_k = \mathbf P_k^- \mathbf H_k^T \mathbf S_k^{-1}. } \]

The error-state correction is

\[ \boxed{ \delta\hat{\mathbf x}_k = \mathbf K_k\mathbf r_k. } \]

4.2.21.36 Attitude Error Injection

Suppose the filter estimates

\[ \delta\hat{\boldsymbol\theta}. \]

Form a correction quaternion:

\[ \boxed{ \delta\hat{\mathbf q} \approx \begin{bmatrix} 1\\ \frac12\delta\hat{\boldsymbol\theta} \end{bmatrix}. } \]

Then correct the nominal quaternion:

\[ \boxed{ \hat{\mathbf q}^{+} = \delta\hat{\mathbf q} \otimes \hat{\mathbf q}^{-}. } \]

The multiplication order depends on convention.

4.2.21.37 Gyro-Bias Correction

The bias correction is taken from the error-state estimate:

\[ \delta\hat{\mathbf b}_g. \]

Then

\[ \boxed{ \hat{\mathbf b}_g^{+} = \hat{\mathbf b}_g^{-} + \delta\hat{\mathbf b}_g. } \]

The improved bias estimate then affects all future attitude propagation.

Thus the absolute sensors indirectly improve gyro propagation.

4.2.21.38 Error-State Reset

After correction, the estimated attitude-error state is reset:

\[ \boxed{ \delta\hat{\boldsymbol\theta} \leftarrow \mathbf0. } \]

Similarly,

\[ \delta\hat{\mathbf b}_g \leftarrow \mathbf0 \]

if the bias error has been injected into the nominal state.

Covariance must also be transformed consistently under the reset.

This is an important implementation detail in MEKF and ESKF architectures.

Reset is not merely setting numbers to zero

After an error-state correction is injected into the nominal quaternion and bias, the local error coordinates have changed. The covariance must be transformed consistently so it still describes uncertainty in the new local coordinates.

4.2.21.39 Quaternion Normalization

Numerical propagation can cause

\[ \|\mathbf q\| \neq1. \]

Therefore the quaternion is commonly normalized:

\[ \boxed{ \mathbf q \leftarrow \frac{\mathbf q}{\|\mathbf q\|}. } \]

This is simple and effective for maintaining the unit-quaternion constraint.

Normalization should not replace correct quaternion dynamics, but it helps control numerical drift.

4.2.21.40 Safe-Mode Attitude Determination

Safe mode often prioritizes:

A fine star tracker may not be available or may not be required.

A common safe-mode combination is:

\[ \boxed{ \text{Gyro} + \text{Sun Sensor} + \text{Magnetometer}. } \]

This provides sufficient information for coarse three-axis attitude knowledge when geometry is suitable.

Safe mode uses a different design priority

Safe-mode attitude estimation usually values robustness, observability, and power survival more than fine pointing. A simpler sensor combination can therefore be more appropriate than the nominal high-accuracy architecture.

4.2.21.41 Sun-Pointing Safe Mode

In many spacecraft, safe mode seeks to orient solar arrays or a spacecraft axis toward the Sun.

The key measurement is the Sun vector:

\[ \mathbf s_m^B. \]

The estimated attitude can be used to determine the body-frame pointing error.

Because rotation about the Sun vector remains weakly constrained from the Sun sensor alone, magnetometer or gyro information can supplement the estimate.

4.2.21.42 Detumbling and Attitude Estimation

During detumbling, angular rates may initially be high.

The estimator may rely strongly on:

Star trackers may not be usable at high angular rates because of:

As rates decrease, higher-accuracy attitude sensors can be reintroduced.

Thus sensor fusion may change with spacecraft mode.

4.2.21.43 Fine-Pointing Mode

Fine pointing may require:

The architecture can be approximated as

\[ \boxed{ \text{Star Tracker} + \text{Gyro} \rightarrow \text{High-Precision Attitude Estimate}. } \]

The star tracker limits long-term error while the gyro preserves high-bandwidth attitude knowledge between star-tracker updates.

4.2.21.44 Pointing Knowledge Versus Pointing Control

Attitude estimation provides pointing knowledge.

Attitude control uses that estimate to command actuators.

Therefore:

\[ \boxed{ \text{Attitude Estimation Error} \rightarrow \text{Pointing Knowledge Error}. } \]

The closed-loop control system then sees

\[ \hat{\mathbf q} \]

rather than the true attitude.

Estimator quality therefore directly affects pointing performance.

Knowledge and control are coupled but not identical

The estimator reports what it believes the attitude is; the controller acts on that estimate. Estimation error therefore appears to the control system as an error in pointing knowledge.

4.2.21.45 Attitude Knowledge Error

A common performance metric is principal attitude error:

\[ \boxed{ \delta\theta = 2\cos^{-1} \left( |\delta q_0| \right). } \]

This may be reported in:

Axis-specific small-angle errors may also be reported:

\[ \delta\boldsymbol\theta = \begin{bmatrix} \delta\theta_x\\ \delta\theta_y\\ \delta\theta_z \end{bmatrix}. \]

4.2.21.46 Gyro-Bias Estimation Performance

Gyro bias estimation should be evaluated independently.

Define

\[ \boxed{ \tilde{\mathbf b}_g = \mathbf b_g - \hat{\mathbf b}_g. } \]

Metrics may include:

Good attitude accuracy does not necessarily mean the gyro-bias state is well estimated.

4.2.21.47 Attitude Covariance

For a multiplicative filter, attitude covariance usually describes the small-angle error:

\[ \mathbf P_\theta. \]

The one-sigma uncertainty along each error-state axis is

\[ \boxed{ \sigma_{\theta_i} = \sqrt{ P_{\theta,ii} }. } \]

These values can be compared with the actual attitude-error components in simulation.

4.2.21.48 Attitude NEES

For attitude error

\[ \delta\boldsymbol\theta \]

and covariance

\[ \mathbf P_\theta, \]

define

\[ \boxed{ \mathrm{NEES}_{att} = \delta\boldsymbol\theta^T \mathbf P_\theta^{-1} \delta\boldsymbol\theta. } \]

For a three-dimensional attitude-error state, the expected value under ideal assumptions is approximately

\[ 3. \]

This provides a consistency check for attitude covariance.

Why attitude NEES uses a three-state error

For MEKF-style filters the covariance normally describes the local three-dimensional attitude error, not four quaternion components. The consistency statistic should therefore be built from the same local error coordinates.

4.2.21.49 Sensor Innovation Monitoring

Each attitude sensor produces its own innovation.

For star tracker:

\[ \mathbf r_{ST}. \]

For Sun sensor:

\[ \mathbf r_{Sun}. \]

For magnetometer:

\[ \mathbf r_{Mag}. \]

These should be monitored separately because each sensor can fail or degrade independently.

4.2.21.50 Innovation Gating

Before fusing an attitude measurement, calculate

\[ \mathrm{NIS} = \mathbf r^T \mathbf S^{-1} \mathbf r. \]

If

\[ \mathrm{NIS} > \gamma, \]

the measurement may be rejected or down-weighted.

This is particularly useful for:

Gating protects the estimator, not just the sensor

A statistically implausible attitude measurement can drive a large state correction. Innovation gating prevents a single bad star-tracker, Sun-sensor, or magnetometer update from corrupting the fused attitude.

4.2.21.51 Star Tracker Failure Modes

Star-tracker measurements may degrade because of:

Therefore the estimator should use quality information and innovation validation rather than blindly accepting every solution.

4.2.21.52 Sun Sensor Limitations

Sun sensors may become unavailable during eclipse.

Therefore

\[ \boxed{ \text{Sun Sensor Availability} = 0 } \]

during eclipse or when the Sun lies outside the sensor field of view.

The estimator must continue using other sensors.

Gyro propagation becomes particularly important during such intervals.

4.2.21.53 Magnetometer Disturbance

A magnetometer may be corrupted while magnetic actuators are active.

For example, if a magnetorquer generates

\[ \mathbf B_{MTQ}, \]

the measurement may become

\[ \mathbf B_m = \mathbf B_{\text{Earth}} + \mathbf B_{MTQ} + \mathbf B_{\text{spacecraft}} + \mathbf n. \]

The estimator may therefore:

4.2.21.54 Sensor Alignment Errors

Each attitude sensor has its own sensor frame.

Let

\[ \mathbf C_{BS} \]

represent the rotation from sensor frame to body frame.

Then a sensor measurement

\[ \mathbf v^S \]

must be transformed:

\[ \boxed{ \mathbf v^B = \mathbf C_{BS}\mathbf v^S. } \]

If the alignment matrix is wrong, a systematic attitude error results.

Alignment is part of the measurement model

A high-quality sensor still produces a biased body-frame measurement if its mounting transformation is wrong. Sensor-to-body alignment must therefore be treated with the same care as the sensor noise model.

4.2.21.55 Misalignment Calibration

Small sensor misalignment may be represented by

\[ \delta\boldsymbol\alpha. \]

The alignment matrix can be approximated as

\[ \boxed{ \mathbf C_{BS} \approx \left( \mathbf I - [\delta\boldsymbol\alpha\times] \right) \mathbf C_{BS,0}. } \]

Calibration states may even be estimated online if sufficiently observable.

4.2.21.56 Sensor Lever Arms

Some sensors are not located at the spacecraft center of mass.

For pure attitude-vector sensors, lever arm may not directly affect the vector direction.

However, in systems combining translational and rotational measurements, sensor position can matter.

This becomes especially important for:

The general sensor-fusion architecture must therefore track sensor location and orientation accurately.

4.2.21.57 Time Synchronization in Attitude Fusion

Gyro and star-tracker measurements must refer to the correct epochs.

Suppose a star-tracker measurement corresponds to

\[ t_m \]

but is applied at

\[ t_k. \]

If

\[ t_m\neq t_k, \]

then for rotating spacecraft the attitude measurement is stale.

Approximate error due to delay is

\[ \boxed{ \delta\boldsymbol\theta \approx \boldsymbol\omega\Delta t. } \]

Thus even small timing errors can matter during rapid rotation.

Timing becomes attitude error during rotation

A timestamp offset is approximately converted into an angular error through the spacecraft body rate. The faster the spacecraft rotates, the more damaging the same timing error becomes.

4.2.21.58 Star Tracker Latency

A star tracker may have image exposure and processing latency.

The estimator should ideally know the timestamp of the observation itself, not merely the time when the processed quaternion was received.

Then the filter can:

4.2.21.59 Gyro Sampling and Coning Motion

When angular velocity changes significantly within a sample interval, simple rate integration can introduce coning error.

High-quality inertial processing may use coning corrections based on incremental angles.

For example,

\[ \Delta\boldsymbol\theta \]

is not always adequately represented by

\[ \boldsymbol\omega_k\Delta t. \]

This becomes important for:

Why coning correction can matter

When rotation changes direction within a sample interval, sequential small rotations do not commute. High-fidelity inertial processing therefore uses incremental-angle corrections rather than assuming one constant rate.

4.2.21.60 Gyro Noise and Attitude Error Growth

If gyro white noise has variance

\[ \sigma_\omega^2, \]

integrated attitude uncertainty approximately grows with time.

For simple white noise,

\[ \sigma_\theta \propto \sqrt{t}. \]

For constant unknown bias,

\[ \sigma_\theta \propto t. \]

Therefore different gyro error processes produce different long-term attitude-error growth.

4.2.21.61 Bias Observability

A constant gyro bias is not automatically observable under every measurement configuration.

Bias becomes observable through the way it causes propagated attitude to disagree with absolute attitude references over time.

Thus:

\[ \boxed{ \text{Gyro Bias Observability} \rightarrow \text{Absolute Attitude Information + Time Evolution}. } \]

If absolute attitude measurements disappear for a long interval, bias uncertainty grows.

Bias observability is created over time

An absolute attitude sensor does not usually measure gyro bias directly. Bias becomes observable because an incorrect bias creates a systematic propagation error that later appears in attitude residuals.

4.2.21.62 Covariance During Star Tracker Dropout

If the star tracker is lost, attitude covariance generally grows.

Conceptually,

\[ \boxed{ \mathbf P_\theta(t+\Delta t) > \mathbf P_\theta(t) } \]

during gyro-only propagation.

When the star tracker returns, covariance may reduce sharply after successful measurement updates.

This behaviour is expected.

4.2.21.63 Reacquisition After Star Tracker Return

When an absolute sensor returns after a long dropout, the attitude residual may be large.

The estimator should not blindly perform a large linearized update if the attitude error is outside the local validity region.

Possible strategies include:

The appropriate strategy depends on expected error magnitude.

Large residuals can violate the local filter assumption

After a long dropout, the attitude error may no longer be small enough for a linearized MEKF correction. Reacquisition logic should therefore check whether a reset or coarse reinitialization is safer.

4.2.21.64 Small-Angle Assumption

MEKF error-state linearization usually assumes

\[ \|\delta\boldsymbol\theta\| \ll1. \]

If the initial attitude error is very large, the local linearization may be poor.

Therefore initialization may require:

After coarse alignment, the recursive error-state filter can operate within the small-angle region.

4.2.21.65 Attitude Initialization

Initial attitude

\[ \hat{\mathbf q}_0 \]

may come from:

Initial uncertainty is represented by

\[ \mathbf P_{\theta,0}. \]

The covariance should reflect the actual quality of the initialization source.

4.2.21.66 Initial Gyro Bias

The initial bias estimate may be obtained from stationary measurements:

\[ \hat{\mathbf b}_{g,0} = \frac1N \sum_{k=1}^{N} \boldsymbol\omega_{m,k} \]

if true angular rate is known to be approximately zero.

In flight, this may not be possible.

Then a manufacturer calibration or previous estimate may be used with larger uncertainty.

4.2.21.67 Attitude Filter Convergence

Attitude filter convergence should be evaluated for both:

\[ \delta\boldsymbol\theta \]

and

\[ \delta\mathbf b_g. \]

Attitude may converge quickly while gyro bias takes longer.

Therefore:

\[ \boxed{ T_{\text{attitude}} \neq T_{\text{bias}}. } \]

Both are important.

4.2.21.68 Fine-Pointing Convergence

For fine-pointing operation, it is not enough for coarse attitude error to become small.

One may require:

\[ \|\delta\boldsymbol\theta\| < \theta_{\mathrm{fine}}, \]

\[ \|\delta\mathbf b_g\| < b_{\mathrm{fine}}, \]

and

\[ \sigma_\theta < \sigma_{\mathrm{fine}}. \]

These conditions ensure both accuracy and credible uncertainty.

4.2.21.69 Sensor-Specific Measurement Covariance

Each sensor has its own covariance:

\[ \mathbf R_{ST}, \]

\[ \mathbf R_{Sun}, \]

\[ \mathbf R_{Mag}. \]

These should reflect actual measurement quality.

A star tracker may provide much smaller attitude uncertainty than a coarse Sun sensor.

Therefore the estimator naturally weights them differently.

Measurement covariance is the filter's trust model

Different sensors should not be weighted by name or perceived quality alone. Their current covariance and measurement sensitivity determine how strongly they affect the fused estimate.

4.2.21.70 Star Tracker Covariance

A star tracker may specify attitude error differently across axes.

For example:

\[ \sigma_{\mathrm{cross-boresight}} \]

may differ from

\[ \sigma_{\mathrm{roll}}. \]

Thus assuming isotropic covariance

\[ \mathbf R = \sigma^2\mathbf I \]

may be inaccurate.

Anisotropic measurement covariance should be used when appropriate.

4.2.21.71 Sun Sensor Covariance

Sun-sensor angular uncertainty may be represented approximately in tangent-plane coordinates.

Because the vector is normalized,

\[ \|\mathbf s\|=1, \]

only two independent directional degrees of freedom are present.

The covariance should therefore correspond to directional uncertainty rather than arbitrary independent Cartesian noise.

4.2.21.72 Magnetometer Covariance

Magnetometer measurement covariance should include the effects of:

A very small electronics-noise figure alone may substantially underestimate real attitude information uncertainty.

4.2.21.73 Normalizing Vector Measurements

Vector measurements are often normalized:

\[ \boxed{ \bar{\mathbf v} = \frac{\mathbf v}{\|\mathbf v\|}. } \]

This removes magnitude information and uses only direction.

For attitude determination, this is often appropriate because the attitude information is primarily contained in direction.

However, normalization changes the noise statistics and introduces correlation between components.

Normalization changes statistics

Normalizing a noisy three-component vector constrains it to the unit sphere. The resulting component errors are correlated and lie mainly in the tangent plane.

4.2.21.74 Vector Measurement Residual Choice

Instead of simple subtraction,

\[ \mathbf r = \mathbf v_m-\hat{\mathbf v}, \]

one may use the cross-product residual:

\[ \boxed{ \mathbf r = \mathbf v_m \times \hat{\mathbf v}. } \]

For small angular error, this residual is directly related to attitude error.

This can be numerically convenient for normalized vectors.

4.2.21.75 Cross-Product Residual

For small attitude error,

\[ \mathbf v_m \approx \hat{\mathbf v} - [\hat{\mathbf v}\times] \delta\boldsymbol\theta. \]

Then

\[ \mathbf v_m\times\hat{\mathbf v} \]

contains first-order attitude-error information.

This avoids treating the radial component of a normalized vector as an independent measurement.

4.2.21.76 Sequential Versus Batch Sensor Updates

If several independent sensors arrive at the same epoch, measurements can be processed:

For independent measurement noise, properly implemented sequential and batch updates are theoretically equivalent in the linear case.

Sequential processing can reduce matrix dimension.

4.2.21.77 Stacked Vector Measurement

For Sun sensor and magnetometer,

\[ \mathbf z = \begin{bmatrix} \mathbf s_m\\ \mathbf B_m \end{bmatrix}. \]

The predicted measurement is

\[ h(\mathbf x) = \begin{bmatrix} \hat{\mathbf s}\\ \hat{\mathbf B} \end{bmatrix}. \]

The measurement covariance may be

\[ \boxed{ \mathbf R = \begin{bmatrix} \mathbf R_s & \mathbf 0\\ \mathbf 0 & \mathbf R_B \end{bmatrix} } \]

if the measurement errors are independent.

4.2.21.78 Cross-Sensor Correlation

If two attitude sensors share:

their errors may be correlated.

Then

\[ \boxed{ E[ \mathbf v_1 \mathbf v_2^T ] \neq 0. } \]

Ignoring strong cross-sensor correlation can make the filter overconfident.

Shared error sources can create overconfidence

If two sensors contain common timing, calibration, or reference-model error, fusing them as independent measurements counts some information twice and can shrink covariance unrealistically.

4.2.21.79 Measurement Availability Logic

An attitude estimator should track whether each sensor is usable.

For sensor \(i\),

\[ \texttt{VALID}_i \in \{0,1\}. \]

This validity may depend on:

Only valid measurements should be fused.

4.2.21.80 Sensor Priority Is Not the Same as Sensor Trust

The filter should not simply hard-code:

star tracker always better than magnetometer.

Trust should depend on actual covariance and validity.

The information contribution is governed by:

\[ \mathbf R_i \]

and the measurement sensitivity.

Thus a degraded star tracker may temporarily contribute less useful information than a healthy alternative sensor.

Trust should be dynamic

A normally precise star tracker may become poor during high-rate motion or optical contamination, while a coarser sensor may remain healthy. Fusion should therefore be driven by validity and uncertainty, not a permanent hierarchy.

4.2.21.81 Attitude Sensor Redundancy

Multiple sensors of the same type may be installed for:

For example:

\[ ST_1, \quad ST_2. \]

The estimator may:

Care is required if their errors are correlated.

4.2.21.82 Redundant Star Trackers

Two star trackers mounted on different spacecraft faces can improve:

If both provide independent valid attitude solutions, they can be fused.

But if both depend on the same catalog or attitude-processing chain, some systematic errors may be common.

4.2.21.83 Fault Detection Between Redundant Sensors

Suppose two star trackers provide

\[ \mathbf q_1, \qquad \mathbf q_2. \]

Form the relative quaternion:

\[ \boxed{ \delta\mathbf q_{12} = \mathbf q_1 \otimes \mathbf q_2^{-1}. } \]

A large disagreement can indicate a problem.

However, identifying which sensor is faulty may require:

4.2.21.84 Attitude Sensor Fusion and FDIR

Attitude estimation should interact with FDIR.

The estimator can provide:

FDIR can respond by:

Estimator residuals are useful FDIR evidence

Repeated innovation failures, covariance growth, or disagreement between redundant sensors can provide evidence that a sensor should be isolated or the estimator should enter a degraded configuration.

4.2.21.85 Degraded Attitude Navigation

If the star tracker fails, the estimator may continue using:

\[ \boxed{ \text{Gyro} + \text{Sun Sensor} + \text{Magnetometer}. } \]

Accuracy may degrade, but navigation may remain adequate for safe mode.

If the Sun sensor also becomes unavailable during eclipse, the filter may rely on:

\[ \text{gyro} + \text{magnetometer} \]

with further degraded observability.

The covariance should reflect this degradation.

4.2.21.86 Gyro-Only Mode

In complete loss of absolute-reference measurements:

\[ \boxed{ \text{Gyro Only} \rightarrow \text{Unbounded Long-Term Attitude Drift}. } \]

The filter can still propagate attitude temporarily.

But covariance should grow because absolute attitude is no longer constrained.

Thus gyro-only propagation is generally a temporary degraded mode, not a long-term absolute attitude solution.

4.2.21.87 Attitude Observability

Attitude observability depends on:

A single fixed vector leaves rotation about that vector weakly observable.

Two non-collinear vectors provide full attitude information.

Bias observability additionally depends on time evolution.

Observability is mode-dependent

The same spacecraft can move between fully observable and weakly observable attitude configurations as sensors disappear, geometry changes, or spacecraft motion changes.

4.2.21.88 Attitude Observability Matrix

For a linearized error system,

\[ \delta\dot{\mathbf x} = \mathbf F\delta\mathbf x, \]

\[ \delta\mathbf z = \mathbf H\delta\mathbf x, \]

the observability matrix is

\[ \boxed{ \mathcal O = \begin{bmatrix} \mathbf H\\ \mathbf H\mathbf F\\ \mathbf H\mathbf F^2\\ \vdots \end{bmatrix}. } \]

Full rank indicates local linear observability.

For nonlinear attitude systems, observability is more complicated, but the same physical ideas remain important.

4.2.21.89 Gyro Bias Observability Through Motion

Spacecraft motion can improve bias observability.

Different orientations relative to:

change measurement sensitivity.

Therefore manoeuvres can sometimes improve estimator calibration.

This is an example of:

\[ \boxed{ \text{Motion} \rightarrow \text{Excitation} \rightarrow \text{Better Observability}. } \]

4.2.21.90 Attitude Sensor Fusion During Slews

During a slew:

The estimator should therefore be validated separately for:

\[ \text{fine pointing} \]

and

\[ \text{large-angle slews}. \]

The same tuning may not perform equally well in both conditions.

Slew and fine-pointing cases should be validated separately

Large slews stress timing, propagation, sensor tracking, and local linearization. Fine pointing instead emphasizes bias, low-frequency drift, and high-precision noise.

4.2.21.91 Mode-Dependent Measurement Covariance

A star tracker may have different uncertainty during:

Therefore,

\[ \boxed{ \mathbf R_{ST} = \mathbf R_{ST}(\text{quality, rate, mode}). } \]

Similarly, magnetometer quality may depend on actuator state.

Dynamic covariance models can therefore be more realistic than fixed values.

4.2.21.92 Fine-Pointing Sensor Fusion

For precision pointing, the estimator may combine:

\[ \boxed{ \text{Low-Noise Gyro} + \text{Star Tracker}. } \]

The gyro provides high-frequency attitude-rate information.

The star tracker provides low-frequency absolute attitude correction.

This can be interpreted as complementary information in the frequency domain.

4.2.21.93 Frequency-Domain Interpretation

Gyros are strong at high frequency but drift at low frequency.

Absolute attitude sensors are strong at low frequency but may have:

Therefore:

\[ \boxed{ \text{Gyro} \rightarrow \text{High-Frequency Information} } \]

and

\[ \boxed{ \text{Absolute Sensor} \rightarrow \text{Low-Frequency Reference}. } \]

Kalman filtering provides a statistically derived way of combining these sources.

Frequency-domain view explains the complementarity

Gyros preserve high-frequency rotational information well but drift at low frequency. Absolute sensors provide the low-frequency reference that prevents that drift.

4.2.21.94 Complementary Filter Interpretation

A simplified attitude filter can be understood as

\[ \boxed{ \hat{\theta} = \text{High-Pass Gyro Contribution} + \text{Low-Pass Absolute Attitude Contribution}. } \]

A complementary filter explicitly performs this frequency separation.

A Kalman filter generalizes the idea using dynamic and measurement uncertainty.

4.2.21.95 Attitude Rate Estimation

Some architectures estimate angular rate as a state:

\[ \mathbf x = \begin{bmatrix} \mathbf q\\ \boldsymbol\omega\\ \mathbf b_g \end{bmatrix}. \]

Others treat gyro measurements directly as angular-rate input.

The choice depends on:

4.2.21.96 Dynamic Attitude Model

If angular rate is estimated using rigid-body dynamics,

\[ \boxed{ \mathbf J\dot{\boldsymbol\omega} + \boldsymbol\omega \times (\mathbf J\boldsymbol\omega) = \mathbf T. } \]

Then the estimator may use:

This can improve prediction but increases model dependence.

Dynamic models add information and risk

Including rigid-body torque dynamics can improve prediction when inertia and torques are known accurately, but it also creates sensitivity to actuator and disturbance-model errors.

4.2.21.97 Kinematic Versus Dynamic Attitude Filters

A kinematic filter propagates attitude primarily using gyro measurements.

A dynamic filter also propagates angular rate using rigid-body torque dynamics.

Thus:

\[ \boxed{ \text{Kinematic Filter} \rightarrow \text{Sensor-Driven Propagation} } \]

while

\[ \boxed{ \text{Dynamic Filter} \rightarrow \text{Physics-Based Rate Prediction}. } \]

Dynamic filters may offer benefits when torque models are reliable.

4.2.21.98 Reaction-Wheel Information

Reaction-wheel speeds and commanded torques can provide useful dynamic information.

If wheel torque is known,

\[ \mathbf T_{RW}, \]

it may be included in the spacecraft rotational dynamics model.

However, actuator uncertainty and momentum-exchange effects must be modeled properly.

4.2.21.99 Thruster-Induced Rotation

Thruster firings can generate attitude disturbances.

During such periods:

\[ \mathbf Q_{\omega} \]

may need to represent increased dynamic uncertainty.

Thus:

\[ \boxed{ \text{Thruster Activity} \rightarrow \text{Potential Increase in Attitude Process Noise}. } \]

This is a general spacecraft estimation consideration.

4.2.21.100 Flexible-Body Effects

Large spacecraft may experience:

These can affect:

A rigid-body attitude filter may therefore show correlated innovations when flexible modes are significant.

Flexible dynamics can appear as estimator mismatch

If the true line of sight or gyro motion contains flexible-body content that the rigid-body filter cannot represent, innovations may become temporally correlated rather than purely white.

4.2.21.101 Structural Jitter

Fine-pointing missions may care about high-frequency jitter.

A star tracker may not measure such high-frequency motion at sufficient bandwidth.

Gyros or specialized sensors may capture it better.

Therefore sensor fusion can separate:

\[ \boxed{ \text{Low-Frequency Absolute Attitude} } \]

from

\[ \boxed{ \text{High-Frequency Jitter/Rate Information}. } \]

4.2.21.102 Attitude Determination During Eclipse

During eclipse:

\[ \text{Sun sensor unavailable}. \]

The filter may rely on:

If star tracker is also unavailable, observability may degrade significantly.

The estimator covariance should grow accordingly rather than remaining artificially small.

4.2.21.103 Star Tracker Blinding

If the Sun, Earth limb, or Moon enters a star tracker exclusion region, the sensor may become invalid.

The navigation system should not interpret missing star-tracker measurements as a filter fault.

Instead:

\[ \boxed{ \text{Known Sensor Unavailability} \neq \text{Unexpected Sensor Failure}. } \]

The estimator should continue using the remaining sensors.

4.2.21.104 Attitude Estimation During Safe Hold

Safe-hold attitude estimation may prioritize robustness over maximum accuracy.

A simplified state might contain only

\[ \mathbf q, \quad \mathbf b_g. \]

A smaller, well-understood estimator can sometimes be preferable to a more complex estimator in emergency modes.

4.2.21.105 Fine Attitude Determination

Fine attitude determination may include additional states:

\[ \boxed{ \mathbf x = [ \delta\boldsymbol\theta, \mathbf b_g, \delta\boldsymbol\alpha_{ST}, \cdots ]^T. } \]

Possible calibration states include:

These states should only be added if sufficiently observable.

Extra states require information, not just equations

Adding calibration or timing states is useful only when the measurements and motion actually excite those states. Otherwise covariance may grow without meaningful convergence.

4.2.21.106 Calibration-State Estimation

Adding a state does not guarantee it can be estimated.

For calibration parameter

\[ c, \]

the estimator needs measurement sensitivity:

\[ \frac{\partial h}{\partial c} \neq0. \]

The spacecraft motion and sensor geometry must also provide sufficient excitation.

Otherwise the calibration state may simply increase covariance dimension without adding useful information.

4.2.21.107 Gyro Scale-Factor Error

A gyro measurement may include scale-factor error:

\[ \boxed{ \boldsymbol\omega_m = (\mathbf I+\mathbf S_g)\boldsymbol\omega + \mathbf b_g + \mathbf n_g. } \]

Scale-factor states may be estimated if rotational motion sufficiently excites the relevant axes.

4.2.21.108 Gyro Misalignment

Cross-axis misalignment may be modeled as

\[ \boldsymbol\omega_m = \mathbf M_g \boldsymbol\omega + \mathbf b_g + \mathbf n_g. \]

If

\[ \mathbf M_g \neq\mathbf I, \]

axis coupling occurs.

This can create systematic attitude errors during multi-axis rotation.

4.2.21.109 Time-Offset Estimation

A timing offset

\[ \Delta t \]

between gyro and star tracker can produce attitude residuals approximately proportional to angular rate:

\[ \boxed{ \delta\boldsymbol\theta_t \approx \boldsymbol\omega\Delta t. } \]

Under suitable motion, timing offset may be estimated as a state.

But this requires sufficient excitation.

4.2.21.110 Measurement Preprocessing

Before an attitude measurement enters the filter, preprocessing may include:

This preprocessing is part of the estimation chain and should be validated just as carefully as the filter equations.

4.2.21.111 Sign Handling for Quaternion Measurements

Because

\[ \mathbf q \equiv -\mathbf q, \]

a measured quaternion may suddenly switch sign.

Before computing the relative quaternion, one can enforce

\[ \boxed{ \mathbf q_m^T\hat{\mathbf q}>0. } \]

If not,

\[ \mathbf q_m \leftarrow -\mathbf q_m. \]

This avoids an artificial large residual caused purely by quaternion sign choice.

Quaternion sign changes are not physical attitude jumps

Because q and -q represent the same rotation, a sign flip from a star tracker must be handled before residual formation or the filter can see a false 360-degree-scale discrepancy.

4.2.21.112 Quaternion Convention Consistency

Several conventions exist:

A mathematically correct formula under one convention can be wrong under another.

Therefore a spacecraft attitude-estimation implementation should explicitly document:

\[ \boxed{ \text{Quaternion Definition} + \text{Multiplication Convention} + \text{Frame Direction}. } \]

Convention errors are structural errors

A wrong convention cannot be repaired by retuning process or measurement covariance. Propagation, DCM conversion, measurement prediction, and error injection must all agree.

4.2.21.113 DCM and Quaternion Consistency

The quaternion-to-DCM conversion must match the same convention used by:

Otherwise vector predictions such as

\[ \mathbf C_{BI}\mathbf s^I \]

may be reversed or transposed.

Frame-convention errors are among the most common causes of attitude-filter failure.

4.2.21.114 Frame Chain for Sensor Measurements

A typical vector transformation may be

\[ \boxed{ \mathcal F_I \rightarrow \mathcal F_B \rightarrow \mathcal F_S. } \]

For example,

\[ \mathbf v^S = \mathbf C_{SB} \mathbf C_{BI} \mathbf v^I. \]

Every transformation should be clearly defined.

4.2.21.115 Innovation in the Correct Frame

A measured vector and predicted vector must be expressed in the same coordinate frame before subtraction.

Therefore:

\[ \boxed{ \mathbf r = \mathbf z^B-\hat{\mathbf z}^B } \]

is valid.

But

\[ \mathbf z^S-\hat{\mathbf z}^B \]

is physically meaningless unless

\[ S=B. \]

4.2.21.116 Attitude-Filter Numerical Stability

Important numerical checks include:

\[ \|\mathbf q\|\approx1, \]

\[ \mathbf P=\mathbf P^T, \]

\[ \lambda_i(\mathbf P)\ge0. \]

The filter should also avoid:

Numerical health is part of navigation health

A statistically sound attitude filter is still unusable if quaternion normalization, covariance symmetry, or positive semidefiniteness are lost during finite-precision computation.

4.2.21.117 Joseph Covariance Update

A numerically robust covariance update is

\[ \boxed{ \mathbf P^+ = (\mathbf I-\mathbf K\mathbf H) \mathbf P^- (\mathbf I-\mathbf K\mathbf H)^T + \mathbf K\mathbf R\mathbf K^T. } \]

This Joseph form better preserves symmetry and positive semidefiniteness than the simplified covariance equation under finite precision.

4.2.21.118 Square-Root Attitude Filters

For high numerical robustness, one may propagate a square-root factor

\[ \mathbf S \]

such that

\[ \mathbf P = \mathbf S\mathbf S^T. \]

Square-root filtering can improve numerical conditioning, especially for high-precision or large-state estimators.

4.2.21.119 Attitude Filter Performance Metrics

Important metrics include:

Performance should be evaluated over multiple operating conditions.

4.2.21.120 Monte Carlo Attitude Testing

Monte Carlo testing should vary:

This reveals whether the estimator performs reliably rather than only in a nominal case.

Why Monte Carlo is required

Attitude performance depends on random initial error, sensor noise, bias, geometry, dropouts, and timing. Multiple randomized runs are therefore needed to establish probability, percentile, and convergence behaviour.

4.2.21.121 Monte Carlo Attitude Error

For run \(j\),

\[ \delta\boldsymbol\theta^{(j)}(t) \]

can be recorded.

Then evaluate:

\[ \mathrm{RMSE}, \]

\[ \theta_{95}, \]

\[ \theta_{99}, \]

\[ \theta_{\max}. \]

This provides a statistical description of attitude performance.

4.2.21.122 Convergence Probability

Define

\[ I_j = \begin{cases} 1,&\text{attitude filter converges},\\ 0,&\text{otherwise}. \end{cases} \]

Then

\[ \boxed{ P_{\mathrm{conv}} \approx \frac1N \sum_{j=1}^{N} I_j. } \]

This is particularly important when initial attitude uncertainty can be large.

4.2.21.123 Star Tracker Dropout Testing

A representative test is:

  1. operate with gyro + star tracker,
  2. disable star tracker,
  3. continue gyro propagation,
  4. observe error and covariance growth,
  5. restore star tracker,
  6. evaluate correction and recovery.

Key quantities are:

\[ e_{\theta,\max}, \]

\[ P_{\theta,\max}, \]

\[ T_{\mathrm{recover}}. \]

Dropout testing checks both prediction and recovery

The outage period tests gyro propagation and covariance growth; reacquisition tests gating, large-residual handling, correction magnitude, and reconvergence.

4.2.21.124 Sun Sensor Dropout Testing

Similarly, eclipse intervals can be simulated.

The estimator should:

No artificial discontinuity should occur merely because the measurement stream resumes.

4.2.21.125 Magnetic Disturbance Testing

Inject magnetic disturbance:

\[ \Delta\mathbf B. \]

Evaluate:

This validates both estimation and sensor-fault handling.

4.2.21.126 Sensor Bias Testing

Inject a bias into an attitude sensor.

For example,

\[ \mathbf z = h(\mathbf x) + \mathbf b + \mathbf v. \]

Observe whether the filter:

4.2.21.127 Misalignment Testing

Introduce a fixed alignment error

\[ \delta\boldsymbol\alpha. \]

Then evaluate whether:

This is useful for distinguishing random noise from systematic calibration errors.

4.2.21.128 Timing Error Testing

Introduce sensor delay

\[ \Delta t. \]

During a slew, attitude error may approximately scale with

\[ \|\boldsymbol\omega\|\Delta t. \]

This makes slew cases particularly useful for detecting timing problems.

4.2.21.129 High-Rate Rotation Testing

Validate the estimator across expected angular rates.

Check:

An estimator tuned only for fine pointing may not behave correctly during rapid reorientation.

4.2.21.130 Low-Rate Fine-Pointing Testing

At very low angular rate, different problems become important:

Fine-pointing tests should therefore use realistic low-rate sensor models rather than only large manoeuvres.

4.2.21.131 Attitude-Sensor Fusion in Flight Software

A practical flight-software sequence may be:

\[ \boxed{ \begin{array}{c} \text{Read Gyro}\\ \downarrow\\ \text{Propagate Quaternion}\\ \downarrow\\ \text{Propagate Covariance}\\ \downarrow\\ \text{Check New Absolute Measurements}\\ \downarrow\\ \text{Validate Measurement}\\ \downarrow\\ \text{Compute Innovation}\\ \downarrow\\ \text{Gate}\\ \downarrow\\ \text{Kalman Update}\\ \downarrow\\ \text{Inject Error}\\ \downarrow\\ \text{Reset Error State}\\ \downarrow\\ \text{Publish Attitude + Covariance} \end{array} } \]

Flight-software ordering matters

The sequence ensures the nominal attitude and covariance refer to the same epoch before measurement validation and correction. Changing this order carelessly can introduce timing and consistency errors.

4.2.21.132 Published Attitude Solution

The estimator may publish:

\[ \hat{\mathbf q}, \]

\[ \hat{\boldsymbol\omega}, \]

\[ \hat{\mathbf b}_g, \]

\[ \mathbf P, \]

along with health flags such as:

\[ \texttt{ATT\_VALID}, \]

\[ \texttt{ST\_VALID}, \]

\[ \texttt{SUN\_VALID}, \]

\[ \texttt{MAG\_VALID}. \]

Downstream control should use both the state and its validity.

4.2.21.133 Attitude Validity Logic

Attitude validity may require:

\[ \sigma_\theta < \sigma_{\max}, \]

valid numerical state,

and sufficient sensor/observability conditions.

Thus:

\[ \boxed{ \text{Valid Attitude} \neq \text{Filter Is Running}. } \]

The filter can continue propagating internally even when the published attitude is considered degraded.

Running is not the same as valid

An estimator can continue propagating internally while uncertainty grows beyond the level permitted for control or mission decisions. Validity logic communicates that distinction downstream.

4.2.21.134 Attitude Accuracy Requirement

A requirement may be written

\[ \boxed{ \theta_{95} < \theta_{\mathrm{req}}. } \]

Or in RMS form:

\[ \boxed{ \mathrm{RMSE}_{\theta} < \theta_{\mathrm{req}}. } \]

The statistical meaning must be explicit.

4.2.21.135 Attitude Knowledge Versus Stability

Attitude knowledge is an estimation property.

Pointing stability describes how much the spacecraft physically moves.

A spacecraft may have:

Therefore:

\[ \boxed{ \text{Knowledge} \neq \text{Stability}. } \]

4.2.21.136 Estimation and Control Interaction

If attitude estimation is noisy, control may produce excessive actuator activity.

If attitude estimate is delayed, the controller may experience effective phase lag.

If covariance is overconfident, mode logic may permit operations before attitude knowledge is actually sufficient.

Thus estimation performance must ultimately be checked in closed loop.

Closed-loop assessment is the final test

Attitude estimation affects actuator commands, which alter spacecraft motion and the next sensor measurements. A filter that looks acceptable offline can still produce undesirable control interaction.

4.2.21.137 High-Level Sensor Role Summary

The major attitude sensors can be summarized as:

\[ \boxed{ \text{Gyroscope} \rightarrow \text{High-Rate Relative Rotation} } \]

\[ \boxed{ \text{Star Tracker} \rightarrow \text{High-Accuracy Absolute Attitude} } \]

\[ \boxed{ \text{Sun Sensor} \rightarrow \text{Sun-Vector Reference} } \]

\[ \boxed{ \text{Magnetometer} \rightarrow \text{Geomagnetic Vector Reference}. } \]

Their strengths are complementary.

4.2.21.138 Why No Single Sensor Is Sufficient for Every Mode

A gyro drifts.

A star tracker can be unavailable or relatively low rate.

A Sun sensor loses availability in eclipse and provides only one direction.

A magnetometer is comparatively coarse and sensitive to disturbances.

Therefore spacecraft attitude determination naturally benefits from sensor fusion.

The objective is not simply to average sensor outputs.

It is to use each sensor according to:

Fusion is selective information use, not averaging

Each sensor constrains different directions, at different rates and uncertainties. A good estimator uses only the information that is currently valid and statistically credible.

4.2.21.139 Overall Attitude-Fusion Architecture

The complete concept can be summarized as

\[ \boxed{ \begin{array}{ccccc} \text{Gyro} & \rightarrow & \text{Quaternion Propagation} & \rightarrow & \hat{\mathbf q}^{-} \\[6pt] && \uparrow && \\[-2pt] \text{Star Tracker} & \rightarrow & \text{Absolute Attitude Residual} & \rightarrow & \text{Correction} \\[6pt] \text{Sun Sensor} & \rightarrow & \text{Vector Residual} & \rightarrow & \text{Correction} \\[6pt] \text{Magnetometer} & \rightarrow & \text{Vector Residual} & \rightarrow & \text{Correction} \end{array} } \]

with the estimator simultaneously updating:

\[ \hat{\mathbf q}, \]

\[ \hat{\mathbf b}_g, \]

and

\[ \mathbf P. \]

4.2.21.140 Practical Design Philosophy

A strong spacecraft attitude estimator should:

  1. propagate attitude continuously using gyro information,
  2. estimate gyro bias,
  3. use absolute attitude or vector references to bound drift,
  4. account for sensor-specific noise,
  5. handle asynchronous measurements,
  6. maintain quaternion consistency,
  7. validate every measurement statistically,
  8. reject faults and outliers,
  9. increase uncertainty when observability degrades,
  10. recover correctly after sensor return,
  11. produce credible attitude covariance,
  12. remain numerically stable.

Design philosophy

A robust attitude estimator is built around propagation, absolute-reference correction, bias estimation, validity management, uncertainty growth, recovery, and numerical consistency rather than around one preferred sensor.

4.2.21.141 Key Takeaways

1. Spacecraft attitude sensor fusion combines complementary information.

\[ \boxed{ \text{Gyro Propagation} + \text{Absolute References} \rightarrow \text{Continuous Attitude Estimation}. } \]

2. Gyroscopes provide high-rate angular information but drift because of bias and noise.

\[ \boldsymbol\omega_m = \boldsymbol\omega + \mathbf b_g + \mathbf n_g. \]

3. Quaternion propagation is driven by angular velocity.

\[ \boxed{ \dot{\mathbf q} = \frac12 \mathbf\Omega(\boldsymbol\omega)\mathbf q. } \]

4. Gyro bias should normally be estimated as part of the attitude filter.

\[ \boxed{ \mathbf x = [ \mathbf q, \mathbf b_g ]^T. } \]

5. Star trackers provide highly accurate absolute attitude references and bound gyro drift.

6. Sun sensors and magnetometers are vector sensors rather than complete attitude sensors individually.

\[ \boxed{ \hat{\mathbf v}^{B} = \mathbf C_{BI}(\hat{\mathbf q})\mathbf v^I. } \]

7. A single vector cannot completely determine three-axis attitude.

Rotation about the reference vector remains unconstrained.

8. Two non-collinear vector references can provide complete attitude information.

This is why Sun sensor and magnetometer combinations are useful in safe mode.

9. TRIAD and QUEST provide instantaneous attitude determination; MEKF and related filters provide recursive dynamic estimation.

10. The MEKF uses a nominal quaternion and a three-dimensional attitude-error state.

\[ \boxed{ \delta\mathbf x = [ \delta\boldsymbol\theta, \delta\mathbf b_g ]^T. } \]

11. Quaternion corrections should be multiplicative rather than simple additive quaternion subtraction.

12. Sensor measurements must be transformed into consistent coordinate frames before fusion.

13. Timing is critical.

\[ \delta\boldsymbol\theta \approx \boldsymbol\omega\Delta t. \]

14. Sensor availability changes with operating condition.

Star trackers may be blinded, Sun sensors become unavailable during eclipse, and magnetometers can be disturbed by spacecraft-generated fields.

15. The covariance should increase when attitude information is lost.

A growing covariance during absolute-sensor dropout is physically reasonable.

16. Gyro-only attitude propagation is temporary because long-term error is unbounded.

17. Star-tracker reacquisition after a large error may require more than a small-angle linearized correction.

18. Sensor validity and measurement gating are essential parts of attitude fusion.

\[ \mathrm{NIS} = \mathbf r^T \mathbf S^{-1} \mathbf r. \]

19. Attitude performance should be evaluated using principal-angle error, bias error, covariance consistency, NIS, NEES, convergence, and recovery.

20. Safe mode and fine-pointing mode can use different sensor combinations and estimator configurations.

21. Calibration, misalignment, timing, and frame conventions can dominate attitude-estimation error even when the filter equations are correct.

22. Quaternion convention must be explicitly documented.

\[ \boxed{ \text{Convention Consistency} = \text{Propagation} + \text{DCM} + \text{Measurement Model} + \text{Correction}. } \]

23. A valid attitude solution means more than simply having a running estimator.

It requires acceptable uncertainty, sufficient observability, valid sensors, and numerical health.

24. The central engineering principle is

\[ \boxed{ \begin{array}{c} \text{Gyros carry attitude information forward in time,}\\[4pt] \text{while absolute-reference sensors repeatedly anchor that propagated attitude}\\[4pt] \text{and allow gyro biases and uncertainty to be estimated.} \end{array} } \]

The natural next section is 4.2.22 IMU/GNSS Sensor Fusion, where the same propagation-and-correction philosophy is extended from rotational navigation to full inertial position and velocity estimation using accelerometers, gyroscopes, and GNSS.

Next: 4.2.22 IMU/GNSS Sensor Fusion

After developing spacecraft attitude fusion using gyroscopes, star trackers, Sun sensors, magnetometers, quaternion propagation, bias estimation, measurement validation, safe-mode operation, and fine-pointing estimation, the next section extends the same propagation-and-correction principle to full inertial navigation.