Offline maps with DroidPlanner / 3DR Tower

A Nexus 7 tablet is an excellent choice as the Ground Control Station (GCS) with DroidPlanner2 or 3DR Tower for your IRIS or other quadcopter. But in order to keep costs in a reasonable manner, using the Wifi-only model makes a lot of sense. Yet, doing so one wants to still use maps in DroidPlanner2 while being out in the field.

DroidPlanner2 and 3DR Tower already offers map caching via the Google Maps API out of the box. If a user zooms the map somewhere while connected to Wifi, disconnects from Wifi, closes the app, reloads the app, it will still show you the map area from before. But DroidPlanner2 doesn’t have control on how much of the area is cached. You might end up with the desired map area not being cached, showing you either a blurry map or a blank map.

To overcome this shortcoming you will need the offline map feature of DroidPlanner2 and 3DR Tower, which stores map tiles in a special folder for DroidPlanner2 and 3DR Tower to be used. This allows you to be sure that the map area that you need is always available while the Android device has no network connectivity.

In this post I’ll show you, how you can use the offline map feature in DroidPlanner2 and 3DR Tower to accomplish exactly this: Be out in the field without network connectivity and have your maps available.

Note: I recommend to place your Nexus 7 or any other tablet into flight mode – thus disabling any radio module in it – during flight operations. Especially as I have mounted the GCS very close to the R/C transmitter, this reduces the risk of radio interference on the 2.4 GHz band between the WiFi module of the Nexus 7 and the R/C transmitter.

Required software and version

  • DroidPlanner2: The current version of DroidPlanner2, available on Google Play, does support usage of Offline Maps.

    or Tower (DroidPlanner 3), which requires 3DR Services as well.

  • Mission Planner: The latest version of Mission Planner is available from the APM Download section.
  • A file manager for Android, such as “File Manager (Explorer)”, available on Google Play.

How-to use

First we need to assemble the offline maps in Mission Planner on the PC. For this open Mission Planner and change to the Flight Plan tab. Zoom in or out to the area for which you want to create an offline map.

Hold down the “Alt” button on your keyboard and draw a box around the area that you desire for your offline maps (See Figure 1).

Figure 1: Draw the map area  on the flight plan screen

Figure 1: Draw the map area on the flight plan screen

Next zoom in to the level at which you want the offline maps to be captured. Then perform a right-click in the map area and select Map Tool -> Prefetch (See Figure 2) to start the map ripping.

Figure 2: Chose Map Tool -> Prefetch

Figure 2: Chose Map Tool -> Prefetch

Confirm the zoom level at which you want to start the map ripping with a click on the “Yes” button.

Figure 3: Confirm the zoom level

Figure 3: Confirm the zoom level

Wait for the map titles to be fetched (ripped). Mission Planner will try to ripp the maps beyond the zoom level that you previously defined. Once the zoom level displayed is higher than your desired zoom level, press the “ESC” button twice quickly (See Figure 4). This will end the map fetching and save you time.

Figure 4: Mission Planner fetching map tiles

Figure 4: Mission Planner fetching map tiles

Navigate to the map file folder %ProgramFiles(x86)%Mission PlannergmapcacheTileDBv3enGoogleSatelliteMap on a 64-bit system or %ProgramFiles%Mission PlannergmapcacheTileDBv3enGoogleSatelliteMap on a 32-bit system (See Figure 5). If you were using a different provider of maps in Mission Planner, other than the Google Satellite Maps, navigate to the corresponding folder. In this folder you’ll notice subfolders, which correspond to the zoom levels. Delete the folders that have a higher number than the zoom level that you desire. Compact the remaining folders and all their content into a single Zip file, called e.g. “maps.zip”. Copy this file to your Android tablet, e.g. using Google Drive.

Figure 5: Map Tiles downloaded  in the map cache folder

Figure 5: Map Tiles downloaded in the map cache folder

 

On your Android tablet, use a File Manager and navigate to the folder /storage/emulated/0/DroidPlanner/Maps. Unzip the previously created Zip file into this folder. This should create the numbered subfolders and their content (See Figure 6).

With Tower (Droidplanner 3) this folder is called /storage/emulated/0/Tower/Maps instead.

Create an empty file named “.nomedia” inside the /storage/emulated/0/DroidPlanner/Maps or /storage/emulated/0/Tower/Maps _folder. _This will prevent Android to treat the map images and media and will not show them in your Images application.

Figure 6: DroidPlanner2 offline map folder in Android File Manager

Figure 6: DroidPlanner2 offline map folder in Android File Manager

Next open DroidPlanner2 or 3DR Tower and navigate to the User Preferences screen under Settings. Tap on the Map Provider Preferences (See Figure 7).

Figure 7: Maps section in the User Preferences screen

Figure 7: Maps section in the User Preferences screen

Set the tick box next to “Use offline maps” (See Figure 8).

Figure 8: Tickbox for "Use Offline Maps"

Figure 8: Tickbox for “Use Offline Maps”

Return to the Flight Data screen. You will see offline maps available, even when disabling the WiFi connectivity.

Figure 9: DroidPlanner2 with offline maps displayed

Figure 9: DroidPlanner2 with offline maps displayed

It would be great if DroidPlanner2 or 3DR Tower itself had the ability to define a map area and download the map tiles, while connected to a WiFi network. This would safe users from the hassle of having to use Mission Planner.