Severe altitude difference cause crash

Hope someone can help.

I set the last waypoint altitude to 20 meters.

However, during landing approach the baro altitude was indicating 25 meters but the real altitude was already zero and I crashed shortly before home.

I do have lidar and set the altitude where the lidar should help during landing at 40 meters, but there was no correction.

The bin logfile is here:

I noticed from the logfile the altitude difference already showed up almost immediately after take off. However, in my understanding, the flight control should have started using the lidar at 40 meters altitude.

I probably made a mistake in my parameter setting, but I can’t figure it out.

Can someone take a look and help? Thanks in advance.

I have limited knowledge of Plane and VTOLs, but anyway…
The rangefinder is not working correctly, or at least reliably. You can see it’s not giving reliable readings even below 40m altitude during takeoff or landing. It could be that EKF was ignoring it - yes in fact innovations are high (higher than I would have expected) so there’s a good chance the rangefinder is being ignored most of the time it’s in range.

Also I would update the firmware and change to EKF3.
Ensure you’ve downloaded the latest terrain data for the areas you fly. There was an issue with older terrain data and your existing firmware version will NOT notify you. The glitches were mostly on the east coast of continents, so probably not where you were flying, but why take the chance.

Plane people might have a more definitive answer than my general points.

Thank you for your answer, although I find it not very helpful.

Yes, I agree the lidar was having glitches, but there was definitely an area with stable reading:

I also don’t think the firmware is an issue. Yes, it’s not the latest, but we have absolutely no problem with the terrain data in Thailand.

My question was if it is a problem with the settings in the parameters where I think the altitude should come from the lidar instead of the baro. Are those settings correct? Or is it only during landing and not during approach? What could be a possible root cause for the huge difference in altitude?

Granted there is some valid rangefinder data, and overall altitude seemed to match rangefinder data despite high innovations. It looks like the problem might be that it flew into the ground following the mission - according to what I can see in that log it looks like the VTOL Land WP is at about 2m altitude leaving no time for it to take effect. VTOL motors only got to run for less than a second.
Happy to be corrected as I’m far from being a Plane expert.

Barometric altitude was almost 25 meters different from Rangefinder data. The last waypoint altitude before landing was 20 meters, not 2.

Can someone with real knowledge please have a look?

@Verloop

The crash could have been prevented if you had taken more care when studying the Wiki, especially the sections on VTOL and rangefinder, or if you had shown better airmanship.

Wiki:

In the wiki (Rangefinder Setup: RangeFinders Setup Overview — Plane documentation ), you will see a reference to the RNGFND_LANDING parameter (Rangefinder Landing). This explains how to use the rangefinder to measure altitude during landing.

As @xfacta Shawn already mentioned, your rangefinder malfunctions at low altitudes and is useless until you’ve fixed the cause or installed a better one.

Airmenship:

Rapid drops in air pressure are not unusual in your flying region, so I would recommend preparing for them on longer flights. “High to low, look out below”.

About 50 minutes passed between take-off and the crash. During that time, the air pressure at Bangkok Don Mueang International Airport, just 45 km away, dropped by more than 1 hPa. However, the peak, with significantly higher hourly pressure drops, occurred a little earlier there. While I don’t know the path of the low-pressure system on the day of the flight, it’s quite possible that an even more rapid drop in air pressure occurred in your area during your flight. A drop of 1 hPa in pressure causes the barometric altimeter to read 8 metres too high. Looking at the trend of the two barometers, I would say the reading was about 12 metres too high.

(Although absolute GPS altitude measurements without an RTK fix are inaccurate, this is a relative measurement in which the GPS is more stable than the barometric pressure sensor.) The last barometric altitude reading before impact shows 20 meters (Baro 0, which you used) and 10 meters (Baro 1). Baro 1 seems more accurate to me here, as the drop in air pressure during the flight matches the 10 metres almost perfectly.

As @xfacta Shawn already mentioned, you set the mission path during the approach to just 1 meter above home level for WP75 VTOL_LAND. That’s obviously much too low.
Also, in my experience, it makes sense to apporach by having the drone fly a traffic pattern first at a safe altitude and within safe visual range, so that you can take over via the transmitter and land if necessary.

Most importantly: I’m not familiar with the regulations for Beyond Visual Line of Sight (BVLOS) flights in Thailand. If you flew almost exclusively along the highways without official permission, I would say that was irresponsible.

Rolf

I’d rather not fly without really knowing what I’m doing.

Thanks for your reply.

First of all, I fly fully authorized with CAAT approval for inspection purposes. I use LTE connectivity throughout the flight so I never lose control.

