diff --git a/ArduCopter/heli.cpp b/ArduCopter/heli.cpp index 2db03c816f..105135f29b 100644 --- a/ArduCopter/heli.cpp +++ b/ArduCopter/heli.cpp @@ -34,9 +34,9 @@ void Copter::check_dynamic_flight(void) // with GPS lock use inertial nav to determine if we are moving if (position_ok()) { - // get horizontal velocity - float velocity = inertial_nav.get_velocity_xy(); - moving = (velocity >= HELI_DYNAMIC_FLIGHT_SPEED_MIN); + // get horizontal speed + const float speed = inertial_nav.get_speed_xy(); + moving = (speed >= HELI_DYNAMIC_FLIGHT_SPEED_MIN); }else{ // with no GPS lock base it on throttle and forward lean angle moving = (motors->get_throttle() > 0.8f || ahrs.pitch_sensor < -1500); diff --git a/ArduCopter/mode_poshold.cpp b/ArduCopter/mode_poshold.cpp index d70181c230..7d24c33a00 100644 --- a/ArduCopter/mode_poshold.cpp +++ b/ArduCopter/mode_poshold.cpp @@ -605,7 +605,7 @@ void Copter::ModePosHold::poshold_update_wind_comp_estimate() } // check horizontal velocity is low - if (inertial_nav.get_velocity_xy() > POSHOLD_WIND_COMP_ESTIMATE_SPEED_MAX) { + if (inertial_nav.get_speed_xy() > POSHOLD_WIND_COMP_ESTIMATE_SPEED_MAX) { return; }