DPilot

Research-Grade Flight Telemetry & Visual Odometry System
Research & Development

Advanced flight telemetry system with 50Hz unified state communication, real-time web interface, and visual odometry capabilities using custom ESP32 PCB integration and Raspberry Pi AI Camera processing for autonomous flight research.

System Requirements & Development Status

πŸ›‘οΈ Regulatory Compliance

  • Drone Operations: Designed for compliance with local UAV/drone regulations (e.g., FAA Part 107 in the US, EASA in the EU). Operators are responsible for adhering to all applicable laws regarding flight altitude, airspace, and registration.
  • RF Transmission: LoRa modules operate in the 915MHz ISM band (US) or 868MHz (EU). Ensure operation within legal frequency and power limits as specified by the FCC (US) or local authorities. Maximum transmission power is set to comply with regional requirements.
  • Encryption: AES-128 encryption is used for secure communication, following best practices for data privacy and security.
  • Camera Use: Visual recording and AI camera features must comply with privacy and data protection laws. Obtain necessary permissions for video capture in
  • PCB & Electronics: Custom PCB design follows RoHS and CE guidelines for electronic safety and environmental compliance.

Note: Always check and follow your local regulations for drone operation, RF transmission, and data collection. The DPilot system is intended for research and educational use.

🎯 Mission Requirements

  • Range: >15 km mission coverage
  • Flight Time: >30 minutes endurance
  • Communication: >5 km line of sight
  • Update Rate: 50Hz unified state feedback
  • Flying speed: >120 km/h capability
  • Visual navigation and SLAM

πŸ€– Development Status

  • βœ… 50Hz unified state estimation
  • βœ… AES-128 encrypted LoRa communication
  • βœ… Frame-synchronized video/data logging
  • βœ… Web-based ground control interface
  • βœ… Custom PCB design (JLCPCB ready)
  • πŸ”„ Visual odometry implementation
  • πŸ“ AI camera integration (Planned)
  • πŸ“ Full autonomous flight (Future)

βš™οΈ System Architecture

  • Total cost: <$300 (including aircraft)
  • Modular & expandable design
  • Cross-platform compatibility
  • Always-on WiFi hotspot access
  • PCB fabrication

System Architecture & Interface

System Architecture
Complete System Architecture

Ground control, telemetry and drone system overview

Web Interface
Web Interface Dashboard

Live telemetry dashboard with smartphone-accessible controls and artificial horizon

Interactive Map
Interactive Map Interface

Web-based mission planning with real-time waypoint tracking and visualization

Aircraft Integration
Aircraft Integration

VolantexRC Ranger with 3D printed components and visual odometry camera

Phoenix Aircraft
Volantex Phoenix Platform

Volantex Phoenix 2000mm with dpilot system integration

System Features

πŸŽ₯ Enhanced Video Logging

  • Hardware H.264 encoding with frame-perfect sync
  • Custom SyncLoggerOutput (<1ms timestamp accuracy)
  • 60fps high-quality recording with telemetry
  • CSV logging synchronized to video epochs
  • Sony IMX500 AI Camera support (12MP)
  • Visual odometry processing capability

πŸ“‘ FHSS Communication System

  • Tenths of channel adaptive frequency hopping (902.5-927 MHz)
  • Base-commanded scheduling with penalty tracking
  • Asymmetric scanning
  • Configurable timeout with automatic reacquisition
  • AES-128 encryption on all LoRa transmissions
  • Interference mitigation and penalty control

πŸ€– Complete Autonomous Stack

  • 4-layer architecture: Route β†’ Plan β†’ Control β†’ Actuate
  • Motion Control control with vehicle-specific algorithms
  • Smart waypoint advancement (pass-through detection)
  • Mission management with circular looping
  • Real-time position and velocity tracking

✈️ Mixed Mode SAFE Stabilization

  • Computer guidance with P/I/D stabilization (UAV)
  • UAV/UGV differentiation via elevator validity
  • Shared control with pilot inputs
  • Adaptive authority blending for smooth transitions
  • Level flight assist and rate damping
  • Conditional stabilization preserves UGV control

