AP_Soaring: use get_distance_NE instead of location_diff

This commit is contained in:
Pierre Kancir 2019-04-08 15:16:20 +02:00 committed by Tom Pittenger
parent b3a1c9c90c
commit 51437ccc53
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ void SoaringController::init_cruising()
void SoaringController::get_wind_corrected_drift(const Location *current_loc, const Vector3f *wind, float *wind_drift_x, float *wind_drift_y, float *dx, float *dy)
{
Vector2f diff = location_diff(_prev_update_location, *current_loc); // get distances from previous update
const Vector2f diff = _prev_update_location.get_distance_NE(*current_loc); // get distances from previous update
*dx = diff.x;
*dy = diff.y;