Back to Projects

Pocket-Flight

Fly a drone by tilting your phone.

PythonROSWebotsGazeboWebSocketPID Control
Sep 2024 – Jan 2025
Pocket-Flight

Overview

What if you could control a drone without a remote controller — just by moving your phone? Pocket-Flight transforms raw phone sensor data into intuitive flight commands. Tilt your phone forward, the drone flies forward.

The Problem

Traditional drone control requires specialized remote controllers with steep learning curves. Smartphones already have IMU sensors (accelerometer + gyroscope) — can we use them for intuitive, accessible drone control?

Approach

Phone IMU data is read at 100 Hz via WebSocket. A complementary filter (α=0.96) fuses accelerometer and gyroscope readings. Filtered orientation is converted to velocity vectors that control drone attitude. A PID controller maintains stable flight with safety features including arming sequence, kill switch, and geofencing. Tested in Webots and Gazebo simulation environments.

Challenges

Noisy sensor data made raw readings unusable — solved with complementary filtering. PID tuning for stable hovering required extensive iteration. Real-time communication between phone and ROS node needed low-latency WebSocket implementation.

Results

Simulation performance: 8% overshoot, 1.2s settling time. Max tilt achieved: 28° (commanded 30°). Preparing for IEEE journal submission.