mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Copter: Expand EKF speed limit public method to handle control limits
This commit is contained in:
parent
5b8265ad6f
commit
9e7709fa09
@ -321,6 +321,8 @@ static AP_OpticalFlow_PX4 optflow(ahrs);
|
||||
#endif
|
||||
// gnd speed limit required to observe optical flow sensor limits
|
||||
static float ekfGndSpdLimit;
|
||||
// scale factor applied to velocity controller gain to prevent optical flow noise causing excessive angle demand noise
|
||||
static float ekfNavVelGainScaler;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// GCS selection
|
||||
|
@ -121,7 +121,7 @@ static bool set_mode(uint8_t mode)
|
||||
static void update_flight_mode()
|
||||
{
|
||||
// Update EKF speed limit - used to limit speed when we are using optical flow
|
||||
ekfGndSpdLimit = ahrs.getSpeedLimit();
|
||||
ahrs.getEkfControlLimits(ekfGndSpdLimit, ekfNavVelGainScaler);
|
||||
switch (control_mode) {
|
||||
case ACRO:
|
||||
#if FRAME_CONFIG == HELI_FRAME
|
||||
|
Loading…
Reference in New Issue
Block a user