* EKF: add test comparison program for GPS yaw fusion equations
* EKF: convert GPS yaw fusion method to use SymPy generated equations
* Replace if/else with simple if
* EKF: fix formatting of GPS yaw fusion auto-code comparison test
* EKF: Use SparseVector type for GPS yaw fusion Jacobians
* EKF: Fix bug in GPS yaw derivation comparison check
* Add gps_yaw auto generated code file
Co-authored-by: kamilritz <kritz@ethz.ch>
* 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>
* EKF: Add sympy derivation of equations for EKF-GSF yaw estimator
* EKF: Convert EKF-GSF yaw estimator to use sympy generated equations
* EKF: Add status prints for GSF-EKF yaw estimator cvode gen
* EKF: Move generated code for GSF-EKF yaw estinmator to generated directory
* Make it run with python3
* Cleanup yaw estimator code generation
* Improve and simplify gsf measurement update code generation
* Use improved auto generated measurement update code
& remove obsolete updateInnovCovMatInv function
* Delete generated ekf_derivation for the moment
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>
Minor consistency fixes for the copyright header and update the tables to current. PX4Buildbot will periodically update the tables automatically from this point.
- 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