[RFC] Scale EKF2 GNSS measurement noise by the error correlation time

Author: dakejahlCreated Sep 24, 2026Updated Sep 24, 2026
Labelskind:rfcstatus:needs-triage

Summary

EKF2 treats every GNSS sample as independent of the one before. GNSS position and velocity errors are correlated over seconds to minutes, so the faster a receiver reports, the more EKF2 trusts it. In simulation, EKF2 at 10 Hz reports a position standard deviation 9 to 12 times smaller than its real error.

This RFC proposes the standard fix for loosely coupled INS/GNSS filters, from Groves: multiply the GNSS measurement noise by the ratio of the error correlation time to the sample interval, for both position and velocity. The position innovation gate keeps today's variance, so it doesn't widen.

The proposal makes the following changes:

  1. Two new parameters set the correlation time of GNSS position and velocity error. 0 keeps today's behavior.
  2. EKF2 scales GNSS position and velocity R by the correlation time divided by the time since the last fused sample.
  3. The position innovation test uses today's unscaled variance.

The defaults stay 0 until correlation times are measured on common receivers.

Background notes, with prior art and the simulation behind the numbers below: GNSS coloured position error and EKF bias states.

Terms

  • Sample: one GNSS position and velocity solution that EKF2 fuses.
  • White error: error that is independent from one sample to the next. A Kalman filter assumes that every measurement error is white.
  • Correlated error: error that changes slowly, so consecutive samples share most of it. Also called coloured noise.
  • Correlation time (τ): how long a correlated error takes to decorrelate.
  • eph, sacc: the horizontal position accuracy and speed accuracy that the receiver reports.
  • R: the measurement noise variance that EKF2 assigns to a sample.
  • Overconfidence: the actual error divided by the standard deviation that EKF2 reports. 1 is honest.
  • NIS: normalized innovation squared, the squared innovation divided by the variance the gate tests it against. It averages 1 when the noise model is right.

Problems

EKF2 trusts GNSS more the faster the receiver reports

EKF2 sets position R to max(eph, EKF2_GPS_P_NOISE)² (aid_sources/gnss/gps_control.cpp:358) and velocity R to max(sacc, EKF2_GPS_V_NOISE)² (gps_control.cpp:320), and fuses every sample it receives. Neither depends on the rate. A Kalman filter treats N independent samples with variance R like one sample with variance R/N, so doubling the rate halves the noise that EKF2 assumes.

GNSS errors aren't independent between samples. Most of the position error wanders over tens of seconds or longer: ionospheric and tropospheric delay, multipath, and the receiver's own navigation filter. Groves gives correlation times "up to 100 seconds on the position and 20 seconds on the velocity" for a receiver's solution. eph and sacc describe how large the error is, not how much new information each sample carries.

The following table shows a 1D simulation with EKF2's noise model. IMU prediction runs at 100 Hz, with IMU noise at EKF2's assumed level. Position error is Gauss-Markov with σ 1 m and τ 60 s, plus 0.2 m of white error, so eph is 1.02 m. Velocity error is either white 0.1 m/s, or correlated: Gauss-Markov 0.05 m/s with τ 20 s plus 0.05 m/s white. Each row is 200 runs of 900 s.

Velocity error Rate Actual position RMS Position σ reported Position overconfidence Velocity overconfidence
White 5 Hz 0.94 m 0.14 m 6.6× 1.0×
White 10 Hz 0.92 m 0.10 m 9.1× 1.0×
White 20 Hz 0.90 m 0.07 m 12.6× 1.0×
Correlated 10 Hz 1.03 m 0.08 m 12.2× 1.9×

The actual error doesn't depend on the rate, because the estimate follows the GNSS error. Only the reported σ falls, as 1/√rate. EKF2 is already about 6× overconfident at 5 Hz.

The collapse has caused filter failures

ArduPilot's EKF3 uses the same model. On ArduPilot#16791, Paul Riseborough diagnosed a divergence: "The EKF is becoming over confident about its accuracy and the state variances collapse … 2) Faster GPS update rates, eg 10Hz 3) Use of RTK GPS data with small reported error values … running the GPS updates at 5Hz would help." The fix in ArduPilot#16842 added variance floors. PX4-ECL#771 followed the same pattern. Neither fix changed the noise model.