Secondly, I have line of sight within 600 meter range, so also there is no problem.

In my understanding, the last waypoint was set at 20 meters altitude, not 1 meter.

The wiki you refer to is related to copter, not VTOL.

It’s really unbelievable not to get any real answer on my questions. Waste of time.

I’ve been flying ardupilot for over 15 years. I think I know what I’m doing.

What sort of answer are you looking for? It’s well known that baro altitude always varies slowly over time. If you get eyes on the aircraft before landing you should be able to take over if something is not right.

I still think it’s a good idea to update the firmware, change to using EKF3 and potentially set GNSS as the altitude source. This has it’s own issues, like a step-change of altitude if something goes wrong, instead of a gradual change.
What GNSS unit do you have now? The F9P units suit a plane where the aircraft could spend quite some time banked in a turn.

Calm down please.

The waypoint 75 had already been activated shortly before impact.

That’s why the link in the Plane Wiki is :wink: https://ardupilot.org/**plane**/docs/common-rangefinder-setup.html

Yes I concur with Rolf, I extracted the waypoints too, and that VTOL_LAND value of 1m means: “fly to 1m altitude then start the VTOL Land” which is obviously too low.

This give me a real headache.

For a VTOL, the waypoint (74) before the last (75) which is VTOL_Land command means "transistion to hover and move to the VTOL_Land position. Then, reaching the last waypoint (75) which is VTOL_Land, it will start descending for landing.

We do this hundreds of times and it follows the procedure that Adrduplane should follow. Never, ever have any problem

The root cause of this crash in NOT wrong sequence or values of waypoints. The root cause is the difference in real altitude versus baro altitude. All I wanted to know is if my settings for change to rangefinder altitude are correct.

Your interpretation of the sequence is totally wrong.

I stand corrected - you are right.
The VTOL_LAND should adopt the altitude of the previous waypoint, fly to the position and start the VTOL land descent after transition. The only tiny difference I see there is the altitude should be zero, but I suspect that wont matter much.

I could not see anything wrong with your rangefinder or altitude settings, it just comes back to the changed baro readings over time.
I would change to using GNSS altitude and do a test flight to see how that goes. The baro should be used as fallback if there’s a problem with GNSS altitude.

That’s exactly what I’m thinking.

The reason I use 1 meter instead of zero is to make the final landing more smooth. When it reaches 1 meter during landing, of course at that time using the lidar, the descent rate slows down for the final touchdown even a bit more and makes the landing very soft and gentle.

I finally found why the lidar was not taking over during landing:

EK2_RNG_USE_HGT was set -1 which means automatic EKF height-source switching to rangefinder was disabled.

do not have time to study log…but rangefinder is not used between waypoints…its not used on a VTOL land waypoint until final descent phase…on a fixed wing segment its only used on fixed wing landing when a lot of criteria are met in the code during the approach…airpress and baro heating are usual causes for baro drift during flight

Adding to what hurzburg said about when the rangefinder is actually used: you asked whether the settings or the lidar are the problem. From your own screenshot I would say it is mostly the second, and the order matters.

Two things decide whether the EKF ever uses the lidar on approach:

  1. The rangefinder only helps the height estimate when its readings agree with the rest of the solution. If the readings jump around (like the ones above ~30 m in your screenshot), the EKF rejects them as innovations that are too big and carries on with baro. In the log that looks exactly like “no correction”. So check the rangefinder innovation / consistency, not only the raw RFND.Dist trace. A stable-looking patch does not help if the stretches around it are noisy, because the filter gates every sample.
  2. The 40 m you set is a switch point, not a promise that the lidar is good from 40 m down. Usable range depends on what the beam hits. Datasheet range is quoted for a bright target (typically ~90% reflectivity); dark grass, wet ground and tarmac are much closer to 10%, and on many lidars that is a third or less of the headline range. A 40 m threshold on a unit that gives clean returns only to 15-20 m on your terrain will always be noisy in the 40-20 m band.

What I would try, in this order:

  • Set the rangefinder max range (RNGFND1_MAX) to what the sensor really delivers over your ground, not the datasheet number, so far returns never reach the filter.
  • Check RNGFND1_GNDCLEAR is the true sensor-to-ground height on the landing gear, otherwise you get a constant offset at touchdown.
  • On the next approach compare RFND.Dist against baro-minus-home below ~15 m. If they agree there and diverge above, the settings are fine and the sensor is just out of its reliable range on that terrain.
  • Mounting: in the flare the beam sweeps forward and on a shallow slope the spot gets long; the distance reported is the first strong reflection inside that footprint.

If you post the next log I am happy to look at the rangefinder lines with you.