From b59e81fbf20916f3b99d89ff2036b275170b0e1f Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Mon, 22 Sep 2025 17:27:47 -0800 Subject: [PATCH] fix comment, use noise as uncertainty --- src/modules/ekf2/EKF/covariance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/EKF/covariance.cpp b/src/modules/ekf2/EKF/covariance.cpp index 9bc7bde143..d7c8ec7b19 100644 --- a/src/modules/ekf2/EKF/covariance.cpp +++ b/src/modules/ekf2/EKF/covariance.cpp @@ -105,7 +105,7 @@ void Ekf::initialiseCovariance() #endif // CONFIG_EKF2_WIND #if defined(CONFIG_EKF2_TERRAIN) - // use the ground clearance value as our uncertainty. TODO: wouldn't it make more sense to use the noise value instead? + // use the noise value as our uncertainty P.uncorrelateCovarianceSetVariance(State::terrain.idx, sq(_params.ekf2_rng_noise)); #endif // CONFIG_EKF2_TERRAIN }