Browse Source

AP_AHRS: added get_position_lag() call

provide position lag to libraries
mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
57d2dd814d
  1. 8
      libraries/AP_AHRS/AP_AHRS.cpp
  2. 3
      libraries/AP_AHRS/AP_AHRS.h

8
libraries/AP_AHRS/AP_AHRS.cpp

@ -211,3 +211,11 @@ bool AP_AHRS::get_projected_position(struct Location &loc) @@ -211,3 +211,11 @@ bool AP_AHRS::get_projected_position(struct Location &loc)
location_update(loc, degrees(yaw), _gps->ground_speed_cm * 0.01 * _gps->get_lag());
return true;
}
/*
get the GPS lag in seconds
*/
float AP_AHRS::get_position_lag(void) const
{
return _gps->get_lag();
}

3
libraries/AP_AHRS/AP_AHRS.h

@ -141,6 +141,9 @@ public: @@ -141,6 +141,9 @@ public:
// heading and ground speed
bool get_projected_position(struct Location &loc);
// return the estimated lag in our position due to GPS lag
float get_position_lag(void) const;
// return a wind estimation vector, in m/s
virtual Vector3f wind_estimate(void) {
return Vector3f(0,0,0);

Loading…
Cancel
Save