πŸ›°οΈ Advanced Sensor Fusion

  • 6-DOF pose estimation with Extended Kalman Filter
  • IMU preintegration for GPS-denied navigation
  • Complementary filter (0.01Β° roll/pitch)
  • QMC5883L magnetometer (0.1Β° azimuth)
  • DGPS provisions for a (2-5m β†’ 0.5-1.5m accuracy)
  • 50Hz time-controlled sampling with anti-aliasing

🎯 Ground Control

  • Interactive map-based mission planning
  • Unified state telemetry stream
  • Vehicle configuration (UAV/UGV/USV)
  • Live mission control with distance tracking
  • H.264 video recording with flight instruments
  • Multi-platform Python (Windows/macOS/Linux)

Technical Specifications

50Hz
Unified State Rate
10Hz
GPS Update Rate
5km
LoRa Range
AES-128
Encryption
60 bytes
State Packet
<100ms
Command Latency
60 FPS
AI Camera Rate
12MP
Camera Resolution

🧠 Kalman Filter Attitude Estimation

DPilot employs a sophisticated 5-state Kalman filter for high-precision attitude estimation, fusing accelerometer and gyroscope data to deliver robust roll and pitch measurements even during dynamic flight conditions.

Filter Architecture

  • State Vector: [roll, pitch, roll_rate, pitch_rate, yaw_rate]
  • Update Rate: 50Hz with non-uniform time handling
  • Gyro Integration: Dynamic time-step adjustment
  • Bias Correction: Calibrated yaw rate bias removal
  • Noise Models: Tuned process and measurement covariances

Innovation Analysis

  • Real-time Monitoring: Innovation factor visualization
  • Statistical Analysis: Means and standard deviations
  • Performance Target: <2Β° steady-state accuracy
  • Convergence: Rapid filter stabilization (<1s)
  • Robustness Target: Maintains accuracy during dynamic flying
# Kalman Filter State Prediction Step def predict(self, gx, gy, gz, timestamp): # Calculate dt since last update dt = (timestamp - self.last_update).total_seconds() # Current state: [roll, pitch, roll_rate, pitch_rate, yaw_rate] roll, pitch, roll_rate, pitch_rate, yaw_rate = self.state # Update rates directly from gyroscope (with bias correction on yaw) roll_rate_new = gx pitch_rate_new = gy yaw_rate_new = gz # Bias already corrected in data preparation # Integrate gyroscope rates to update angles roll_new = roll + math.degrees(gx) * dt pitch_new = pitch + math.degrees(gy) * dt # Update state vector self.state = np.array([roll_new, pitch_new, roll_rate_new, pitch_rate_new, yaw_rate_new]) # Update state covariance: P = FΒ·PΒ·F^T + Q F = np.eye(5) # State transition matrix F[0, 2] = dt # roll affected by roll_rate F[1, 3] = dt # pitch affected by pitch_rate self.P = F @ self.P @ F.T + self.Q return self.state # Kalman Filter Measurement Update Step def update_with_accel(self, ax, ay, az): # Calculate attitude from accelerometer roll_acc = math.degrees(math.atan2(ay, math.sqrt(ax*ax + az*az))) pitch_acc = math.degrees(math.atan2(-ax, math.sqrt(ay*ay + az*az))) # Measurement vector z = np.array([roll_acc, pitch_acc]) # Measurement model (maps states to measurements) H = np.zeros((2, 5)) H[0, 0] = 1.0 # roll_acc corresponds to roll H[1, 1] = 1.0 # pitch_acc corresponds to pitch # Innovation: difference between measurement and prediction y = z - H @ self.state # Kalman gain calculation S = H @ self.P @ H.T + self.R_accel K = self.P @ H.T @ np.linalg.inv(S) # Update state and covariance self.state = self.state + K @ y self.P = (np.eye(5) - K @ H) @ self.P return y # Return innovation values for analysis

The filter employs a two-step prediction-correction approach, first integrating gyroscope data for rapid attitude updates, then using accelerometer measurements to correct drift. The innovation factor (difference between predicted and measured values) provides real-time insight into filter performance and convergence.

