Introduction and Prerequisites
This article covers a basic and practical way to implement the precision of RTK GPS into your data gathering workflow. Though the Emlid Reach is featured, it should be noted that other RTK systems are compatible with the RedEdge-3 and the larger take away from this article should be the general way in which RedEdge-3 can be used with an RTK GPS system.
NOTE: This article covers the use of the RedEdge-3 camera with the original Emlid Reach RTK GPS. If you are using newer MicaSense sensors (such as the RedEdge-MX or Altum), Emlid Reach M2 or M+ modules, this article will not apply exactly.
This article covers the following:
- Enabling the RedEdge Top of Frame output
- Data Collection
- Post Processing
Please familiarize yourself with the Emlid Reach RTK GPS if you have not done so already. Documentation can be found at Emlid’s Reach RTK Docs.
Additionally, basic familiarity with the command line and/or python is helpful.
The Top of Frame setting on the camera should be set to “Pulse low, rest high”; more about setting up RedEdge Top of Frame output can be found in the following KB article: Top of Frame Output.
The RedEdge camera can be directly connected to the Emlid Reach RTK GPS through the 6-pin DF-13 GPS connector port on the camera, and the 6-pin DF-13 connector port on the Emlid Reach GPS (Bottom side connector, opposite from the micro-USB input). This will provide power to the GPS and connect the camera’s Top of Frame output pin to the Reach’s “Time Mark” pin.
NOTE: The DLS should not be connected in this setup, as the Top of Frame line must be directly connected from the RedEdge to the Emlid, and must not pass through the DLS. If you would like to use your DLS as well, you must modify your cable to isolate the Top of Frame wire and connect it to the Emlid -- all other wires may connect to the DLS as normal.
The RedEdge camera is capable of precisely communicating capture time to the GPS through the use of the Top of Frame pulse at the time a capture is taken.
When connected this way, the GPS will save each top of frame output in its log files for later use in associating its precise coordinate positions with each capture.
NOTE: The Emlid Reach GPS does not output Ublox GPS packets at this time, so GPS coordinates will not be written to the image metadata. A python script is provided below to assist in creating a geolocation file to use with Pix4D, to associate image number with GPS coordinates.
Gathering the Data
Ensure that your base station is set up correctly with the selected coordinate gathering mode set up to use the method most suitable for you (see Placing the Base for more information), and allow the base station to achieve a position fix.
Afterwards, proceed to fly your mission using the rover GPS attached to your drone and RedEdge camera with proper Top of Frame output set.
Once the flight is done, download both sets of raw logs (the .ubx files) and proceed to process them, following the steps in Emlid's GPS Post-Processing tutorial.
Once this is complete, you should end up with a .pos file including the name “_event” at the end, which you can view with a text editor such as Notepad++; this will contain GPS locations from each time the camera took a capture.
The last step is to parse this file into a format suitable to upload to Pix4D as a geolocation file.
This can be done with the python script below, which will take in the “_events” file as an input, and create an output file at the provided location, containing each capture and its proper GPS coordinates in Pix4D’s LLH (Latitude, Longitude, Height) format. You may need to alter the script slightly depending on your use case.
You must have python and the click library installed. A typical usage of this script involves opening up the command line, navigating to the directory the script is saved to, and typing the following:
python gps_img_insert.py create_image_location_file --input_path C:\\Users\\Username\\raw_201712052221_events.pos --output_path C:\\Users\\Username\\pix4d_geolocation_format.csv
Input and output file paths tailored to your specific file locations of course. (Double slashes are needed on Windows to properly input the file path). You may need to modify this script depending on your use case (e.g. multiple flights).
CAUTION: The script is blind to which captures you are intending to stitch, so it is highly recommended that the GPS log files used to create the final "_events" file contain only camera time marks from the actual flight (i.e, not including panel images). Also, unless an additional uBlox compatible GPS is used, since the Reach is unable to send messages in a format that the RedEdge is compatible with, this restricts flying to less precise modes such as timer mode. However, using an additional GPS such as the one you received with your RedEdge kit, will allow you to fly with the RedEdge camera in overlap mode to avoid excessive captures. This would require a custom cable setup not supplied in our standard kit.
More information about Pix4D’s geolocation file format can be found here: Image Geolocation File
You will now be ready to process your imagery with RTK GPS precision. More information about using Pix4D to process RedEdge data can be found in our How to Process RedEdge Data in Pix4D guide.