Groves, Chapter 10

Dead Reckoning, Attitude, and Height

Magnetometers, AHRS, barometric altimeters, odometers, pedestrian dead reckoning, and Doppler radar.

Prerequisites: Chapter 5 (inertial navigation equations).
10
Chapters
1
Simulation
10
Quizzes

Chapter 0: Leveling

Before we can navigate, we need to know which way is down. Leveling uses accelerometers to determine the roll and pitch of the vehicle relative to the local gravity vector.

When a vehicle is stationary (or moving at constant velocity), the accelerometers measure only gravity. The pitch θ and roll φ can then be computed from the three accelerometer outputs:

θ = arctan(−fx / √(fy2 + fz2))
φ = arctan2(−fy, −fz)

where fx, fy, fz are the specific force measurements in the body frame. This works because gravity is the only force acting, so the accelerometer outputs directly indicate the direction of "down" relative to the body frame.

Limitation: During acceleration or maneuvering, the accelerometers measure the sum of gravity and vehicle acceleration. The leveling solution then becomes contaminated by the dynamics. This is why an AHRS (Chapter 2) uses gyroscopes to maintain the attitude through maneuvers, with accelerometer leveling applied only as a slow correction.

Heading is missing: Accelerometers tell us roll and pitch but nothing about heading. The gravity vector is vertical, so rotation about the vertical axis (yaw/heading) does not change the accelerometer readings. Heading requires a different sensor — a magnetometer or gyrocompass.
Check: Why can't accelerometers determine heading?

Chapter 1: Magnetic Heading

A magnetometer (magnetic compass) measures the direction of the Earth's magnetic field to determine heading. Two- or three-axis magnetometers measure the magnetic field components in the body frame.

The magnetic heading is the angle between the horizontal component of the measured magnetic field and the body's forward axis:

ψm = arctan2(−By, Bx)

where Bx and By are the horizontal magnetic field components in the body frame (after correcting for roll and pitch using the leveling solution).

True heading requires correcting for magnetic declination — the angle between magnetic north and true (geographic) north. This varies with location and time, and is obtained from a magnetic field model (e.g., the World Magnetic Model).

Error sources:

Hard-iron errors: Permanent magnets or magnetized materials on the vehicle produce a constant offset in the magnetic field. Calibrated by rotating the vehicle and fitting an ellipse to the measurements.

Soft-iron errors: Ferromagnetic materials distort the field direction. Also calibrated by rotation.

Local magnetic anomalies: Steel structures, power lines, and underground pipes distort the field. These are unpredictable and cannot be calibrated.

Typical accuracy: After calibration, a magnetometer heading achieves 1–3° accuracy in open environments. Near steel structures (urban areas, indoors, inside vehicles), errors of 10–30° are common. This is why magnetometer heading is best used as one input among several.
Check: What is magnetic declination?

Chapter 2: Attitude & Heading Reference System

An AHRS (Attitude and Heading Reference System) combines gyroscopes, accelerometers, and magnetometers to provide a complete attitude solution (roll, pitch, heading) that works during dynamic motion.

The architecture fuses the complementary strengths of each sensor:

SensorStrengthWeakness
GyroscopesAccurate short-term attitude through dynamicsDrifts over time due to biases
AccelerometersAccurate roll/pitch reference (gravity direction)Contaminated by vehicle acceleration
MagnetometerHeading reference (magnetic north)Distorted by local magnetic fields

The AHRS uses gyroscopes to propagate attitude at high rate (50–1000 Hz), then corrects the gyro-propagated attitude using accelerometer leveling and magnetometer heading at a slower rate. This is typically implemented as a complementary filter or Kalman filter.

The integrated heading solution combines multiple heading sources with a Kalman filter. The gyro propagates heading between measurements. When the vehicle turns, the differential odometry heading rate (from left/right wheel speeds) or gyro heading rate is used. The magnetometer provides an absolute reference, weighted by its estimated reliability.

AHRS vs INS: An AHRS provides attitude only, not position or velocity. An INS provides all three. The key difference is that an INS uses navigation-grade accelerometers and gyros to dead-reckon position, whereas an AHRS only needs to track attitude, which is less demanding on sensor quality.
Check: Why does an AHRS use gyroscopes to propagate attitude rather than relying solely on accelerometers and magnetometers?

