Copter: rename get_velocity_xy to get_speed_xy

This commit is contained in:
Peter Barker 2017-10-13 14:42:09 +11:00 committed by Randy Mackay
parent 59cd9ad0a6
commit f0ea4af514
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;
}