mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 13:13:34 +08:00
ekf: move "reset" part of the init function into a separate function
add getter for the vehicle at rest flag
This commit is contained in:
committed by
Mathieu Bresciani
parent
7eb9118673
commit
bf48004fb9
+7
-2
@@ -47,6 +47,13 @@
|
||||
bool Ekf::init(uint64_t timestamp)
|
||||
{
|
||||
bool ret = initialise_interface(timestamp);
|
||||
reset(timestamp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Ekf::reset(uint64_t timestamp)
|
||||
{
|
||||
_state.vel.setZero();
|
||||
_state.pos.setZero();
|
||||
_state.gyro_bias.setZero();
|
||||
@@ -94,8 +101,6 @@ bool Ekf::init(uint64_t timestamp)
|
||||
_accel_mag_filt = 0.0f;
|
||||
_ang_rate_mag_filt = 0.0f;
|
||||
_prev_dvel_bias_var.zero();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Ekf::update()
|
||||
|
||||
Reference in New Issue
Block a user