Chapter 3: Barometric Altimeter

A barometric altimeter measures atmospheric pressure and converts it to height using the relationship between pressure and altitude. The standard atmosphere model gives:

hbaro = (Ts/β) · [1 − (p/ps)βR/g]

where ps and Ts are the sea-level pressure and temperature, β is the temperature lapse rate (~6.5°C/km), R is the gas constant for air, and g is gravitational acceleration.

Error sources:

Non-standard atmosphere: Actual sea-level pressure and temperature differ from the model. A 1 hPa pressure error corresponds to ~8.5 m height error. Weather systems can cause pressure changes of 20–50 hPa, introducing errors of 170–425 m if uncorrected.

Local effects: Building ventilation, wind gusts, and vehicle aerodynamics cause short-term pressure fluctuations.

Temperature errors: The actual temperature profile rarely matches the standard atmosphere.

Calibration: With recent calibration against a known height or pressure reading, barometric altimeters achieve 5–15 m accuracy. Without calibration, errors of hundreds of meters are possible.

Aviation convention: Above 5,486 km (FL180), all aircraft use the same standard atmosphere constants so that relative altitude readings are consistent between aircraft, even if the absolute height is wrong. Safe separation is more important than absolute accuracy.
Check: Why does a barometric altimeter need regular calibration?

Chapter 4: Radar Altimeter

A radar altimeter (radalt) measures the height above the terrain by transmitting a radio signal downward and measuring the round-trip time of the reflected signal. Unlike the barometric altimeter, it gives the height above ground, not height above sea level.

Modulation techniques:

FMCW (Frequency-Modulated Continuous Wave): Transmits a continuously varying frequency; height is determined from the frequency difference between transmitted and received signals.

Pulsed: Transmits short pulses; height is determined from the time delay between transmission and return.

Spread-spectrum: Uses a PRN code modulated on the transmitted signal (like GNSS); height from the correlation peak delay.

Accuracy: Hardware accuracy ~1 m, but effective accuracy is 1–3% of altitude due to the wide radar beam (typically ±60°). At 1,000 m altitude, the radar footprint is ~350 m in diameter, so nearby terrain at different heights affects the measurement.

Applications: Landing aids, terrain-following flight, ground collision avoidance, and combined with a terrain database for terrain-referenced navigation (Chapter 11).

Depth sensor: For submarines and AUVs, a pressure sensor measures depth from water pressure: d = (pb − ps) / (ρg), where ρ is water density (~1,000 kg/m³ fresh, ~1,030 kg/m³ seawater). Pressure increases by ~1 atmosphere per 10 m depth.

Check: Why is a radar altimeter's effective accuracy only 1-3% of altitude, despite hardware accuracy of ~1 m?

Chapter 5: Odometers

Odometers measure wheel rotation to give speed and distance traveled. Most modern vehicles have a wheel speed sensor (WSS) on each wheel for the ABS system, and this data can be used for navigation.

Differential odometry: By comparing the speeds of left and right wheels, the yaw rate (heading rate of change) can be measured:

ψ̇ = (vL − vR) / Tr

where Tr is the rear track width (distance between wheel centers). This principle was demonstrated by the Chinese in the 3rd century CE with their south-pointing chariot.

Combined with heading (from a gyro, magnetometer, or differential odometry), odometry gives a 2D dead-reckoning position update:

ΔN = v · τ · cos(ψ)     ΔE = v · τ · sin(ψ)

Error sources:

Scale factor: Tire radius varies with pressure, temperature, load, and wear (~1–5% error)

Wheel slip: On slippery surfaces, wheels rotate without proportional forward motion

Non-holonomic constraint: The vehicle cannot move sideways. This constraint is useful for navigation — it bounds the lateral velocity error to zero and aids heading estimation during turns.

The non-holonomic constraint: A wheeled vehicle on a road cannot slide sideways. This means the lateral body-frame velocity is approximately zero: vy ≈ 0. This single constraint provides a powerful measurement for integrated navigation, effectively giving a continuous heading reference during motion.
Check: How does differential odometry measure yaw rate?

Chapter 6: Pedestrian Dead Reckoning

Pedestrian Dead Reckoning (PDR) estimates position by detecting steps and estimating step length and heading. A typical PDR system uses a foot-mounted or body-mounted IMU.

