mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-09 01:13:57 -04:00
Copter: define limit for baro vs inav alt disparity
This commit is contained in:
parent
be2f308802
commit
b8c74b7363
@ -299,6 +299,11 @@
|
|||||||
#define FS_GCS_ENABLED_ALWAYS_RTL 1
|
#define FS_GCS_ENABLED_ALWAYS_RTL 1
|
||||||
#define FS_GCS_ENABLED_CONTINUE_MISSION 2
|
#define FS_GCS_ENABLED_CONTINUE_MISSION 2
|
||||||
|
|
||||||
|
// pre-arm baro vs inertial nav max alt disparity
|
||||||
|
#ifndef PREARM_MAX_ALT_DISPARITY_CMS
|
||||||
|
# define PREARM_MAX_ALT_DISPARITY_CMS 100 // barometer and inertial nav altitude must be within this many centimeters
|
||||||
|
#endif
|
||||||
|
|
||||||
// pre-arm check max velocity
|
// pre-arm check max velocity
|
||||||
#ifndef PREARM_MAX_VELOCITY_CMS
|
#ifndef PREARM_MAX_VELOCITY_CMS
|
||||||
# define PREARM_MAX_VELOCITY_CMS 50.0f // vehicle must be travelling under 50cm/s before arming
|
# define PREARM_MAX_VELOCITY_CMS 50.0f // vehicle must be travelling under 50cm/s before arming
|
||||||
|
@ -536,7 +536,7 @@ static bool arm_checks(bool display_failure)
|
|||||||
|
|
||||||
// check Baro & inav alt are within 1m
|
// check Baro & inav alt are within 1m
|
||||||
if ((g.arming_check == ARMING_CHECK_ALL) || (g.arming_check & ARMING_CHECK_BARO)) {
|
if ((g.arming_check == ARMING_CHECK_ALL) || (g.arming_check & ARMING_CHECK_BARO)) {
|
||||||
if(fabs(inertial_nav.get_altitude() - baro_alt) > 100) {
|
if(fabs(inertial_nav.get_altitude() - baro_alt) > PREARM_MAX_ALT_DISPARITY_CMS) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
gcs_send_text_P(SEVERITY_HIGH,PSTR("Arm: Alt disparity"));
|
gcs_send_text_P(SEVERITY_HIGH,PSTR("Arm: Alt disparity"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user