mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-24 17:46:37 +08:00
ekf2: compensate for coriolis and transport rate accelerations
This commit is contained in:
committed by
Mathieu Bresciani
parent
842212df6c
commit
814a2706f5
@@ -259,8 +259,11 @@ void Ekf::predictState(const imuSample &imu_delayed)
|
||||
// calculate the increment in velocity using the current orientation
|
||||
_state.vel += corrected_delta_vel_ef;
|
||||
|
||||
// compensate for acceleration due to gravity
|
||||
_state.vel(2) += CONSTANTS_ONE_G * imu_delayed.delta_vel_dt;
|
||||
// compensate for acceleration due to gravity, Coriolis and transport rate
|
||||
const Vector3f gravity_acceleration(0.f, 0.f, CONSTANTS_ONE_G); // simplistic model
|
||||
const Vector3f coriolis_acceleration = -2.f * _earth_rate_NED.cross(vel_last);
|
||||
const Vector3f transport_rate = -_gpos.computeAngularRateNavFrame(vel_last).cross(vel_last);
|
||||
_state.vel += (gravity_acceleration + coriolis_acceleration + transport_rate) * imu_delayed.delta_vel_dt;
|
||||
|
||||
// predict position states via trapezoidal integration of velocity
|
||||
_gpos += (vel_last + _state.vel) * imu_delayed.delta_vel_dt * 0.5f;
|
||||
|
||||
Reference in New Issue
Block a user