This implementation handles gyroscope bias, non-uniform sampling times, and maintains high accuracy during aggressive maneuvers by carefully tuning the process and measurement noise covariance matrices.

Complete Hardware Integration

πŸ›©οΈ Aircraft Platform

Main Aircraft
  • Model: VolantexRC Ranger 1600/2000
  • Wingspan: 1600mm/2000mm EPO foam
  • Configuration: Pusher, PNP ready
  • Weight: 1500-1700g with telemetry (depending on Battery)
  • πŸ”— Source Link
Propulsion System
  • Motor: D3536 Brushless 1450KV
  • Propeller: 8x6 3-blade pusher
  • ESC: 60A with 4A UBEC
  • Mount: Custom 3D printed
  • πŸ”— Motor Link
Wing Configuration
  • Standard: Ranger 1600 wings
  • Slow Flight: Ranger 2000 wings
  • Flaps: Servo-controlled (2000)
  • Sensors: Wing loading monitoring

πŸ–₯️ Computing & Vision System

Mission Computer
  • CPU: Raspberry Pi Zero 2 W
  • RAM: 512MB LPDDR2
  • Storage: 32GB+ microSD
  • Housing: Custom 3D printed bucket
  • πŸ”— Source Link
Camera System
  • Standard: OV5647 5MP Sensor
  • Resolution: 1080p @ 30fps
  • Upgrade: AI Camera with IMX500 (optional)
  • Mounting: Downward + 15Β° forward
  • πŸ”— Source Link
Custom PCB Module
  • Design: 2-layer JLCPCB
  • Controller: ESP32-S3 + SX1262
  • Sensors: MPU6050 IMU integrated
  • Storage: SD card module

πŸ“‘ Communication & Display

Heltec WiFi LoRa 32 V3 (Drone & Ground)
  • MCU: ESP32-S3 dual-core
  • LoRa: SX1262 @ 915MHz
  • Display: 0.96" OLED 128x64
  • Power: USB-C powered
  • Range: 2-5km line of sight
  • Encryption: AES-128 security
  • πŸ”— Official Documentation

⚑ Power & Storage System

Power Regulation
  • Converter: LM2596 DC-DC Buck
  • Output: 5V regulated @ 3A
  • Input: ESC UBEC 5V @ 4A
  • Efficiency: >85% typical
  • πŸ”— Source Link
Data Storage
  • Module: Micro SD card breakout
  • Interface: SPI with pins
  • Capacity: 32GB+ Class 10
  • Integration: On custom PCB
  • πŸ”— Source Link
Power Budget
  • Pi Zero 2W: 4W peak with AI camera
  • Custom PCB: 2W with LoRa TX
  • Total Aircraft: ~7.5W continuous
  • Flight Time: >2 hours endurance

System Architecture & Data Flow

Complete System Integration

Aircraft Sensors β†’ Custom PCB ESP32 β†’ LoRa β†’ Ground ESP32 β†’ USB β†’ Pi Zero 2W ↓ ↓ ↓ β”œβ”€ IMU (50Hz) ──────→ Filtered data ──────────────────────→ Raw data β”œβ”€ GPS (10Hz) ──────→ Position/velocity ─────────────────→ Navigation β”œβ”€ ADC (50Hz) ──────→ Aircraft systems ──────────────────→ Health monitoring β”œβ”€ AI Camera ───────→ Visual features ──────────────────→ Odometry processing └─ Status ──────────→ Flight status ────────────────────→ Safety monitoring Pi Zero 2W Processing: β”œβ”€ H.264 video recording with AI camera (60fps) β”œβ”€ Data logging (CSV) at 50Hz unified state β”œβ”€ Web interface (port 5000) with live telemetry β”œβ”€ WiFi hotspot (field access: dpilot_horizon) β”œβ”€ Visual odometry processing and SLAM └─ Mission command generation and planning

Custom PCB Integration (JLCPCB)

PCB Specifications

  • Manufacturer: JLCPCB Professional
  • Layers: 2-layer cost-effective
  • Size: ~50x40mm aircraft fit
  • Finish: HASL/ENIG RoHS
  • Components: ESP32-S3, SX1262, MPU6050

