Public Sector Response Drones
In this project, I created drones purpose built for first responders by developing software that allows a drone to be deployed to an address over a 5g connection. This enables it to be controlled from any computer, anywhere. The platform was designed to be quickly dispatched by a first responder after receiving a 911 call, carrying either an EpiPen or an AED. This package has four main features: live telemetry, autonomous navigation, 5G LTE connectivity, and live video.

Display Essential Telemetry
The goal of the first element of our package was to display essential telemetry. This element of our design streamed data from the drone directly to the ground control station through MAVlink messages. We interfaced with the MAVlink protocol using the pymavlink python library. Similarly, we used pymavlink to arm and disarm the drone through the corresponding MAVlink messages.
Autonomous Navigation
Autonomous Navigation involved two parts: converting an address into latitude and longitude and then uploading it as a mission waypoint to the drone.
Address -> Coordinates
To accomplish this task, we implemented the google Maps API to allow our users to search for an address and then simply click on a point on the map to extract the latitude and longitude coordinates. This was originally done on a Node JS webpage, where the coordinate would be pushed to a mongoDB database where a python script could access it and send it to the drone. We eliminated this complex approach by implementing a flask server that could handle both the front and backend programming in python.
.png)
Uploading Waypoints
In order to upload a mission to the drone, we had to implement the flow diagram shown above, where information would only be sent upon receiving acknowledgement messages. It was challenging to implement this in python without the extensive asynchronous control present in java. We used MAVlink specific commands in order to accomplish this structure, although we had some infrequent errors with this structure that we honestly cannot explain. We are unsure whether it is a hardware issue or a bug within the pymavlink library.
Ask me for anything; I'll always deliver more
5g LTE Connectivity
In order to connect the Pixhawk with a 5G network, we had to include an onboard companion computer (a Raspberry Pi) that was Wi-Fi enabled. By using a tool called MAVproxy on the Raspberry Pi, we were able to route MAVlink messages through the Raspberry Pi to the Pixhawk via the serial port. This meant that we could send MAVlink messages to the Raspberry Pi over a cellular connection and that they would then be routed to the Pixhawk flight controller. As shown in the diagrams below, it was necessary to connect the Raspberry Pi and the ground control station to the same Virtual Private Network so that they could have static LAN ip addresses and therefore be in constant communication with one another. We enabled this through a third party service called Zero Tier.
Live video
While live video through a TCP connection worked, the framerate was exceedingly low due to the overhead of the TCP protocol. When we tried to use UDP because of its lower overhead, live video streaming would work on a home network, but not over a mobile network. We theorized that it was because of firewall protections on our mobile carrier. We ended up using a TCP connection through a Dataplicity wormhole in order to successfully stream useful live video data from the raspberry pi camera back to the ground control station. We had to mount the camera off of the center of the drone in order to avoid obstruction by the 3d printed EpiPen holder (shown below).

Learnings
I learned a lot of software technologies with this project, gaining valuable experience with the MAVlink protocol and the PX4 Autopilot. This also exposed me to QGroundControl and solidified my previous experience with the Pixhawk flight controller, which I've been using in projects ever since. It was also a great learning experience in how to lead my team by encouraging accountability and responsibility. I've been able to use these skills in every team I've led since this project.
Extra Resources
Looking for more? The video below is a presentation of our project building innovative drones for first responders.

