-
Notifications
You must be signed in to change notification settings - Fork 509
EKF without baro sensor can stop fusion any height permanently #951
Comments
FYI I kept the original baro related init changes from #931 in https://github.com/PX4/PX4-ECL/tree/pr-ekf_init_no_baro. |
Yes, thanks. But I added also a waiting for _gps_buffer samples same as for baro. Because of not yet cleaned checks: PX4-ECL/EKF/estimator_interface.cpp Lines 189 to 190 in df7f261
gps data in buffer at least 3d :) |
Yes, we should do this for all the cases as Paul described in #931 (comment). @lukegluke do you have a flight log testing the GPS change with no baro? |
I don't fly just driving on ground :). If you want I can send by email links to logs I mentioned in #947 (comment), but I suppose it would not be very useful for you, they are recorded with older px4 and has modifications like for example lat, lon are double in deg, alt - float in m. |
Is this for a particular gps unit? I wouldn't mind making that change upstream. |
@dagar I've already suggested this here: PX4/PX4-Autopilot#14447 (comment) and tried to note possible drawbacks and tasks to do. In our custom project we moved to doubles quite ago and working with general NMEA driver PX4/PX4-GPSDrivers#58, but it is not a big deal to correct all other drivers. I could try to make a separate patch when I have time if you need it as reference point. |
use-gps-as-height-on-ekf-to-init (PX4#876) use-gps-data-with-increased-precision never-turn-off-yaw-fusion (PX4#905) do-not-use-mag_heading_noise-as-gps-yaw-variance EKF-allow-ekf-init-without-magnetometer control-fix-to-startGpsHgtFusion-again-after-timeout (PX4#951) allow-EKFGSF_yaw-to-work (PX4#902) remove-default-15-m-s-airspeed
If GPS is selected as the primary height source and it stops and there is baro data, it will continue to try and reset to GPS. Not sure what you expect EKF to do if the only source of height data stops given we do not have a no height mode available. We would need to add support for a no height mode or switch to using a 'fake' height measurement and set z and velz validity to false in the local position and global position message to stop control loops trying to use the data. |
I would expect that EKF without baro data try to reset to GPS if adequate GPS data is available back again. |
I want to use gps, imu, barometer and magnetometer to estimate the position、speed and yaw of a drone, but I don't know how to use this library |
I'm working with ground rover without baro, only GPS. I'm using a workaround for EKF initialization without baro (#876), but I found another issue.
If GPS data get stopped, firstly (after 5 secs) we get into controlHeightSensorTimeouts() and trying to reset to baro, but without it we are staying on GPS height fusion (
_control_status.flags.gps_hgt
is still set).PX4-ECL/EKF/control.cpp
Lines 832 to 843 in df7f261
Then (after 10 secs) we get into stopGpsFusion() where
_control_status.flags.gps_hgt
get cleared.That's all. Now none of the height flags is set and controlHeightSensorTimeouts() can't do nothing and will not call startGpsHgtFusion() if GPS is available again. At the same timeGpsFusion for horizontal position is returning back normally.
Additional 'else' to controlHeightSensorTimeouts() like this fix the problem for my particular case:
I suppose that issue is related to other height sources too. Also as I see even on systems with baro there still a small probability to never return to any height fusion if baro was faulty (_baro_hgt_faulty) on time of height sensor timeout.
For your note, @dagar and for addition to working on #931. Thanks!
The text was updated successfully, but these errors were encountered: