3.4-rc5: precision landing distance-to-target goes to zero during descent

Hello, I’m using IRlock for precision landing. Generally, it performs very well, especially since the dynamic descent speed was added. However, there is a problem that appears inconsistently which causes the calculated offset distance to target (PL.pX and PL.pY in the logs) to go to 0 during descent, even though the aircraft is off target. I’ve encountered this problem in rc2 and rc5. See my graph of four consecutive precision landings:

The problem caused the aircraft to land off target in the first two, but afterwards inexplicably disappeared and the subsequent landings were good. In the first two landings, pX and pY (blue and green) go to exactly 0 before the POS.Alt (red) reaches its minimum value (i.e, aircraft landed), and while the beacon is still within sight of the camera. When this happens, the aircraft simply descends straight down until landed. In this graph, the altitude values are scaled to make the graph look better, so ignore them.

As for the problem, I thought maybe incorrect/inaccurate altitude readings being used to calculate the offset distance might be the cause, such as if the altitude was 0 or negative, however the log showed the altitude being positive when this occurred. There is a parameter PLND_ALT_THR_CM that lets me set a minimum altitude value to be used for this calculation. I had mine set at 0, but haven’t tested other values enough yet to determine if that circumvents the problem. Even if it does, though, the underlying cause would still exist, wouldn’t it?

Dropbox for this log .bin (4.6 Mb)
https://www.dropbox.com/s/his9hmgbtybcpox/PL%20test%20offset%20zeroes%201.bin?dl=0

Thanks in advance for any insight.

Interesting. I just deployed IR Lock with AC 3.4-RC5 and the recommended PL* settings and it works perfectly well for me.

One hint maybe is to do a IMU calibration- that significantly reduced drifting in my case.

@Anubis I encounter the same issue sometimes (usually only the first time, but still very rare) using RC5. Did you find any cause for the problem ?