Taking the images
To take the images for your own map, you`re going to need a copter compatible with UgCS and a camera. If the copter is equipped with a camera trigger, it can be triggered through UgCS, if not, the camera needs to be set to take an image every few seconds.
UgCS can be downloaded at www.ugcs.com
We used 3DR Iris+ equipped with a GoPro Hero 3 camera. The GoPro was set to take a picture every 2 seconds. The camera was pointing downwards at a 90 degree angle.
1) Create a mission in UgCS with a few waypoints. We created a mission with 5 waypoints at an altitude of 30 m. Each waypoint has a wait action for 15 seconds to allow the camera to take a picture. Also, since the camera is taking a picture every 2 seconds, multiple pictures at the same location help you to better understand which images are taken at which waypoints.
Please note that each waypoint has coordinates in the form of 55.1234567 and 22.1234567. Unless your camera is equipped with the function of geotagging images, please take note of the coordinates for each of the waypoint images, they are later going to be used during processing.
2) Press Calculate route button and upload the route to the vehicle and let it fly the route with the camera taking images
3) Upload the images into your computer, look through them and find which images were taken at which waypoints. In the end after deleting unnecessary images and we had 5 waypoints our image folder looked like this:
Please note that the step 3 can be made a lot easier if the copter is equipped with a camera trigger. Camera Trigger action can simply be added to each waypoint in UgCS and thus each image automatically is taken at each waypoint and scripts used to combine coordinates from telemetry with pictures.
Processing the images
To combine the images into a single image we are going to use Pix4D software.
Please note that Pro account is needed to export the finished project from Pix4D. You can either buy the Pro license, rent it or use a Pro trial version for now.
Sign up and download Pix4D from www.pix4d.com
After downloading, install it on your computer and open it.
1) The following screen will appear
2) Click New Project, enter a name for your project (in our case it is going to be called Spilve) and click Next.
3) In the next screen add the images you have taken previously and click Next
4) In the next screen you are going to have to add the GPS coordinates and the altitude at which the image was taken to each of the images. In the example below the coordinates and altitude have been added to the first waypoint out of five. You need to add them to at least 3 waypoints, but preferably add to all.
5) Click Next and click Finish. That should take you to following screen:
6) Now go to Process --> Options --> DSM and Orthomosaic tab
In this tab make sure that Google Maps Tiles and KML and Mapbox Tiles are checked. After that click Ok and the Options window will close.
7) In the bottom of the screen click the Start button to start processing the images. This might take some time depending on number of images. After it is done a Quality Report window will open. You can take a look at the results and close it. The main screen in Pix4D should now look like this
Uploading the project to Mapbox
Right now our project file is stored locally in our computer. We are going to upload it using a service called Mapbox to access it in UgCS.
1) Go to www.mapbox.com and sign up
2) After signing up, open up Pix4D and go to Process-->Mapbox-->Upload
3) A browser window will appear asking you to log into Mapbox. Enter your credentials and the upload will start.
Please note that Mapbox free account is limited to 100MB.
4) After the upload has finished, go to www.mapbox.com
5) From the menu, click Projects6) Click New Project
Under Style choose Transparent
Click Data
Click Menu
Click Layers7) Click Add layers8) On the Add layers window that opens, click the layer that is generated by Pix4Dmapper and it is already uploaded under the layers.
9) Close the Add layers window.
10) The layer has been added. Click on it to see the map.11) Click Save to save your project
12) Click Project
13) Find and copy the Share link. Copy it to a notepad or similar text editor, where you can edit the link.
The link should look something like this:
https://a.tiles.mapbox.com/v4/ugcs.la43c7jo/page.html?access_token=pk.eyJ1IjoidWdjcyIsImEiOiJSVVlod2k4In0.hQpshSVvhrlQ87gYyJzhOw#17/56.97785/24.07378
The link needs to be adjusted to work with UgCS. Replace https with http and /page.html with .json
The finished link should look something like this:
http://a.tiles.mapbox.com/v4/ugcs.la43c7jo.json?access_token=pk.eyJ1IjoidWdjcyIsImEiOiJSVVlod2k4In0.hQpshSVvhrlQ87gYyJzhOw#17/56.97785/24.07378
Adding the map to UgCS
Now lets add a map overlay from the project we created in Mapbox to UgCS.
1) Open UgCS Client
2) Go to Menu-->Configuration-->Map providers-->Add
3) Enter a Name for the map provider, it can be any name you like, we are going to call it Mapbox layer
4) In Type select MB tileJSON
5) In URL enter the link you created in the previous section. In our case it is:
http://a.tiles.mapbox.com/v4/ugcs.la43c7jo.json?access_token=pk.eyJ1IjoidWdjcyIsImEiOiJSVVlod2k4In0.hQpshSVvhrlQ87gYyJzhOw#17/56.97785/24.07378
6) Click Save
7) Exit the menu and go to UgCS map
8) In the right upper side of the screen click the button to see the dropdown menu for overlay map tile providers and select the one you just created9) The end result should look like this:
Congratulations, you have now successfully added a Mapbox overlay created by you to UgCS!