AP_AHRS: added get_position_lag() call

provide position lag to libraries
This commit is contained in:
Andrew Tridgell 2013-08-12 13:28:23 +10:00
parent fd4bceaafe
commit 57d2dd814d
2 changed files with 11 additions and 0 deletions

View File

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

View File

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