* EKF: Add comparison test for mag field fusion generated code
* EKF: convert mag field fusion to use SymPy generated code
* EKF: Add test comparison program for yaw fusion equations
* Stop setting 0 to 0
* Reduce if/else statement to only if
* EKF: more accurate implementation for sequential fusion of magnetometer data
* test: update change indicator
* Use matrix::SparseVector<float, 24, ...> for observation jacobian
* Adapt the auto code generation to allow for different bracket styles
* Add auto generated code for mag fusion
* Add generic computation of KHP
* Apply generic computation of KHP to mag fusion
* tests: update change indicator
* tests: update change indicator
Co-authored-by: kamilritz <kritz@ethz.ch>
* added python script with ekf derivation (WIP)
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* worked on c code auto-generation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* save before variable name change
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* changed symbol names
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* added codegeneration class
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* improve 3D mag fusion derivation
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* EKF: Extend ekf sympy derivation to include all observation types
* EKF: Add custom ecl::powf function for integer powers
* EKF: Convert ekf covariance prediction to use sympy output
* EKF: Add test program to compare sympy and matlab covariance prediction
Also tests ecl::powf(x,exp) function
* EKF: simplify ecl::powf function
* Generate code to subfolder generated/
* Add printouts for showing code generation progress
* Move generated covariance code to generated folder
* Upgrade code generation to python3
* main.py: Remove unused create_symbols function
& making code more compact
* main.py: move main part into function
* Code generation: fix passing wrong rotation matrix to yaw_observation ()
* EKF: Amend generated code filename for consistency
* Move ecl::powf function test to unit tests
* EKF: Use updated ecl:powf functionality in test program
* Move ecl::powf to utils.hpp
* Update ecl::powf test
* Update output change indication
* test: update expected output for change indicator
* test: update expected output for change indicator again
Co-authored-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: kamilritz <kritz@ethz.ch>
- updated table to 2 bytes (int16) per element and scaled the inclination/declination/strength tables to use most of the range without being too awkward
- tables have been extended to include the full latitude range
- expanded the API slightly to offer declination/inclination in both degrees/radians and the magnetic strength in Gauss and Tesla
- generated some simple testing that verifies interpolation between points
* ekf: disable xy accel bias learning before takeoff
As those biases are usually poorly observable before takeoff because
they are almost perpendicular to the gravity vector, learning is often
driven by noise and numerical issues. This results in incorrect bias
learning before takeoff when the drone is static on ground for a long
period of time.
* ekf: update unit test and change indicator
* EKF: Improve covariance prediction stability
Eliminates collapse of vertical velocity state variance due to rounding errors that can occur under some operating conditions.
* EKF: Fix typo
* test: Fix initialisation test cases
Provide sufficient time for variances to stabilise and fix calculation of reference quaternion for alignment.
* test: Allow for accumulated rounding error in IMU sampling test
* test: Allow sufficient time for quaternion variances to reduce after initial alignment
* test: Increase allowance for tilt alignment delay and inertial nav errors
* test: Increase allowance for tilt alignment delay and inertial nav errors
* adpat reset velocity test
* test: update change indication file
* test: Adjust tests to handle alignment time and prediction errors
* README.md: Add documentation for change indicator test
* EKF: do not fuse multiple times the same height
The _fuse_height flag was never set to zero, hence the fusion was called
at each iteration, even if no new data is available.
The effects were: high CPU usage and virtually less measurement noise
due to multiple fusion of the same sample
Also remve unused variables
* Add primitive logging for Ekf
* Add python script to extract sensor data from ULog
* Add primitive sensor replay
* Add iris_gps data for sensor replay
* Add CI for functional change indication
* Update sensor replay flow data type
* update iris_gps_change indication
* test: Update EKF replay test documentation
Co-authored-by: Paul Riseborough <priseborough@users.noreply.github.com>