Integration Benefits

  • Professional manufacturing quality
  • Reduced wiring complexity
  • Optimized RF performance
  • Integrated sensor fusion
  • 3D printed environmental protection

Aircraft Mounting Strategy

VolantexRC Ranger 1600/2000 - Optimized Layout: Nose Section: β”œβ”€ Pi (AI or conventional) Camera; inclined at from 20Β° downwards (looking forward) to visual odometry β”‚ β”œβ”€ Visual odometry capability with Sony IMX500 β”‚ β”œβ”€ 12MP high-resolution imaging β”‚ └─ AI processing for object detection/tracking β”œβ”€ GPS Antenna (clear sky view) └─ Custom 3D printed camera mount Center Fuselage: β”œβ”€ Raspberry Pi Zero 2W (custom 3D printed bucket) β”œβ”€ Custom PCB ESP32 Module (custom 3D printed bucket) β”œβ”€ Power distribution board β”œβ”€ LM2596 Buck converter (single unit) └─ Battery bay (LiPo pack) Pusher Motor Section: β”œβ”€ D3536 Motor (custom 3D printed mount) β”œβ”€ ESC mounting (optimized airflow) β”œβ”€ Vibration isolation (3D printed dampeners) └─ Propeller clearance optimization

Aircraft Platform Specifications

Parameter Ranger 1600 Ranger 2000 Notes
Wingspan 1600mm 2000mm EPO foam construction
Length 1075mm 1075mm Pusher configuration
Wing Area 26.5dmΒ² 32.8dmΒ² High aspect ratio
Flying Weight 1200-1500g 1200-1500g With telemetry system
Speed Range Normal operations Slow flight capable Visual odometry optimized
Flap Control None Servo-controlled Enhanced landing approach

System Testing & Performance

Verified Performance Metrics

Communication Performance

  • Unified State Rate: 50Hz Β±1Hz sustained
  • LoRa Success Rate: >95% at operational range
  • Command Latency: <100ms typical
  • Range Testing: >2km line of sight verified
  • Encryption Overhead: <5ms per packet

Data Quality Metrics

  • GPS Update Rate: 10Hz after configuration
  • IMU Data Quality: <3% duplicate rate
  • Video Synchronization: Frame-perfect CSV alignment
  • Power Efficiency: >2 hour flight endurance
  • Temperature Stability: MPU6050 calibrated

Testing Progression

Ground Testing
  1. Power system verification
  2. LoRa communication range test
  3. Sensor calibration and alignment
  4. 50Hz unified state verification
  5. AI camera and visual processing
  6. Web interface functionality
  7. Command response testing
Flight Testing
  1. Taxi tests with sensor validation
  2. Range tests at operational distance
  3. Short flights with basic telemetry
  4. Extended flights for endurance
  5. Visual odometry validation
  6. Mission command following
  7. Autonomous flight capabilities
Data Analysis
  1. Telemetry data quality analysis
  2. Video-CSV synchronization check
  3. Visual odometry accuracy assessment
  4. Power consumption optimization
  5. Communication reliability metrics
  6. System performance profiling
  7. Research data validation

Ground Control Station

Desktop GCS
Desktop Ground Control

Python application with FPV video overlay

Mission Planning
Mission Planning Interface

Interactive map-based waypoint planning with OpenStreetMap integration

TFT Display
TFT Base Station Display

2" TFT with real-time G-G diagrams

Manufacturing & Assembly Process

Custom PCB
Custom PCB Design

Professional 2-layer PCB with integrated ESP32, LoRa, IMU, and SD card

3D Printing
Motor mount

Custom component printing in PETG

3D Printing
Ground Control TFTs Displays

Custom component printing in PETG

Research Applications & Future Development

πŸ”¬ Current Research Focus

  • Visual odometry algorithm development
  • AI-powered feature detection and matching
  • Real-time SLAM implementation
  • Multi-sensor fusion techniques
  • Autonomous navigation strategies

🎯 Future Capabilities

  • Full autonomous flight missions
  • Object detection and avoidance
  • Landing site detection and selection
  • Swarm coordination protocols
  • Advanced AI model deployment

