Skip to content

Commit

Permalink
AP_NPFG: disable gain scaling to avoid div zero error
Browse files Browse the repository at this point in the history
Signed-off-by: Rhys Mainwaring <[email protected]>
  • Loading branch information
srmainwaring committed Feb 22, 2024
1 parent 5d3a4ea commit df67426
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/AP_NPFG/npfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@ float NPFG::lateralAccel(const Vector2f &air_vel, const Vector2f &air_vel_ref, c
} else {
// airspeed/airspeed_ref is used to scale any incremented airspeed reference back to the current airspeed
// for acceleration commands in a "feedback" sense (i.e. at the current vehicle airspeed)
return p_gain_ * cross_air_vel_err / airspeed_ref_;
//! @todo(srmainwaring) - reenable gain scaling
// return p_gain_ * cross_air_vel_err / airspeed_ref_;
return p_gain_;
}
} // lateralAccel

Expand Down

0 comments on commit df67426

Please sign in to comment.