The position gate is too wide

The same model makes the GNSS position innovation gate too wide. The predicted innovation σ is about 1.0 m, but consecutive samples share their error, so the actual innovations are much smaller: mean NIS is 0.18 with white velocity error. EKF2_GPS_P_GATE (default 5σ) therefore accepts a position step of about 5 m, more than 11 times the actual innovation σ.

Consumers see the overconfident accuracy

EKF2 reports horizontal accuracy as the square root of the position covariance trace (ekf_helper.cpp:261). That value becomes vehicle_global_position.eph, which commander compares with COM_POS_FS_EPH. Other position sources, such as external vision, are gated against the same covariance. After GNSS loss, dead reckoning starts from a covariance that is too small, so the reported accuracy lags the real drift.

Proposal

Scale R by the correlation time

Groves (Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems, 2nd ed., §14.3.1) gives the rule for loosely coupled filters: "the variance of the position or velocity error multiplied by the ratio of the error correlation time to the measurement update interval." EKF2 applies it to both:

  • Position: R = max(eph, EKF2_GPS_P_NOISE)² · max(1, EKF2_GPS_P_TAU/Δt)
  • Velocity: R = max(sacc, EKF2_GPS_V_NOISE)² · max(1, EKF2_GPS_V_TAU/Δt), with the vertical 1.5² factor kept

Δt is the time since the previous fused GNSS sample, so jitter and dropped samples are handled. The max(1, …) means a receiver that reports slower than 1/τ is trusted the same as today, never more.

Both must be scaled. Scaling position alone makes EKF2 hold position on integrated velocity for minutes. With correlated velocity error, that makes position 3.5× worse than today in the simulation.

Keep the position gate

EKF2 computes the position test ratio from P + max(eph, EKF2_GPS_P_NOISE)², today's variance, and computes the Kalman gain with the scaled R. With the scaled variance, the gate σ would be about 25 m at 10 Hz, and a 5σ gate would reject almost nothing. ArduPilot's EKF3 already separates its gate variance from its fusion variance for GNSS velocity.

Parameters

Parameter Meaning
EKF2_GPS_P_TAU [s] Correlation time of GNSS position error. 0 turns off scaling.
EKF2_GPS_V_TAU [s] Correlation time of GNSS velocity error. 0 turns off scaling.

Expected result

The following table shows the simulation at 10 Hz with correlated velocity error:

Filter Position RMS Position overconfidence Velocity RMS Velocity overconfidence Gate σ NIS
Today 1.03 m 12.2× 0.054 m/s 1.9× 1.02 m 0.52
R × τ/Δt for position and velocity, gate on today's variance 1.21 m 0.8× 0.083 m/s 0.8× 1.86 m 0.30
R × τ/Δt for position only, for comparison 3.62 m 8.3× 0.055 m/s 2.0× 1.11 m 11.19

With white velocity error, which is τ_v = 0, position RMS falls from 0.92 m to 0.57 m, overconfidence from 9.1× to 1.1×, and NIS rises from 0.18 to 0.78.

  • Both covariances become honest, slightly pessimistic.
  • When velocity error is correlated, honesty costs accuracy: position 1.21 m against 1.03 m, and velocity 0.083 m/s against 0.054 m/s. The simulated IMU is exactly as noisy as EKF2_ACC_NOISE assumes; a better real IMU makes scaling velocity cheaper.
  • A 2 m GNSS step that comes without an eph change reaches 63% in 24 s, against 14 s today.
  • Variances stay away from the floor where the ArduPilot#16791 divergence started.

Compatibility

This proposal changes behavior only when the new parameters are set:

  • Default 0. With both parameters at 0, EKF2 fuses as today.
  • Reported accuracy rises to honest values. Setups with tight accuracy thresholds, such as a low COM_POS_FS_EPH, can trip where they didn't before.
  • Slower response to GNSS. Position follows a GNSS step more slowly, and velocity leans more on the IMU.
  • All rates change. Vehicles that run GNSS at 5 Hz today are affected too, since the scaling applies at any rate faster than 1/τ.
  • No interface changes. There are no new states, and no message or log layout changes.