πŸ“Š Data Applications

  • Flight dynamics research
  • Aerodynamic performance analysis
  • Wing loading studies
  • Visual navigation validation
  • Autonomous systems development

Development Roadmap

Phase 1: βœ… COMPLETED β”œβ”€ Unified state communication architecture β”œβ”€ 50Hz telemetry with perfect synchronization β”œβ”€ Web-based ground control interface β”œβ”€ Custom PCB design and integration └─ Basic visual processing pipeline Phase 2: πŸ”„ IN PROGRESS β”œβ”€ Visual odometry implementation β”œβ”€ AI camera integration and testing β”œβ”€ Feature detection optimization β”œβ”€ SLAM algorithm development └─ Position estimation validation Phase 3: πŸ“ PLANNED β”œβ”€ Full autonomous flight capability β”œβ”€ Advanced AI model deployment β”œβ”€ Object detection and avoidance β”œβ”€ Multi-aircraft coordination └─ Research publication and validation

Hardware Interface Documentation

πŸ—οΈ System Architecture Overview

Drone ESP32 (Heltec WiFi LoRa 32 V3)
β”œβ”€β”€ IΒ²C Bus 1: MPU6050 IMU (SDA=47, SCL=48)
Drone ESP32 (Heltec WiFi LoRa 32 V3)
β”œβ”€β”€ IΒ²C Bus 1: MPU6050 IMU (SDA=47, SCL=48)
β”œβ”€β”€ IΒ²C Bus 2: OLED Display (SDA_OLED, SCL_OLED)
β”œβ”€β”€ SPI Bus 1: LoRa Module (Built-in)
β”œβ”€β”€ SPI Bus 2: SD Card (CS=26, MOSI=42, SCLK=46, MISO=45)
β”œβ”€β”€ Serial 1: USB Serial (115200 baud)
β”œβ”€β”€ Serial 2: GPS Module (RX=19, TX=20, 115200 baud)
└── ADC: Analog inputs (A0-A6)

Base Station ESP32 (Heltec WiFi LoRa 32 V3)
β”œβ”€β”€ IΒ²C Bus 1: OLED Display (SDA_OLED, SCL_OLED)
β”œβ”€β”€ SPI Bus 1: LoRa Module (Built-in)
β”œβ”€β”€ SPI Bus 2: TFT Display (CS=26, DC=45, SCLK=46, MOSI=42)
└── Serial 1: USB Serial (115200 baud)

🎯 Automatic Role Detection

System automatically determines role based on MPU6050 presence:
MPU6050 Detected β†’ Drone Mode (sensor collection, SD logging)
No MPU6050 β†’ Base Station Mode (command relay, TFT display)

πŸ“‘ Complete Pin Assignment Tables

🚁 Drone Configuration DRONE MODE

Component Interface ESP32 Pins Configuration
MPU6050 IMU IΒ²C Bus 1 (Wire1) SDA=47, SCL=48 Β±8g accel, Β±500Β°/s gyro, 10Hz filter
GPS Module Serial2 RX=19, TX=20 38400 baud, 8N1
SD Card SPI Bus 2 (spi1) CS=26, MOSI=42, SCLK=46, MISO=45 Time-controlled logging, auto file management
Analog Sensors ADC A0(12), A1(13), A2(14), A3(15), A4(16), A5(17), A6(18) 7-channel 8-bit ADC, 0-255 range
Logging Button Digital Input GPIO 41 (Pull-up) Single-button start/stop logging
OLED Display IΒ²C Bus 2 SDA_OLED, SCL_OLED 128x64 status display
LoRa Module SPI Bus 1 (Built-in) Integrated 915MHz, 21dBm, SF7, BW=500kHz, AES-128
USB Serial Serial (Built-in) USB Port 115200 baud, unified state packets (50Hz)

πŸ“‘ Base Station Configuration BASE STATION

