Attitude control and navigation · Lesson 2 of 5

Attitude Sensors: Star Trackers, Sun Sensors, Earth Horizon Sensors, Magnetometers and Gyroscopes

What each attitude sensor measures, how accurately, and how their measurements are fused into a single estimate.

14 min read

The star trackers on Europa Clipper: they look at the stars to know where the spacecraft is pointing. · NASA/JPL-Caltech · Public domain

A spacecraft has no windows to look out of and no floor to tell it which way is down. It knows where it is pointing by measuring reference directions (the Sun, the Earth's horizon, the magnetic field, the stars) and angular rates with gyroscopes, and combining them in an estimator. This lesson goes through each family of sensors with its physical principles, typical accuracies and trade-offs, and ends with the algorithms that turn several measurements into an attitude: TRIAD, Wahba's problem with QUEST, and the multiplicative Kalman filter. It assumes the representations from attitude and quaternions.

Two kinds of measurement

Attitude sensors fall into two complementary groups:

  • Reference sensors: they measure the direction of a vector known in inertial space, b = A r + noise. One vector fixes two of the three degrees of freedom (the rotation about it is missing); you need two non-parallel vectors, or a sensor that sees several stars at once.
  • Inertial sensors (gyroscopes): they measure ω relative to inertial space. They give a smooth, high-rate attitude, but an integrated one: the error grows with time and has to be corrected with the former.
SensorMeasuresTypical accuracyTypical massWeak points
Coarse Sun sensorSun direction1-5°Tens of gEarth albedo, eclipses
Fine (digital) Sun sensorSun direction0.01-0.1°0.1-0.5 kgLimited field of view, eclipses
Earth horizon sensor (IR)Nadir direction0.05-0.25°1-4 kgHorizon variations, Sun and Moon in the field
MagnetometerMagnetic field vector0.5-5° (limited by the model)0.1-1 kgSpacecraft's own fields, LEO only
Star trackerFull attitude1-30″ (cross-boresight), 5-60″ (roll)0.3-5 kgSun and Moon near the field, high rates, radiation
Gyroscope (FOG, HRG, RLG, MEMS)Angular rateDrift from 0.0001 to 10 °/h0.05-5 kg per axis or unitError that grows with time

The ranges follow the tables of Wertz and Larson (SMAD) and current datasheets; each mission chooses its combination according to the accuracy it needs and the money it has.

Sun sensors

The Sun is bright, has a small apparent diameter (about 0.53° from Earth) and its direction is known very precisely. Coarse sensors are simple photovoltaic cells: the current follows the cosine law, I = I₀ · cos θ, and with several cells facing different directions the Sun vector can be reconstructed. They are cheap and almost indestructible, which is why they are the sensor of safe modes: any spacecraft knows how to find the Sun to point its solar arrays when everything else fails.

Fine sensors project the light through a slit or a mask onto a detector (four-quadrant photodiode, CMOS array or linear pixel array) and measure the position of the spot. They reach accuracies of hundredths of a degree over fields of ±60° or more.

Horizon sensors

An Earth sensor looks for the limb of the Earth's disk in the thermal infrared, in the CO₂ absorption band (14-16 µm), where the atmosphere emits fairly uniformly by day and by night. By measuring the limb at several points (with a mechanical scan or with a static detector of thermopiles or microbolometers) the nadir direction is computed.

The apparent size of the disk depends on altitude: its half-angle is ρ = arcsin(R_E / r). At 400 km, ρ = arcsin(6,371/6,771) ≈ 70°; in GEO, ρ = arcsin(6,378/42,164) ≈ 8.7°. In GEO the disk is small and sharp and horizon sensors reach about 0.05°; in LEO the variations in the height of the emitting layer (seasonal and with latitude, of the order of kilometers) limit accuracy to tenths of a degree. They remain the standard sensor on geostationary communications satellites, which only need to know where the Earth is.

The Earth and the edge of the atmosphere seen from orbit
From 400 km the Earth fills a disk about 140° across: a horizon sensor looks for its edge in the thermal infrared NASA · Public domain

Magnetometers

A three-axis magnetometer (usually a fluxgate, or magnetoresistive on small satellites) measures the field vector B in body axes. The reference vector comes from the IGRF model (International Geomagnetic Reference Field) evaluated at the spacecraft's estimated position. A dipole model is enough to get a feel for it:

B ≈ B₀ · (R_E / r)³ · √(1 + 3 sin² λ_m)        B₀ ≈ 30 µT at the equator, λ_m magnetic latitude

At 500 km, (6,371/6,871)³ ≈ 0.80: about 24 µT at the magnetic equator and about 48 µT near the poles. Above a few thousand kilometers the field is weak and the model unreliable, so the magnetometer is essentially a low-orbit sensor.

Its attitude accuracy (0.5-5°) is limited not by the instrument, which resolves nanoteslas, but by the model (ionospheric currents and geomagnetic storms distort the field) and by the spacecraft's own fields (currents in the solar arrays, magnetorquers). That is why magnetometers are mounted on a boom or calibrated in flight, and why the magnetorquers are switched off while they measure. Their great advantage is that they always work, day and night, and that the magnetorquers use the same B vector to actuate (actuators).

Aurora seen from the Space Station
Auroras mark the currents that disturb the magnetic field: during a geomagnetic storm the IGRF model is wrong and the magnetometer loses accuracy NASA · Public domain

Star trackers

The star tracker is the precision reference of almost every modern spacecraft, from a CubeSat to Webb. It is a camera with a CMOS or CCD detector, moderate field-of-view optics (8-25°) and a long baffle that blocks stray light, plus a processor that:

  1. Detects the stars in the image and computes their centroid to sub-pixel accuracy (the image is deliberately defocused so that each star covers a few pixels).
  2. In lost-in-space mode, identifies the pattern by comparing angles between stars, or triangles, with an onboard catalog derived from Hipparcos/Tycho (or today from Gaia), in less than a second.
  3. In tracking mode, predicts where the stars will be and only searches small windows, at 4-10 Hz or more.
  4. Outputs an inertial-to-sensor quaternion directly.

The design trade-offs are clear. A wider field sees more stars (more robust in lost-in-space mode) but has a worse plate scale; a fainter limiting magnitude demands more aperture and exposure time, and a long exposure smears the stars if the spacecraft rotates quickly (most lose track above a few degrees per second). The Sun must be kept outside an exclusion angle of about 25-45°, and the sunlit Earth and the Moon outside smaller angles. And energetic protons, for example in the South Atlantic Anomaly, create false "stars" on the detector (see the space environment).

Telescopes take this principle to the extreme with fine guidance sensors: Hubble has three interferometric Fine Guidance Sensors (it uses two for guiding and the third for astrometry) and holds its pointing with a stability of the order of 0.007″; Webb uses its own FGS, built in Canada, which sees guide stars through the main telescope.

Gyroscopes

Gyroscopes provide angular rate with high bandwidth and without depending on anything external. Current technologies:

TypePrincipleTypical bias stabilityWhere it is used
Mechanical rotor (rate-integrating)Rotor on gas bearing or floated≤ 0.001-0.01 °/hHubble and classic spacecraft
Ring laser (RLG)Sagnac effect in a laser cavity0.001-0.01 °/hLaunch vehicles, inertial navigation
Fiber optic (FOG)Sagnac effect in kilometers of fiber0.0005-0.1 °/hEarth observation satellites, probes
Hemispherical resonator (HRG)Precession of the vibration pattern of a quartz shell≤ 0.001 °/hWebb, long-duration probes
MEMSVibrating silicon proof mass (Coriolis)1-10 °/h or moreCubeSats, backup

The standard error model (Farrenkopf) used by filters is:

ω_measured = ω_true + β + η_v        β̇ = η_u

where β is the bias (drift), which changes slowly as a random walk, η_v is the white noise that integrates into angle random walk (in °/√h) and η_u is the noise that drives the bias random walk. Both parameters are identified from the Allan variance of test data.

The history of Hubble shows how critical this component is. It carries six rotor gyroscopes and needs three for normal pointing. They failed one after another through corrosion of the thin flex leads that power the rotor; the 2009 servicing mission installed six new ones with improved leads. In 2024, with several out of service and one giving erratic readings, NASA switched the telescope to one-gyro mode, which uses the fine guidance sensors and the star tracker to fill in the information and sacrifices some efficiency and agility. Webb chose HRGs precisely for their long life: they have no parts that wear out.

Static determination: TRIAD

With two vectors measured in body axes (b₁, b₂) and their inertial references (r₁, r₂), the TRIAD algorithm builds two orthonormal triads and relates them:

t₁ = r₁,   t₂ = (r₁ × r₂)/|r₁ × r₂|,   t₃ = t₁ × t₂          (likewise with b for s₁, s₂, s₃)
A = [s₁ s₂ s₃] · [t₁ t₂ t₃]ᵀ

TRIAD is exact with perfect data, but it is not optimal: it takes the first vector as truth and uses only the component of the second perpendicular to the first. The more accurate vector is placed first (the Sun before the magnetic field).

Optimal determination: Wahba's problem and QUEST

Grace Wahba posed the general problem in 1965: given N vectors with weights a_i, find the rotation matrix that minimizes

L(A) = ½ · Σ aᵢ · |bᵢ − A rᵢ|²

Davenport's solution (the q-method) turns the problem into an eigenvalue problem. With B = Σ aᵢ bᵢ rᵢᵀ, S = B + Bᵀ, σ = tr B and z = Σ aᵢ (bᵢ × rᵢ):

K = | S − σI   z |          the optimal quaternion is the eigenvector of K
    |   zᵀ     σ |          with the largest eigenvalue, λ_max

QUEST (Shuster, late 1970s) avoids the full eigenvalue computation: since λ_max is very close to the sum of the weights, it obtains it with a few Newton iterations on the characteristic polynomial. It is fast and robust, and for decades it was the reference onboard algorithm. With weights aᵢ = 1/σᵢ² (the variance of each sensor), the solution is the maximum-likelihood one.

Dynamic determination: the multiplicative Kalman filter

Static methods use only the measurements of a single instant. In flight, the gyroscopes (fast, smooth, drifting) and the reference sensors (slow, noisy, drift-free) are combined in a Kalman filter, whose equations are developed in navigation and orbit determination. For attitude there is a subtlety: the quaternion has four components and one constraint, and a filter that treated it as four free numbers would break the unit norm and have a singular covariance.

The standard solution, the multiplicative extended Kalman filter (MEKF, Lefferts, Markley and Shuster, 1982), estimates a three-component small error relative to a reference quaternion:

q_true = δq(δθ) ⊗ q_estimated        δq ≈ [δθ/2 ; 1]
filter state: x = [δθ ; Δβ]         (6 components: attitude error and bias error)
  • Propagation: the reference quaternion is integrated with the corrected gyro rates (ω̂ = ω_measured − β̂) and the covariance with the error-state transition matrix.
  • Update: each star tracker measurement is compared with the prediction; the filter corrects δθ and Δβ, the correction is applied to the quaternion (q̂ ← δq ⊗ q̂, renormalized) and δθ is reset to zero.

In this way the star tracker makes the gyro bias observable: after a few minutes of data the filter knows the drift far better than the datasheet does, and the attitude stays accurate through the gaps without stars.

A star tracker and instruments inside a spacecraft
A modern star tracker identifies the sky in less than a second and outputs a quaternion directly: it is the instrument that sets the accuracy of almost every spacecraft today NASA/JPL-Caltech · Public domain

Typical architectures

MissionSensorsKnowledge accuracy
Low-orbit CubeSatCoarse Sun sensors, magnetometer, MEMS, sometimes a small star tracker1-5° without a star tracker; tens of arcseconds with one
Earth observation satellite in SSO2-3 star tracker heads, FOG or HRG, coarse Sun sensors for safe modeA few arcseconds
Geostationary communications satelliteEarth sensor, Sun sensors, gyroscopes and, increasingly, star trackers0.01-0.05°
Space telescope (Hubble, Webb)Gyroscopes, star trackers, fine guidance sensorsMilliarcseconds

Key points

  • Two classes of sensors: reference sensors (Sun, Earth, magnetic field, stars) and gyroscopes; both are needed.
  • Star tracker: arcseconds about the cross-boresight axes and about 5-10 times worse in roll; two heads at 60-90° solve it.
  • Magnetometer: limited by the IGRF model and the spacecraft's own fields, not by the instrument; only useful in LEO.
  • Gyroscope: ω_m = ω + β + η; the bias error grows linearly with time and the random walk with its square root.
  • TRIAD is exact but not optimal; QUEST solves Wahba's weighted problem.
  • The MEKF estimates three error angles and three biases, and keeps the quaternion unit-norm.

Further reading

  • F. L. Markley and J. L. Crassidis, Fundamentals of Spacecraft Attitude Determination and Control, Springer (2014).
  • M. D. Shuster and S. D. Oh, "Three-Axis Attitude Determination from Vector Observations", Journal of Guidance and Control 4(1), 70-77 (1981).
  • G. Wahba, "A Least Squares Estimate of Satellite Attitude", SIAM Review 7(3), 409 (1965).
  • E. J. Lefferts, F. L. Markley and M. D. Shuster, "Kalman Filtering for Spacecraft Attitude Estimation", Journal of Guidance, Control, and Dynamics 5(5), 417-429 (1982).
  • J. R. Wertz, D. F. Everett and J. J. Puschell (eds.), Space Mission Engineering: The New SMAD, Microcosm Press (2011).
  • C. C. Liebe, "Accuracy Performance of Star Trackers — A Tutorial", IEEE Transactions on Aerospace and Electronic Systems 38(2), 587-599 (2002).

Test yourself

  1. Why do Earth horizon sensors operate in the 14-16 µm band?

  2. A star tracker has a 20° field of view over 1,024 pixels and computes each star's centroid to one tenth of a pixel. What approximate accuracy does it achieve with 10 stars, if the errors are independent?

  3. What is the main weakness of the TRIAD algorithm?

  4. Besides the attitude error, what does the multiplicative extended Kalman filter (MEKF) estimate?

  5. A gyroscope with an uncorrected bias of 0.01 °/h integrates for 10 minutes without a star tracker. What attitude error does that bias accumulate?