Quaternion: use GPS to correct for linear acceleration

this gives much better pitch estimates. We should do this with the
airspeed sensor if available.
This commit is contained in:
Andrew Tridgell 2012-03-04 20:35:40 +11:00
parent 1ea1b500a6
commit e445a455d0
1 changed files with 1 additions and 0 deletions

View File

@ -282,6 +282,7 @@ void AP_Quaternion::update(void)
// compensate for centripetal acceleration
float veloc;
veloc = _gps->ground_speed / 100;
accel.x -= _gps->acceleration();
accel.y -= _gyro_smoothed.z * veloc;
accel.z += _gyro_smoothed.y * veloc;
}