Using terrain awareness mode with DJI Phantom 4 RTK

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:
PATH: C:\OSGeo4W64\bin
GDAL_DATA: C:\OSGeo4W64\share\gdal

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.

  1. Create a folder called DJI
  2. Create a subfolder called DSM
  3. In DSM create a subfolder for each individual area.
  4. 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.

LASTools

We have a research and education license for the LASTools software. It is installed in all the lab’s computers. Please contact the lab’s responsible if the license is experied or the program is missing. The tools are frequently updated so if you need the tools for your work, make sure you have the most recent version, please contact us if you notice that there is an old version installed (c:\lastools).

The latest version of LASTools can be downloaded from here. Read more about LASTools on RapidLasso GmbH.

Here is a summary of the tools available and also a few links where you can read more about the software and a active forum.

Open source tools

These tools does not require a license.

  • laszip.exe compresses the LAS files in a completely lossless manner
  • lasinfo.exe prints out a quick overview of the contents of a LAS file
  • lasindex.exe creates a spatial index LAX file for fast spatial queries
  • las2las.exe extracts last returns, clips, subsamples, translates, etc …
  • lasmerge.exe merges several LAS or LAZ files into a single LAS or LAZ file
  • txt2las.exe converts LIDAR data from ASCII text to binary LAS format
  • las2txt.exe turns LAS into human-readable and easy-to-parse ASCII
  • lasprecision.exe analyses the actual precision of the LIDAR points

Closed source tools

These tools requires the licence that we have installed in the lab’s computers.

  • lastool.exe is an old GUI for multiple LAStools (now each tool has its own GUI)
  • lasground.exe extracts the bare-earth by classifying all ground points
  • lasground_new.exe an improved version of lasground.exe for complex terrains
  • lasoverlap.exe checks overlap & vertical/horizontal alignment of flight lines
  • lascontrol.exe quality checks elevations for a list of control points
  • lasclassify.exe finds buildings and the vegetation above the ground
  • lascolor.exe colors the LAS points based on ortho imagery in TIF format
  • lasgrid.exe grids onto min/max/avg/std elevation, intensity, or counter rasters
  • lascanopy.exe computes many raster and plot metrics for forestry applications
  • lasboundary.exe extracts a boundary polygon that encloses the points
  • lasheight.exe computes for each point its height above the ground
  • lastrack.exe classifies LiDAR point based on distance from a trajectory
  • lasplanes.exe finds planar patches in terrestrial, mobile, (airborne?) scans
  • lasclip.exe clips points against building footprints / swath boundaries
  • lastile.exe tiles huge amounts of LAS points into square tiles
  • lassplit.exe splits points of LAS file(s) into flightlines or other criteria
  • lassort.exe sorts points by gps_time, point_source, or into spatial proximity
  • lasduplicate.exe removes duplicate points (with identical x and y, z optional)
  • lasthin.exe thins lowest / highest / random LAS points via a grid
  • las2tin.exe triangulates the points of a LAS file into a TIN
  • las2dem.exe rasters (via a TIN) into elevation/slope/intensity/rgb DEMs
  • las2iso.exe extracts, optionally simplified, elevation contours
  • lasview.exe visualizes a LAS file with a simple OpenGL viewer
  • las2shp.exe turns binary LAS into ESRI’s Shapefile format
  • shp2las.exe turns an ESRI’s Shapefile into binary LAS

BLAST extension (use if you have huge amount of points):

  • blast2dem.exe rasters like las2dem but with streaming TINs for billions of points.
  • blast2iso.exe contours like las2iso but with streaming TINs for billions of points.

Links