1534 Commits

Author SHA1 Message Date
Daniel Agar
fda30d8cec geo_lookup: expand latitude to +-80 degrees 2020-06-22 09:45:22 -04:00
Daniel Agar
109eca5200 geo_lookup: create simple python script to update tables 2020-06-22 09:45:22 -04:00
Daniel Agar
41b9e4f628 geo_lookup: move tables to separate file 2020-06-22 09:45:22 -04:00
Daniel Agar
a8bb8ea99f move TECS, L1, and validation to PX4/Firmware 2020-06-18 18:48:36 -04:00
Matthias Grob
a296fe7d8c Move AlphaFilter out of EKF 2020-06-15 13:07:51 -04:00
Matthias Grob
daec5ae608 AlphaFilter: replace isfinite with positive denominator check 2020-06-15 13:07:51 -04:00
Kamil Ritz
e835bc34c4 remove inline modifier 2020-06-12 15:11:16 +02:00
Kamil Ritz
74780aa512 Refactor gps fusion commencing 2020-06-12 15:11:16 +02:00
Matthias Grob
38cbd1a182 AlphaFilter: prevent setParameters division by zero 2020-06-09 16:32:24 -04:00
RomanBapst
b7d54b5477 gps: fixed filter initialization bug around gps
- do not gps reference altitude to zero in case gps checks pass before the
filter initialized
- reset the filtered gps position and position derivative filters in case
we are in air or there is movement on the ground

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-06-08 16:19:38 +02:00
bresch
8f533cb878 terrain_estimator: fix sensor aid selection 2020-06-05 20:44:30 +02:00
bresch
821e1fa8fc terrain_estimator: add unit tests 2020-06-05 20:44:30 +02:00
bresch
aa96fa6d9e Random style fixes in the code 2020-06-05 20:44:30 +02:00
bresch
5d6a72e383 sensor_simulator: add possibility to set GPS position rate
one can set the position rate = velocity to obtain consistent gps data
2020-06-05 20:44:30 +02:00
Roman Bapst
b3dc06d0cb Added height above ground source bitmask indicating which sensor is used 2020-06-04 09:44:19 +02:00
bresch
62e15cbacf sensor_simulator: set IMU rate to 200Hz as this is the new value
used in the Firmware
2020-06-03 17:09:20 +02:00
bresch
6126c190b2 sensor_simulator: update EKF at IMU rate
This is how it is also done in ekf2_main. Otherwise, this leads to
multiple integration of the same IMU data due to asynchronous sensor
updates triggering a prediction step between IMU updates.

