12 Commits

Author SHA1 Message Date
Paul Riseborough
f666ebb995 EKF: Code format fix - replace 1E-x with 1e-x 2020-10-06 20:50:52 +11:00
Daniel Agar
fab242a81f python generation add shebang, mark executable, ignore cache
- commit all current generated files
2020-09-07 09:20:41 +02:00
Paul Riseborough
c43307b8cf EKF: convert drag fusion from Matlab to SymPy generated auto-code 2020-08-18 17:05:59 +10:00
Paul Riseborough
168dbdf630 EKF: Convert sideslip fusion to use SymPy generated auto-code 2020-08-16 08:45:59 +10:00
Paul Riseborough
486a461a5e EKF: airspeed fusion derivation test comparison cleanup 2020-08-16 08:45:26 +10:00
Paul Riseborough
a5a43dbc6c EKF: Convert airspeed fusion to use SymPy generated auto-code 2020-08-16 08:45:26 +10:00
Paul Riseborough
1ad042da23 EKF: Use ecl::powf in comparison test 2020-08-16 08:44:17 +10:00
Paul Riseborough
1592db8f34 EKF: Convert optical flow fusion to use SymPy generated equations 2020-08-16 08:44:17 +10:00
Paul Riseborough
1f386c1bb8 EKF: Add yaw estimate SymPy generated code files 2020-08-16 08:43:29 +10:00
Paul Riseborough
0aa2f17562
EKF: Convert GPS yaw observation method to use SymPy generated code (#880)
* 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>
2020-08-13 13:23:57 +10:00
Paul Riseborough
21cc46edd7
EKF: Convert magnetic field observation methods to use SymPy generated code (#879)
* 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>
2020-08-11 18:57:22 +10:00
Paul Riseborough
77b11129fa
EKF: replacement of covariance prediction autocode with sympy generated output (#870)
* 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>
2020-07-30 12:44:08 +10:00