Copter: log EKF height reset
This commit is contained in:
parent
221ddb545e
commit
cfe046c9d1
@ -325,6 +325,7 @@ enum FlipState {
|
|||||||
#define DATA_MOTORS_INTERLOCK_ENABLED 57
|
#define DATA_MOTORS_INTERLOCK_ENABLED 57
|
||||||
#define DATA_ROTOR_RUNUP_COMPLETE 58 // Heli only
|
#define DATA_ROTOR_RUNUP_COMPLETE 58 // Heli only
|
||||||
#define DATA_ROTOR_SPEED_BELOW_CRITICAL 59 // Heli only
|
#define DATA_ROTOR_SPEED_BELOW_CRITICAL 59 // Heli only
|
||||||
|
#define DATA_EKF_ALT_RESET 60
|
||||||
|
|
||||||
// Centi-degrees to radians
|
// Centi-degrees to radians
|
||||||
#define DEGX100 5729.57795f
|
#define DEGX100 5729.57795f
|
||||||
|
@ -156,6 +156,7 @@ bool Copter::init_arm_motors(bool arming_from_gcs)
|
|||||||
if (ap.home_state == HOME_UNSET) {
|
if (ap.home_state == HOME_UNSET) {
|
||||||
// Reset EKF altitude if home hasn't been set yet (we use EKF altitude as substitute for alt above home)
|
// Reset EKF altitude if home hasn't been set yet (we use EKF altitude as substitute for alt above home)
|
||||||
ahrs.get_NavEKF().resetHeightDatum();
|
ahrs.get_NavEKF().resetHeightDatum();
|
||||||
|
Log_Write_Event(DATA_EKF_ALT_RESET);
|
||||||
} else if (ap.home_state == HOME_SET_NOT_LOCKED) {
|
} else if (ap.home_state == HOME_SET_NOT_LOCKED) {
|
||||||
// Reset home position if it has already been set before (but not locked)
|
// Reset home position if it has already been set before (but not locked)
|
||||||
set_home_to_current_location();
|
set_home_to_current_location();
|
||||||
|
Loading…
Reference in New Issue
Block a user