AP_AHRS: added get_projected_position()
this is used to project the position forward by the GPS lag
This commit is contained in:
parent
697d17a229
commit
c08c084191
@ -224,3 +224,15 @@ Vector2f AP_AHRS::groundspeed_vector(void)
|
||||
}
|
||||
return Vector2f(0.0f, 0.0f);
|
||||
}
|
||||
|
||||
/*
|
||||
get position projected by groundspeed and heading
|
||||
*/
|
||||
bool AP_AHRS::get_projected_position(struct Location *loc)
|
||||
{
|
||||
if (!get_position(loc)) {
|
||||
return false;
|
||||
}
|
||||
location_update(loc, degrees(yaw), _gps->ground_speed * 0.01 * _gps->get_lag());
|
||||
return true;
|
||||
}
|
||||
|
@ -127,6 +127,10 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
// get our projected position, based on our GPS position plus
|
||||
// heading and ground speed
|
||||
bool get_projected_position(struct Location *loc);
|
||||
|
||||
// return a wind estimation vector, in m/s
|
||||
virtual Vector3f wind_estimate(void) {
|
||||
return Vector3f(0,0,0);
|
||||
|
Loading…
Reference in New Issue
Block a user