Skip to content

Commit ed2ba29

Browse files
digitalentityDzikuVx
authored andcommitted
Merge pull request #6603 from avsaase/avs-fix-gps-weight-bug
Fix bug in GPS weight for vertical velocity calculation
1 parent ad05aa2 commit ed2ba29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/navigation/navigation_pos_estimator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ static bool estimationCalculateCorrection_Z(estimationContext_t * ctx)
569569
if (ctx->newFlags & EST_GPS_Z_VALID) {
570570
// Trust GPS velocity only if residual/error is less than 2.5 m/s, scale weight according to gaussian distribution
571571
const float gpsRocResidual = posEstimator.gps.vel.z - posEstimator.est.vel.z;
572-
const float gpsRocScaler = bellCurve(gpsRocResidual, 2.5f);
572+
const float gpsRocScaler = bellCurve(gpsRocResidual, 250.0f);
573573
ctx->estVelCorr.z += gpsRocResidual * positionEstimationConfig()->w_z_gps_v * gpsRocScaler * ctx->dt;
574574
}
575575

0 commit comments

Comments
 (0)