Component Interface ESP32 Pins Configuration
TFT Display SPI Bus 2 (spiTFT) CS=26, DC=45, SCLK=46, MOSI=42 240x320 ST7789, G-G diagram, flight instruments
OLED Display IΒ²C Bus 1 SDA_OLED, SCL_OLED 128x64 system status
LoRa Module SPI Bus 1 (Built-in) Integrated 915MHz, 21dBm, SF7, BW=500kHz, AES-128
USB Serial Serial (Built-in) USB Port 115200 baud, binary command interface

πŸ”§ Hardware Initialization Code

🚁 Drone Mode Initialization

// MPU6050 IMU Initialization (IΒ²C Bus 1) static const uint8_t SCL_IMU = 48; static const uint8_t SDA_IMU = 47; Wire1.begin(SDA_IMU, SCL_IMU); while (!mpu.begin(MPU6050_I2CADDR_DEFAULT, &Wire1, 0)) { delay(100); Serial.println("Failed to find MPU6050 chip"); } // Configure MPU6050 settings mpu.setAccelerometerRange(MPU6050_RANGE_8_G); mpu.setGyroRange(MPU6050_RANGE_500_DEG); mpu.setFilterBandwidth(MPU6050_BAND_10_HZ); // GPS Module Initialization (Serial2) #define Serial2RxPin 19 #define Serial2TxPin 20 Serial2.begin(38400, SERIAL_8N1, Serial2RxPin, Serial2TxPin); // SD Card Initialization (SPI Bus 2) #define SD_CS 26 #define SD_MOSI 42 #define SD_SCLK 46 #define SD_MISO 45 SPIClass spi1; spi1.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS); while (!SD.begin(SD_CS, spi1)) { delay(100); Serial.println("Failed to find SD card"); } // Analog Input Initialization #define analogInPin0 12 // A0 #define analogInPin1 13 // A1 #define analogInPin2 14 // A2 #define analogInPin3 15 // A3 #define analogInPin4 16 // A4 #define analogInPin5 17 // A5 #define analogInPin6 18 // A6 pinMode(A0, INPUT); pinMode(A1, INPUT); pinMode(A2, INPUT); pinMode(A3, INPUT); pinMode(A4, INPUT); pinMode(A5, INPUT); pinMode(A6, INPUT); // Logging Button Initialization #define BUTTON_LOG 41 pinMode(BUTTON_LOG, INPUT_PULLUP);

πŸ“‘ Base Station Mode Initialization

// TFT Display Initialization (SPI Bus 2) #define TFT_CS 26 #define TFT_DC 45 #define TFT_RST -1 // No reset pin #define TFT_SCLK 46 #define TFT_MOSI 42 SPIClass spiTFT = SPIClass(HSPI); Adafruit_ST7789 tft = Adafruit_ST7789(&spiTFT, TFT_CS, TFT_DC, TFT_RST); // Initialize SPI for TFT spiTFT.begin(TFT_SCLK, -1, TFT_MOSI, TFT_CS); // Initialize the display tft.init(240, 320); // 240x320 resolution tft.setRotation(0); tft.fillScreen(ST77XX_BLACK); // Initialize default reference command for base station initializeDefaultReferenceCommand();

πŸ”„ Shared Components Initialization

// OLED Display Initialization (Both modes) static SSD1306Wire display(0x3c, 500000, SDA_OLED, SCL_OLED, GEOMETRY_128_64, RST_OLED); VextON(); // Enable Vext power delay(100); display.init(); display.setFont(ArialMT_Plain_10); display.clear(); // LoRa Module Initialization (Both modes) #define RF_FREQUENCY 915000000 // Hz #define TX_OUTPUT_POWER 21 // dBm #define LORA_BANDWIDTH 2 // 500 kHz #define LORA_SPREADING_FACTOR 7 // SF7 #define LORA_CODINGRATE 1 // 4/5 Radio.Init(&RadioEvents); Radio.SetChannel(RF_FREQUENCY); Radio.SetTxConfig(MODEM_LORA, TX_OUTPUT_POWER, 0, LORA_BANDWIDTH, LORA_SPREADING_FACTOR, LORA_CODINGRATE, 8, false, true, 0, 0, false, 3000); // AES-128 Encryption Initialization byte key[16] = { .... }; aes128.setKey(key, 16); // USB Serial Initialization Serial.begin(115200);