From 643d8e968b12c79d324d5648da43f07087d381bb Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Wed, 27 Feb 2019 15:14:44 +1100 Subject: [PATCH] ekf2: style fixes --- src/modules/ekf2/ekf2_main.cpp | 4 +++- src/modules/ekf2/ekf2_params.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index c3ba1bd195..0c39e6ef9c 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -916,11 +916,12 @@ void Ekf2::run() _ekf.set_air_density(airdata.rho); // calculate static pressure error = Pmeas - Ptruth - // model position error sensitivity as a body fixed ellipse with a different scale in the positive and + // model position error sensitivity as a body fixed ellipse with a different scale in the positive and // negative X and Y directions const Vector3f vel_body_wind = get_vel_body_wind(); float K_pstatic_coef_x; + if (vel_body_wind(0) >= 0.0f) { K_pstatic_coef_x = _K_pstatic_coef_xp.get(); @@ -929,6 +930,7 @@ void Ekf2::run() } float K_pstatic_coef_y; + if (vel_body_wind(1) >= 0.0f) { K_pstatic_coef_y = _K_pstatic_coef_yp.get(); diff --git a/src/modules/ekf2/ekf2_params.c b/src/modules/ekf2/ekf2_params.c index 9e4513031c..ae971c6da3 100644 --- a/src/modules/ekf2/ekf2_params.c +++ b/src/modules/ekf2/ekf2_params.c @@ -1203,7 +1203,7 @@ PARAM_DEFINE_FLOAT(EKF2_PCOEF_XN, 0.0f); /** * Pressure position error coefficient for the Y axis. - * This is the ratio of static pressure error to dynamic pressure generated by a wind relative velocity along the positive Y (RH) body axis. + * This is the ratio of static pressure error to dynamic pressure generated by a wind relative velocity along the positive Y (RH) body axis. * If the baro height estimate rises during sideways flight to the right, then this will be a negative number. * * @group EKF2