This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce ecl_float_t type and use in EKF
- Loading branch information
Showing
21 changed files
with
614 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,15 @@ | |
* @author Paul Riseborough <[email protected]> | ||
* | ||
*/ | ||
#include "../ecl.h" | ||
|
||
#include <ecl.h> | ||
|
||
#include "ekf.h" | ||
#include <mathlib/mathlib.h> | ||
|
||
namespace estimator | ||
{ | ||
|
||
void Ekf::fuseAirspeed() | ||
{ | ||
// Initialize variables | ||
|
@@ -53,8 +58,7 @@ void Ekf::fuseAirspeed() | |
float vwn; // Wind speed in north direction | ||
float vwe; // Wind speed in east direction | ||
float v_tas_pred; // Predicted measurement | ||
float R_TAS = sq(math::constrain(_params.eas_noise, 0.5f, 5.0f) * math::constrain(_airspeed_sample_delayed.eas2tas, 0.9f, | ||
10.0f)); // Variance for true airspeed measurement - (m/sec)^2 | ||
float R_TAS = sq(math::constrain(_params.eas_noise, 0.5f, 5.0f) * math::constrain(_airspeed_sample_delayed.eas2tas, 0.9f, 10.0f)); // Variance for true airspeed measurement - (m/sec)^2 | ||
float SH_TAS[3] = {}; // Variable used to optimise calculations of measurement jacobian | ||
float H_TAS[24] = {}; // Observation Jacobian | ||
float SK_TAS[2] = {}; // Variable used to optimise calculations of the Kalman gain vector | ||
|
@@ -274,3 +278,5 @@ void Ekf::resetWindStates() | |
_state.wind_vel(1) = 0.0f; | ||
} | ||
} | ||
|
||
} // namespace estimator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.