@LiamClarkZA wrote:
Hi everyone,
We are trying to use the new create_terrain.py python script to pre-load the ‘NxxExxx.DAT’ terrain files onto a Pixhawk so that we do not need to upload terrain height information during a flight. However, we found that once we had copied the files to APM/TERRAIN folder on theSD card, ArduPlane was overwriting them with incorrect data. As a further test, we deleted the terrain files and let ArduPlane generate the .DAT files by requesting terrain information via Mavlink. It appears that these files also contain errors.
Some details regarding our setup:
- ArduPlane 4.0.5
- GCS: Mission PlannerI wrote a python script to visualize the terrain files that are being generated by the create_terrain.py as well as by ArduPilot to demonstrate the issue:
Using our location as an example S35E018, we obtained two S35E018.DAT files, one generated by the create_terrain.py script and the other from ArduPlane (with an initially empty APM/TERRAIN folder). Going through the lat/lon data contained in the S35E018.DAT file generated by ArduPlane, it seems like most of the blocks being loaded in are from 1 longitudinal degree East of the correct tile (S35E019), and some of the smaller groups of blocks are being loaded from 1 latitudinal degree north of the correct location (S34E018).
Here is the plot of the S35E018.DAT file generated by the script (which is correct):
Here is the plot of the S35E018.DAT file generated by ArduPlane (which contains errors):
For anyone else wanting to better understand the terrain file structure, here is a diagram of what I roughly understand the structure to be (there may be mistakes in here so please let me know if there are changes needed):
Posts: 1
Participants: 1