Step detection: Walking produces a distinctive acceleration pattern. Each footfall creates a peak in the accelerometer signal. Step detection algorithms identify these peaks using threshold crossing, zero-crossing, or autocorrelation methods.

Step length estimation: Several models relate step length to the acceleration pattern:

Constant model: Assume a fixed step length (~0.7 m). Simple but inaccurate for varying speeds.

Weinberg model: Step length ∝ (amax − amin)1/4, where amax and amin are the peak and trough acceleration magnitudes during the step.

Frequency model: Step length increases with step frequency (cadence).

Foot-mounted INS with ZUPT: A more sophisticated approach mounts an IMU on the foot and applies a Zero velocity UPdaTe (ZUPT) during each stance phase (when the foot is flat on the ground). The ZUPT resets the velocity error to zero, bounding the position drift to ~1–2% of distance traveled. This is dramatically better than free-inertial navigation with a low-cost IMU, which would drift by kilometers per minute.

Why ZUPT works so well: During each step, the foot is briefly stationary on the ground. At that instant, the true velocity is zero. By feeding this as a measurement into a Kalman filter, the accumulated velocity and position errors since the last step are corrected. This gives a "reset" every 0.5–1 second, keeping the drift bounded.
Check: Why does foot-mounted INS with ZUPT achieve dramatically better accuracy than free-inertial navigation?

Chapter 7: Doppler Radar & Sonar

Doppler radar (for aircraft) and Doppler sonar (for ships/submarines) measure the velocity of the vehicle relative to the ground or seabed by exploiting the Doppler effect.

A beam directed at the surface at an angle θ from vertical produces a Doppler frequency shift proportional to the velocity component along the beam:

fD = 2f0 v cos(θ) / c

where f0 is the transmitted frequency and c is the propagation speed (electromagnetic for radar, acoustic for sonar).

Janus configuration: Using multiple beams pointed in different directions (typically 3 or 4 beams in a "Janus" arrangement), all three components of the body-frame velocity vector can be determined. This configuration also cancels errors due to vehicle attitude.

Doppler radar accuracy: Typically 0.1–0.5% of ground speed. For aircraft at 200 m/s, this gives a velocity accuracy of 0.2–1 m/s.

Doppler sonar (Doppler Velocity Log, DVL): For underwater vehicles, a DVL measures the velocity relative to the seabed using acoustic beams at ~300–600 kHz. Accuracy is ~0.1–0.5% of speed. The DVL only works within a certain altitude above the seabed (typically <200 m at 300 kHz). Above this, it can track the water column instead, but with reduced accuracy due to water currents.

Other techniques: Image-based velocity measurement (visual odometry) computes velocity from the apparent motion of features in successive camera frames. Correlation velocity logs use the correlation between successive sonar returns to measure speed over the ground.

Check: Why does Doppler radar/sonar use multiple beams (Janus configuration)?

Chapter 8: Dead Reckoning Simulation

This simulation shows dead reckoning from odometry and heading. Watch how position errors accumulate with heading error and distance traveled.

Odometry Dead Reckoning with Heading Error
Check: How does heading error affect dead-reckoning position accuracy over time?

Chapter 9: Summary

Key takeaways:
• Leveling uses accelerometers to find roll and pitch from gravity; heading requires a magnetometer or gyrocompass
• Magnetic heading must be corrected for declination, hard-iron, and soft-iron errors; accuracy 1–3° in good conditions
• AHRS fuses gyros (short-term accuracy), accelerometers (gravity reference), and magnetometers (heading reference)
• Barometric altimeters: 5–15 m accuracy with calibration; need pressure/temperature corrections
• Radar altimeters: measure height above terrain, not sea level; accuracy limited by beam footprint
• Odometers: measure speed and distance; differential odometry gives yaw rate; non-holonomic constraint aids navigation
• Pedestrian DR: step detection + step length estimation; foot-mounted IMU with ZUPT achieves ~1–2% drift
• Doppler radar/sonar: velocity measurement from Doppler shift; 0.1–0.5% of speed accuracy
• All dead-reckoning systems drift over time and require periodic correction from an absolute reference
Check: What is the fundamental limitation of all dead-reckoning navigation systems?