Browse Source

AP_AHRS: move location_update to Location and rename to offset_bearing

master
Pierre Kancir 6 years ago committed by Peter Barker
parent
commit
701c5dd4c0
  1. 1
      libraries/AP_AHRS/AP_AHRS.h
  2. 2
      libraries/AP_AHRS/AP_AHRS_DCM.cpp

1
libraries/AP_AHRS/AP_AHRS.h

@ -30,6 +30,7 @@ @@ -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

2
libraries/AP_AHRS/AP_AHRS_DCM.cpp

@ -989,7 +989,7 @@ bool AP_AHRS_DCM::get_position(struct Location &loc) const @@ -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;
}

Loading…
Cancel
Save