mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-30 21:12:20 +08:00
Fix max-hagl restriction to position/altitude control (#23667)
* fix max-hagl restriction to position/altitude control * max hagl vel restriction in ManAcc position mode * use interpolate func, change naming * simplyfied vertical vel limitation * move velocity-constraint adjustment to StickAccelXY
This commit is contained in:
1 parent
0d22905558
commit
4a5aa1e947
15 files changed
+90
-46
No files matched your search
@@ -1628,7 +1628,7 @@ void EKF2::PublishLocalPosition(const hrt_abstime ×tamp)
|
||||
|| _ekf.control_status_flags().wind_dead_reckoning;
|
||||
|
||||
// get control limit information
|
||||
_ekf.get_ekf_ctrl_limits(&lpos.vxy_max, &lpos.vz_max, &lpos.hagl_min, &lpos.hagl_max);
|
||||
_ekf.get_ekf_ctrl_limits(&lpos.vxy_max, &lpos.vz_max, &lpos.hagl_min, &lpos.hagl_max_z, &lpos.hagl_max_xy);
|
||||
|
||||
// convert NaN to INFINITY
|
||||
if (!PX4_ISFINITE(lpos.vxy_max)) {
|
||||
@@ -1643,8 +1643,12 @@ void EKF2::PublishLocalPosition(const hrt_abstime ×tamp)
|
||||
lpos.hagl_min = INFINITY;
|
||||
}
|
||||
|
||||
if (!PX4_ISFINITE(lpos.hagl_max)) {
|
||||
lpos.hagl_max = INFINITY;
|
||||
if (!PX4_ISFINITE(lpos.hagl_max_z)) {
|
||||
lpos.hagl_max_z = INFINITY;
|
||||
}
|
||||
|
||||
if (!PX4_ISFINITE(lpos.hagl_max_xy)) {
|
||||
lpos.hagl_max_xy = INFINITY;
|
||||
}
|
||||
|
||||
// publish vehicle local position data
|
||||
|
||||
Reference in new issue
Block a user