ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.98k stars 17.51k forks source link

AP_NavEKF3: EKF ignores rangefinder for terrain estimates if RNGFND1/2 are not configured downward facing #25399

Open rishabsingh3003 opened 1 year ago

rishabsingh3003 commented 1 year ago

Issue details EKF3 (and probably 2 also) currently ignores rangefinder readings if one of RNGFND1 or 2 _ORIENT is not set to 25 (Downward facing). This means if, for example, RNGFND4_ORIENT = 25 is the first downward-facing rangefinder, the user will not be able to switch to a loiter in an optical-flow-based setup.

This is easily reproducible in SITL. The culprit code is here: https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_NavEKF3/AP_NavEKF3_Measurements.cpp#L37

Platform [ x ] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine

rmackay9 commented 1 year ago

I think this is a duplicate of this issue https://github.com/ArduPilot/ardupilot/issues/5781