Skip to content

Work with DroneKit Android

Max Zheng Qu edited this page Oct 3, 2015 · 14 revisions

Why we need this

Tower is essentially a front-end GUI app. It generates buttons and figures and takes in the command from user touches. Then it sends these commands to DroneKit-Android and it is the DroneKit that convert these commands into numbers and messages that Drone can understand and communicate with the Drone through interfaces wherein.

For example, Tower generates the button "Follow-Me" and the user touches it. Tower gets the command and send it to DroneKit. DroneKit then generates a message and send it to the drone to initiate the "Follow-Me" mode. Then if the user touches "Lead" mode. Tower sends this command to DroneKit. DroneKit then compute the next waypoint ahead of the user and send the calculated waypoint to the Drone, which then flies to the very waypoint to realize the lead action.

So, if the developer wants to develop a new flight mode, say "Panorama", both Tower and DroneKit needs to be updated. Tower needs to be modified to include a button called "Panorama" and the associated activity file. DroneKit needs to be modified to include a script to calculate next waypoint according to the current waypoint to actually carry out the flight action.

In this way, function calls are implicitly buried all over the code. It would be better if we know how to develop Tower and Dronekit using Android Studio at the same time and constantly keep them refer to each other. This document is a tutorial on how to do it.

Build DroneKit-Android