I have problems with my RTL landing on most flights (~70%). The copter descends to about 8 m and then the altitude in the planner change to 0.21 m and it just drops to the ground. I have analysed the logs and it is obvious that something is wrong with the sonar, it shows the value 0.21 (distance from sonar to ground when on ground) during the entire flight. So when the "mixed altitude" change from using the barometric alt to sonar alt, the altitude used for navigation change from 8m to 0.2 in a blink and the copter "thinks" its on the ground and drops to the ground. I have attach a log with this is showing.
Could this problem be something connected to initiating the arducopter over telemetry? If I use USB and test the sonar it always shows the right values.
Set up: APM 2, 3DR quad frame (official set up), 3DR-radio, Sonar: MB1200 XL-MaxSonar-EZ0,