Fix unit tests that broke because of this fix
2020-06-03 17:09:20 +02:00
Paul Riseborough
59183f70ba
EKF: Reduce EKF-GSF vulnerability to large yaw gyro bias errors (#831)
* EKF: Reduce EKF-GSF vulnerability to large yaw gyro bias errors

* Update EKF/ekf_helper.cpp

* EKF: Fix comment typo

Co-authored-by: Roman Bapst <bapstroman@gmail.com>

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Roman Bapst <bapstroman@gmail.com>
2020-06-02 17:42:54 +10:00
Matthias Grob
d0ddda8917 tecs: fix typo init(i)alized 2020-05-29 20:03:22 +03:00
Kamil Ritz
86fc94b75a Remove tilt align from position innovation check 2020-05-25 11:12:24 +02:00
Mathieu Bresciani
b024cdd282
unit test: check that the accel bias is only learned when observable (#827) 2020-05-25 11:10:01 +02:00
Paul Riseborough
c91c78dcf6 EKF: Allow reset of yaw to EKF-GSF later in flight 2020-05-22 13:05:10 +03:00
Daniel Agar
600240d95f EKF: resetGpsAntYaw() fix double promotion 2020-05-20 12:44:18 -04:00
kamilritz
39c09b8092 add basic gps yaw fusion test 2020-05-20 08:52:52 +02:00
Kamil Ritz
21f49c22dc Use resetQuatStateYaw during gps yaw reset 2020-05-20 08:52:52 +02:00
Carl Olsson
7f21364844
EKF: use initial wind uncertainty with no airspeed sensor (#823) 2020-05-20 08:38:58 +02:00
kritz
bf78044bcd
EKF: fix initialization of local position validity 2 (#820)
The `_deadreckon_time_exceeded` flag is used in
`local_position_is_valid()`. This means that
`_params.valid_timeout_max` after startup, in my observed case 5
seconds, the local position switche from valid to invalid and then after
a while back to valid again.

With this fix, the local position is flagged invalid from boot and gets validated after the first aiding event.

Co-authored-by: Julian Oes <julian@oes.ch>
2020-05-20 08:24:23 +02:00
kritz
716caa5168
Refactor position resets (#822) 2020-05-19 21:53:46 +02:00
Mathieu Bresciani
37d9cef262
ekf: disable xy accel bias learning before takeoff (#818)
* 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
2020-05-19 18:02:40 +10:00
Mathieu Bresciani
9788c3bdf2
ekf: split accel bias learning in independant xyz components (#817)
This is a non-functional change required to select accel bias estimation
per axis selection. The intent is then to disable the learning before
takeoff of the components that are poorly observable.
2020-05-15 09:20:27 +02:00
Paul Riseborough
19bbea75c0
Fix GPS altitude not fused if GPS checks fail and GPS is primary height source (#813)
* EKF: Fix failure to select a height sensor

* EKF: Remove unnecessary check and improve documentation
2020-05-14 19:26:16 +10:00
kritz
24f2e60b7e
Reduce stored strings, to save flash space (#815) 2020-05-13 08:09:26 +02:00
kritz
98801ad17b
Support vision velocity expressed in body frame too (#708)
* Support vision velocity expressed in body frame

* Use switch statement for vision velocity frame

* Robustify vision velocity frame test

* Increase lower bound on vision velocity noise to 0.05 m/s
2020-05-12 16:03:35 +02:00
kritz
c3de452e8e
Remove duplicate code during vision yaw reset (#810) 2020-05-12 08:44:39 +02:00
Kamil Ritz
b40adf3dec Refactor velocity resets 2020-05-12 08:05:32 +02:00
kritz
03191847f9
Fix ev_pos_obs_var(1) entry (#809) 2020-05-11 10:44:05 +02:00
Kamil Ritz
440383f039 Increase matrix library usage and remove white line 2020-05-11 09:09:52 +02:00
bresch
97b437233e ekf: remove unused function 2020-05-08 16:55:23 +02:00
bresch
26d4fbc000 EKF: reduce scope of variable and remove redeclaration of member 2020-05-08 16:55:23 +02:00
bresch
edc8a88c24 yaw_fusion: remove useless initialization 2020-05-08 16:55:23 +02:00
bresch
75c49b2082 ekf_helper: fuse double if 2020-05-08 16:55:23 +02:00
bresch
0e3bf2872c EKFGSF_yaw: cleanup initialization of member variables 2020-05-08 16:55:23 +02:00
Daniel Agar
12835b999e
cmake update CXX standard 11 -> 14
- this doesn't really change anything, just staying in sync with PX4/Firmware
2020-05-01 13:33:49 -04:00
Paul Riseborough
cda7486897
EKF: Prevent yaw reset to GPS caused by loss of GPS data (#805) 2020-04-30 17:50:26 +10:00
kamilritz
8b6d665a13 Avoid subtraction of two uint 2020-04-27 10:17:01 +02:00
kamilritz
70d65ea55f Test:Increase GPS jump need for rejection 2020-04-25 10:11:01 +02:00
Kamil Ritz
c19f40e574 Add reset position test for GPS and VISION 2020-04-25 10:11:01 +02:00
Kamil Ritz
78a6b9f7a8 SensorSimulator: Fix GPS horizontal position step 2020-04-25 10:11:01 +02:00
Kamil Ritz
050298f6c1 Improve matrix library usage 2020-04-25 10:11:01 +02:00
Kamil Ritz
5749273d19 refactor resetPosition 2020-04-25 10:11:01 +02:00