Updated: November 21, 2018

The Phantom 4 RTK allows Surveyors to gather highly accurate drone data for mapping purposes. And while the initial release promised PPK functionality, the workflow for that has proven to be very difficult. Below is Aerotas’ workflow for processing data from the Phantom 4 RTK in PPK mode.

There are many different ways to process PPK data from the Phantom 4 RTK, including numerous different softwares and sources for base station data and satellite navigation data. In this workflow, we will be using 100% publicly available software and correction data. Software is published by RTKLIB, NOAA, and Aerotas. Online data provided by NOAA and NASA.

Note: This workflow is a work in progress, and changes are made frequently to improve the accuracy, reliability, and simplicity of the process. If you see any errors, or have any suggestions, please email them to support@aerotas.com.

Overview of Steps

In this guide we will cover the 5 major steps required to go from flying a Phantom 4 RTK, to final PPK corrected location data in your photogrammetry software.

  1. Collect Data in the Field

  2. Gather PPK Correction Data

  3. Run PPK Correction Algorithms

  4. Adjust GPS data For time and gimbal offsets

  5. Integrate Data into Photogrammetry

Collect data in the field

Turn RTK Off

Because we will be processing this data in PPK mode, you should turn off the “RTK Function” within the DJI RTK app.  The drone will still collect PPK data when running a mission even with RTK Function turned off.

Set Checkpoints

If this project is for land surveying, it is necessary to use ground based surveying to set checkpoints and/or ground control points.  Otherwise, it is impossible to detect errors in the final data product.

Fly Phantom 4 grid pattern mission

Start by flying your P4RTK in a standard grid pattern mission, like the example below. Because we will process this data in PPK mode using public CORS base stations, you do not need a base station of any kind setup for this mission.

Gather PPK correction data

In order to perform PPK corrections, we will need 3 files.  

  • A “rover” file, which is the RINEX data that comes directly from the Phantom 4 RTK

  • A “base station” file, which is the RINEX observation data for a fixed base station.  For this workflow, we will use publicly available CORS base station data.

  • Broadcast ephemeris data, which is the precise satellite navigation data. For this workflow, we will use data provided by NASA CDDIS.

Rover observation file

The rover observation file is saved directly onto the Phantom 4 RTK’s SD memory card, and ends in Rinex.obs.  The file comes in RINEX version 3.03 and is the raw satellite observation data.

image6.png

Note the portion highlighted in yellow.  This is the start and end time of the observation file, and will be useful in the next step when downloading base station observation data.

Base observation file

To download the base station data, we will be using the NOAA CORS network.

To begin, use the CORS Map to locate the nearest base station to where the flight occurred.  

Then, use the CORS utility to download the base station data.

Use the time data from the rover file to know the exact UTC date/time that you need to download.

image13.png

This will download a zip file with a few files inside of it.  The largest file should end in .##o, where ## is the last two digits of the year.  This .##o file contains the base station observation data to be used.

Satellite navigation file

Lastly, we will need a broadcast navigation file. For this, we will use NASA’s daily GPS broadcast ephemeris data available at NASA’s CCDIS website.

The downloaded file will be titled brdcDDD0.YYn.Z and comes in a zipped format.  You will have to unzip the file before it can be used.

Run PPK Corrections

Now that you have all the files needed, it is time to run the PPK correction algorithm.  For this, we use the free and open source program RTKLIB.  We recommend the latest version, which as of this writing is 2.4.3.

After downloading RTKLIB, open the program rtkpost.exe.

image4.png

Files

Before you can even enter your files, you must set positioning mode to Kinematic by clicking on Options, and setting Positioning Mode to Kinematic.

image10.png
image7.png

Take the three files downloaded earlier (Rover, Base and Navigation) and add them to their respective fields as shown below.

image5.png

Settings

Having the settings selected correctly for this workflow is critical to obtaining good results.  Below are the settings that Aerotas has found leads to the most accurate results. Only the settings that have been changed from their default are noted.

image1.png

Setting 1

  • Positioning Mode: Kinematic

  • Frequencies: L1+L2

  • Filter Type: Combined

  • Elevation Mask: 15

  • Rec Dynamics: On

  • Satellites Included: GPS, GLO

Setting 2

  • Integer Ambiguity Res: Fix and Hold

Output

  • Solution Format: Lat/Lon/Height

  • Output Header: Off

  • Output Processing Options: Off

  • Time Format: ww ssss GPST

  • Field Separator: , (comma)

Positions

  • Base Station: RINEX Header Position

The output settings are critical for allowing the processed data to import cleanly into future steps, and match properly with DJI’s Timestamp.mrk file.

Execute / audit

Click on “Execute” to run the PPK processing. This can take a few minutes.

Once processing is completed, click on “Plot” to open a visualization of the results. It should look something like below:

image2.png

Green points are fixed integer solutions, while yellow points are float solutions. You can also click on “View” in RTKPOST to view the raw data outputs.

image14.png

The raw data outputs include the following fields:

  • GPS Time (in weeks and seconds as selected in the settings)

  • Latitude (degrees, WGS84)

  • Longitude (degrees, WGS84)

  • Height (meters, WGS84 ellipsoid)

  • Q: Quality of solution (1= fixed integer, 2=float)

  • ns: Number of Satellites used in the solution

  • sdn / sde / sdu: The estimated standard deviations of the solution (north, east, and up) in meters

  • sdne, sdeu, sdun: The square root of the absolute value of NE, EU or UN component of the estimated covariance matrix

  • Age: The time difference between the observation of the rover and the base

  • ratio:The ratio of the squared sum of the residuals with the second best integer vector to with the best integer vector

This final .pos file gives the most accurate calculation of the location of the drone throughout its flight. It does not, however, perform any adjustments for the relative movement of the camera, the timing of when the camera took pictures, or different coordinate systems used in surveying and data processing.

Adjust GPS data to Camera Time / Location

Now that we have the accurate positions of the drone’s RTK antenna, we need to adjust this data to the location of the actual camera at the exact time that the camera took the photo. Because this is a very new product no open source software yet exists for performing these calculations.

However, Aerotas has developed a publicly available excel file to assist in these calculations, that is available at the below link.

Complete instructions are available within the file, but the simple instructions are below.

Note: you will have to enable macros for this form to work properly.

  1. Copy your position file data into the “Position File” tab on cell B1.

  2. Copy your timestamp.mrk data into the “TimeStamp” tab on cell A1.

  3. On the “Instructions” tab, click “Calculate” to calculate the data, and then click “Save Output as CSV” file to save the final position data in a CSV file.

The final output CSV file contains 4 columns:

  • Photo Name

  • Latitude (degrees)

  • Longitude (degrees)

  • Elevation (meters)

Next Steps

The final CSV file contains PPK corrected locations for the camera positions of all of the photos taken for the mission. From there, you can import this data into your photogrammetry software to perform photogrammetry calculations.

Yet, this is not the end of the journey. To make full use of this data, you still will need to perform the following steps, which are not covered here:

  • Convert from WGS84 to the coordinate system / datum of your project

  • Accurately process photogrammetry to prevent air to ground errors

  • Check final results against checkpoints to measure accuracy

  • Convert the full 3D model into DXF linework for use in CAD

Aerotas offers all of these services as part of our comprehensive linework offering. If you are interested in these services, you can learn about our linework product below, or request a quote for drafting services on your particular project.