" PreArm: Waiting for Terrain Data " I couldn't get rid of the error

Hello everybody. I could not get rid of this error. The instrument does not ARM even in Stabilized Mode. In the open field, it waits for a long time.
.
When I searched the forum, I learned that it usually gives this error when I activate the TERRAIN_FOLLOW parameter. However, I could not find the TERRAIN_FOLLOW parameter. The parameter is lost.
.
I just installed with another Flight Control and Lidar (TF02).
TERRAIN_ENABLE = 1
RNGFND1 …VS.
It didn’t give an error before. When I created the flight plan and uploaded it to the card, it gave the same error on that card. (Altitude = Terrain )
.
I don’t want to re-install the drone. 10lt Agricultural Drone. It flies very stable.
.
Lidar Sensor (TF02Pro) is working well.
.
Thanks in advance to all who will help.
.
PS: I apologize in advance for any translation errors.
.

@Havas_Robotic,

TERRAIN_FOLLOW has been replaced by RTL_ALT_TYPE (because it actually only affected how the vehicle fly in RTL mode).

If you can post an onboard log or at least a parameter file that should help.

We also have a bug fix which affects this parameter. This fix is included in the 4.3.3-rc1 beta so if you could install that the problem may go away. You can install the beta by going to Mission Planner’s Install Firmware screen and click on “Beta Firmwares” in the bottom right then install as per usual.

1 Like

So this new parameter change does not affect any of the terrain “following” that is done while in auto mode? or is this surface tracking? @Havas_Robotic have you tried reformatting your SD card I had this issue before and had to reformat which solved the issue.
Also check in the status screen and see what the ter_pend and ter_load are.
ter

1 Like

Do you pre-load the terrain data to SD Card in case it’s not coming from your GCS?
https://terrain.ardupilot.org/

1 Like

@406FPV,

The rename of TERRAIN_FOLLOW to RTL_ALT_TYPE does not affect terrain following in Auto mode (and never did actually) nor does it affect surface tracking (which is what we call terrain following in more manual modes like Loiter, AltHold, etc). This rename was done in Copter-4.1 which was released in Oct 2021.

Thanks for providing the good advice regarding checking the terrain database’s status.

1 Like

Thanks for your help.
Dear @rmackay9 ;
I checked the RTL_ALT_TYPE parameter. RTL_ALT_TYPE=0 .
I just updated to version 4.3.3.1. However, there was no change. I still can’t ARM in Stabilized Mode.
I am uploading the parameter file.
.
Dear @406FPV I formatted the SDCard. I’m posting a screenshot of ter_pend.
.
Dear @xfacta , Flight Control Card is indoor as it is Agricultural Drone. So, it is not possible for me to open and upload field data all the time.
I’m sending you a picture.
.
Parameter File: https://1drv.ms/u/s!Akf9nqfSuCengoYpjcIn5t6Bkjct6w?e=I0jspw
.



Huh that shows that they have all been loaded. Is it possible to swap out to another SD card. The ones that often come with these flight controllers are of pretty poor quality so getting a better one wouldn’t be a bad idea. You could get a larger one and use the site @xfacta posted and download the entire state/country you may need. I have the entire L48 loaded on my sd card from that site.

1 Like

I think you can upload the terrain data via MAVFTP easily, without removing the SD Card.

1 Like

whoa no way jose? I need to dig into FTP a bit more is there a write up about this?

The LUA scripting section has a bit on using MAVFTP
https://ardupilot.org/copter/docs/common-lua-scripts.html?highlight=mavftp#lua-scripts

And there’s some reasons why it might not work, but probably only applies to older or limited flight controllers
https://ardupilot.org/copter/docs/common-limited-firmware.html?highlight=mavftp#ram-limitations

1 Like

@406FPV Thank you for your recommendation. I will do as you say as a last resort.

@xfacta Once again, you have provided very valuable information. Thank you. I will try it at the first opportunity.
I also want to make sure that there are no errors in the parameters. Because I’m going to sell this drone. Someone who has no understanding of ArduCopter will use it.

Hello. I uploaded the terrain data from terrain.ardupilot.org. I transferred it to SD Card. I uploaded all the DAT files into the Terrain folder. But the error was not fixed. I can’t ARM in stabilized mode. It requires a GPS lock. Bug fixes in open field. Even in open space I get the same error from time to time.
.
I’m afraid there is an error in the parameters. Dear @rmackay9 , I would be glad if you check it out.
.
Parameter File: https://1drv.ms/u/s!Akf9nqfSuCengoYpjcIn5t6Bkjct6w?e=I0jspw

I bought a new SD Card. Sandisk Ultra. I have uploaded all the terrain data to the Terrain Folder. Nothing changed. No ARM in Stabilized Mode.
.


.

.

Boy I cannot readily see anything wrong with your param file. You have done all the things I can think of. Do you need the hardware safety switch enabled on this, if not lets get rid of that issue first.

1 Like

@406FPV Thank You. Hardware safety swich no problem. Working properly.

.

1 Like

Calibrating the compass at a new location is an old DJI thing.
For Ardupilot you dont need to calibrate compass if you got it right the first time. Even moving to a location far away does not require compass calibration.
We (the Ardupilot community) have people that have moved thousands of kilometers, or even near polar regions and not calibrated the compass again.

If you want to refine the compass calibration do a flight with lots of yaw and run the log through MagFit

3 Likes

Hi @Havas_Robotic,

There should be no need to manually upload the terrain data to the SD Card. If the autopilot is connected to the ground station (e.g. Mission Planner) and the Mission Planner has access to the internet then it should upload all the required terrain data to the autopilot.

I’m a little surprised that the terrain data warning triggers at all when the vehicle is in stabilize mode. I’ll look into removing that.

It’s also quite suspicious that in the image above the “ter_pend” is zero. If it’s not pending any terrain data then I don’t see how it could stil be “waiting for terrain data”. This looks like a bug to me.

I suspect if the vehicle gets a GPS lock and is able to get the terrain data form the ground station the issue will be resolved permanently.

Sorry for the troubles…

1 Like

How much radius of terrain data it will upload to autopilot from the drone current home position?

Its mandatory to connect internet to mission planner through out end of the flight to get Terrain to be uploaded or we can disable once terrain data loaded and there is no error message regarding terrain data from ground station?