Techoship

Campus safety · 2025

Drone Escort for Student Safety

A student leaving the library at midnight presses one button, and a drone flies out to meet them.

  • Flutter
  • Kotlin
  • Android
  • FastAPI
  • Mobile App Development
Drone Escort for Student Safety — Campus safety

A student leaving the library at midnight presses one button, and a drone flies out to meet them. The request routes to a pilot covering that part of campus, who sees the route and the current wind and visibility, then taps dispatch. The aircraft takes off, holds five seconds to stabilise, flies a waypoint mission, and hovers on arrival rather than returning home — so it stays overhead for the rest of the walk. Four codebases: two mobile apps, a native pilot app, and a 31,000-line operations console.

Drone Escort for Student Safety — The problem

The problem

Walking across campus alone at night is the problem this was built for.

Most safety apps are alarms — you press a button once something has already happened. This works on the twenty minutes before that, when someone knowing where you are is what actually changes the outcome.

Students request an escort with a reason: a buddy walk, harassment or bully deterrence, help through a crowd, being lost or disoriented, or a request on behalf of family. The reason is what routes the request.

Drone Escort for Student Safety — Autonomous dispatch — the hard part

Autonomous dispatch — the hard part

The pilot does not fly the aircraft to the student. They approve the request, and a 350-line dispatch manager runs a six-step sequence against the Autel SDK on an EVO II.

Take off through the flight controller and wait for confirmation. Hold five seconds so the aircraft settles at hover before a mission is pushed to it. Build a waypoint mission from the student's live coordinates. Convert it to a route plan. Write the mission file and start it. Then poll GPS every two seconds, recomputing distance until the aircraft is inside fifteen metres.

Cruise altitude is thirty metres and every one of those numbers is a named constant rather than a value buried in a method.

The detail that makes it an escort rather than a delivery: the mission's finish action is set to HOVER. When the route completes the aircraft holds position instead of returning home, because the whole point is that it stays with the student.

Every step has a failure path. If route planning returns nothing the pilot is told, rather than a drone doing something unexpected. The pilot can take manual control at any moment through an on-screen joystick, and the physical controller is detected over USB.

Drone Escort for Student Safety — Four codebases, because it is four different jobs

Four codebases, because it is four different jobs

A student walking with a phone, a drone pilot flying an aircraft in the field, and an operator approving accounts and drawing coverage zones from a desk need completely different software.

The student app is Flutter for iOS and Android — 128 files, 26,163 lines, 25 screens. It ships in four complete languages, English, Spanish, Hindi and French, with the same 327 strings in each; a campus safety product is used disproportionately by international students.

The pilot app is native Android in Kotlin, deliberately. It sits closest to a USB flight controller, an aircraft SDK and live telemetry — exactly the surfaces where a cross-platform wrapper is thinnest and breaks first.

The operations console is Flutter Web and the largest codebase of the four at 31,226 lines: a public landing page, and behind the login a console running geo-fencing and coverage zones, destinations, users and sub-admins, pending account approvals, fee management and credit pricing, push notifications and academic assets.

Behind all three, a FastAPI backend — and two databases on purpose. Realtime Database carries the high-frequency position streams that update several times a second during a walk; Firestore holds the structured records that have to survive and be queried later. Using one for both would have been simpler and worse.

Drone Escort for Student Safety — What people actually use

What people actually use

Not every walk needs an aircraft. Live location goes to trusted contacts or straight out as a WhatsApp link, several people can follow one walk, and sharing stops by itself on arrival.

At the end the app asks a question in its own words — "Are you Safe!" — so the people watching find out you arrived rather than being left with a map that simply stopped moving.

In-session chat runs between student and pilot, which matters when "there's a crowd by the Union" needs to change where the drone flies. There's a safety reading library, biometric app lock separate from the phone's, and push notifications throughout.

Drone Escort for Student Safety — Paying for it, and the result

Paying for it, and the result

Escorts are bought as credits at a price the operator sets from the console — "the ability to determine the pricing for service fees" — so each university sets its own economics without a code change. Monthly and yearly subscriptions sit alongside.

Credits move three ways: bought by card, sent to another student, or requested from someone. That last pair matters more than it sounds, because the person who most needs an escort at midnight is often the one who can least afford it. A parent can top up a balance from another country.

Shipped across iOS, Android, a native Android pilot app and a web console, with a Python backend behind them. Consumer-facing autonomous drone dispatch is unusual work, and the six-step sequence is in the code rather than on a roadmap.

Client work, so the source is private — happy to walk through the dispatch sequence or the geofencing design on a call.