Unable to Arm: (PreArm: Waiting for Terrain data)

I am configuring a quadcopter with AC4.0.3, connected to MP via telemetry link. Everything is set up, but when I try to arm the copter the PreArm message “Waiting for Terrain data” pops up. The computer on which MP is installed has an internet connection, the copter has good GPS signal “GPS: 3D fix”. And on the flight planning tab the SRTM height is shown for the whole area in which I’m planning.

I also attach a screenshot of the status tab. In this image you can see that the ground height of the home point is known, the distance between the drone and the home point is only 17m but still the ground height is unknown (ter_alt and ter_curalt equals zero) and there are 336 tiles to download.

The only way I have managed to avoid this PreArm message and arm the copter is by deactivating the TERRAIN_FOLLOW parameter. But I would like to keep using this feature for the RTL mode.

Any idea how we can solve this problem?

Install Google Earth on the same laptop. It may solve the problem. let me know if it doesn’t then we will troubleshoot it further.

Thanks for answering. Google earth was already installed on the laptop. Anyway, I have checked its functioning and it works properly. Any other ideas?

check this thread Bad or No Terrain Data when arming

I’ve already read it, but there’s nothing about it that catches my eye. I don’t think it’s the same problem.

ok lets take few steps back. So when you run Mission planner (Assuming latest release) and connect to your FC with GPS lock. Do you see something like this?

Upload screen shot of your MP.

Just try one thing. Uninstall MP, and Google earth. First re install Google earth and then install MP. Lets see what happens.

I have reinstalled google earth pro and then mission planner, both in their latest version. Here is a screenshot of the main MP screen with copter connected and GPS lock.

Have you tried reformatting your SD card? I have seen instances where the terrain directory is wrong/missing and that confuses things.

Also can u check if this paramter is set to 1


the other confusing part is why you have 336 ter_pend…hmmm

Did you plan some kind of way point mission 100’s miles away from your home location where the laptop is?

You are using a good quality SD card correct? Not the crappy Chinese 8MB card that comes with Pixhawk…

Make sure you are not in Auto mode.

I also noticed that you have 3D GPS fix, but I am not seeing Sat counts as shown in my pic.

Also make sure your compass settings are like this.

Good guess. I removed the microSD from the FC and formatted it on the laptop, but it doesn’t seem to be the solution, the problem persists.

I confirm that the parameter terrain_enable is set to 1. I’m also surprised that ter_pend equals 336. Plus, it’s always that value, I don’t see it changing.

As far as I know, I haven’t planned anything that far. Besides, I’ve been planning small missions near the home point, where I do have SRTM terrain data in the planning tab, and downloading them into the drone.

The SD card in my opinion is good. An 8Gb Sandisk.

The prearm message pops up in any flight mode alt_hold, loiter, etc…

You can see the number of satellites in the lower left corner of the map. Sat count equal to 12 satellites

My compass settings are the same. Except I don’t use the internal one, in this unit I prefer to use only the external, due to magnetic interference in the internal. Do you think this can influence this problem?

try enabling internal compass. Remove all way points. Just let FC download your home terrian data.

ter_pend must reach 0. That’s what the issue we are trying to solve.

is the problem solved?

I’ve activated and calibrated the internal compass (although I don’t understand how this could affect this problem). The existing mission of the FC has also been erased. The problem persists.

On the other hand, I noticed something else. As always, when I boot up the copter, it takes a few seconds to do a GPS fix. In these first instants in which the drone does not have GPS fix the value of ter_pend is zero and the drone can be armed without problem in a flight mode that does not require GPS, ej: AltHold. But as soon as the GPS receives enough satellites and makes 3D fix the ter_pend value jumps to 336 and the prearm message appears again.

This is what I don’t understand, because in the computer I have this terrain data and in other drones it works correctly. Furthermore, I have tried this drone with MP installed in other different computers and the result is the same, ter_pend equal to 336 when GPS 3D fix is obtained.

I am lost myself. When you say other drones it works, you mean you have another drone with the same FC, GPS and setup and no problem?

The only other thing I can think of is bad FC. For whatever reason. Do you have another FC and GPS to try?

I may have a found the solution to your problem.

Set this to 0, TERRAIN_FOLLOW = 0

Also read this thread…PreArm: Waiting for Terrain data

Yeah, I mean another copter with the same FC, GPS, firmware and configuration, almost clones. The FC is a Cube with the mini carrier board and the GPS is the Here 1. I might try changing some of the hardware to see if it makes a difference.

And yes, as I said in my first post, if I set the TERRAIN_FOLLOW parameter to 0 the problem is solved. But I would like to be able to solve it without having to lose this functionality.

And by the way, thanks for the help and effort :wink: