AP_AHRS: move location_update to Location and rename to offset_bearing

This commit is contained in:
Pierre Kancir 2019-04-05 08:11:25 +02:00 committed by Peter Barker
parent b31e5bf055
commit 701c5dd4c0
2 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include <AP_Baro/AP_Baro.h>
#include <AP_Param/AP_Param.h>
#include <AP_Common/Semaphore.h>
#include <AP_Common/Location.h>
class OpticalFlow;
#define AP_AHRS_TRIM_LIMIT 10.0f // maximum trim angle in degrees

View File

@ -989,7 +989,7 @@ bool AP_AHRS_DCM::get_position(struct Location &loc) const
if (_flags.fly_forward && _have_position) {
float gps_delay_sec = 0;
_gps.get_lag(gps_delay_sec);
location_update(loc, _gps.ground_course_cd() * 0.01f, _gps.ground_speed() * gps_delay_sec);
loc.offset_bearing(_gps.ground_course_cd() * 0.01f, _gps.ground_speed() * gps_delay_sec);
}
return _have_position;
}