Rollout

The work lands in this order:

  1. The scaling and the separate gate variance land with both parameters at 0.
  2. τ_p and τ_v are measured from static logs of common receivers, such as the u-blox F9P and X20 and the Septentrio mosaic, in standalone, SBAS, RTK Float and RTK Fixed modes. Flight logs with a co-located RTK Fixed receiver as reference check the result against NIS and actual error.
  3. Defaults are set from those measurements, sized to overbound rather than to best fit.

This is independent of #28813 [RFC] Replace GNSS blending with receiver selection and per-receiver checks.

Alternatives considered

  • Keep today's model, with the noise floors and a 5 Hz recommendation. EKF2 is already about 6× overconfident at 5 Hz, and the floors do nothing once eph is above them.
  • Scale R by the rate relative to a reference rate, or by a fixed factor. Neither reaches consistency: R × 100 at 10 Hz still leaves EKF2 2× overconfident. The factor has to be τ/Δt.
  • Scale position only. This is worse than today when velocity error is correlated, as shown above.
  • Fuse GNSS less often. Commercial systems do this: NovAtel SPAN de-weights nine of ten position fixes while stationary, "as a result of the correlated measurement errors" (US7193559), and Groves notes that 10 s update intervals are common. It has the same effect as scaling R, but it throws away the white part of the error, which is the velocity benefit users move to 10 Hz for.
  • Measurement differencing (Bryson–Henrikson): fuse z_k − φ·z_(k−1). With τ of tens of seconds, φ is close to 1, so the differenced measurement carries almost no absolute position. It also needs the previous sample's state at EKF2's delayed horizon.

Feedback requested

The following questions are open:

  1. Gate variance. Is it acceptable to test innovations against today's variance while fusing with the scaled R? With velocity scaled too, NIS is 0.30, so the gate is still loose.
  2. Δt. Should Δt be the measured interval between fused samples, or the receiver's configured rate?
  3. τ per fix type. RTK Fixed error has a different scale and correlation from standalone error. Is one τ each for position and velocity enough, or should τ depend on the fix type?
  4. GNSS velocity correlation. How correlated is u-blox or Septentrio velocity error in practice? The simulation's answer depends heavily on it, and there is little published data.
  5. Observability. Groves notes that reducing the gain weakens the observability of attitude and IMU errors. Does less weight on GNSS velocity hurt EKF2's tilt or accelerometer bias estimation in practice?

Follow-up for discussion: bias states

Groves calls modelling correlated measurement error as extra states "the optimal solution", but adds: "this may not be practical due to observability or processing capacity limitations." No production loosely coupled estimator we found does it; GNSS error states appear in tightly coupled filters instead. In the simulation, north and east bias states for both position and velocity (four first-order Gauss-Markov states) are the only option better than today on every measure:

10 Hz, correlated velocity error Position RMS Position overconfidence Velocity RMS Velocity overconfidence Gate σ NIS
Today 1.03 m 12.2× 0.054 m/s 1.9× 1.02 m 0.52
R × τ/Δt 1.21 m 0.8× 0.083 m/s 0.8× 1.86 m 0.30
Position and velocity bias states 0.95 m 1.0× 0.045 m/s 1.0× 0.23 m 1.00

They also carry costs and open problems:

  • Four more states in every EKF2 instance. SymForce regenerates the derivation, and EstimatorStates grows.
  • GNSS is the only absolute horizontal reference, so the filter separates bias from position only through the assumed Gauss-Markov model. The covariance is only as honest as τ and σ are right.
  • The reported accuracy has to be split into a white part and a bias part. A non-zero white part keeps P from becoming ill-conditioned.
  • The biases need resets on a receiver switch (selection_count from #28813) and on a fix-type change.
  • The consistent gate is about 4× narrower in metres: 1.2 m at 5σ.
  • Position bias states without velocity bias states are worse than today when velocity error is correlated, and NIS doesn't reveal it: NIS is 1.02 at 7× overconfidence.

Is this worth pursuing after the scaling lands, and would four more states be acceptable in EKF2?