To use the terrain awareness mode you first need a height model of the area where you will perform your flights. The height model (.tif and .tfw) needs to be in Sweref99TM + RH2000 for this guide (Download from maps.slu.se).
Set the following variables in Enviroment Variables:
You will also need the geoid model SWEN17_RH2000.gtx which can be downloaded here. Put it inside the folder C:\OSGeo4W64\share\proj.
The following GDAL command converts your height model from Sweref99TM + RH2000 to WGS84 with ellipsoid heights:
gdalwarp -ot Float32 -of GTiff -co TFW=YES -tr 2e-4 1e-4 -s_srs “+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +geoidgrids=C:/OSGeo4W64/share/proj/SWEN17_RH2000.gtx” -t_srs EPSG:4326 -overwrite hojd2m3006_7084896_772090.tif hojd2m4326_7084896_772090_rh2000fix.tif
Where in this case “hojd2m3006_7084896_772090.tif” is the infile height model and “hojd2m4326_7084896_772090_rh2000fix.tif” is the output file.
The output .tif file and the downloaded .tfw file are now ready to be imported onto the DJI controller SD card.
- Create a folder called DJI
- Create a subfolder called DSM
- In DSM create a subfolder for each individual area.
- Put the .tfw file and the converted .tif file in this folder.
Inside the application import by clicking the SD card logo and select “DSM file” and import the files .tif file for the areas that you are going to fly.
Now you are ready to use Terrain Awareness Mode as planning method. Your .tif file should now appear in the list for this method of planing.
You might need to change the maximum allowed flying altitude depending on the altitudes from your height model.