Dual Drone Telemetry

Multi-source drone telemetry simulator demonstrating simultaneous reception from two independent drones with distinct flight patterns and synthetic camera feeds.

Open in the examples browser Files on GitHub

Dual Drone Telemetry dashboard in Serial Studio

What you'll learn: two sources receiving data at once over separate TCP connections, with Image View camera feeds, GPS Map, Gyroscope and Canvas Widget groups, and output controls.

Prerequisites: Serial Studio Pro and Python 3 for the drone simulator.

A multi-source drone telemetry simulator that shows Serial Studio receiving and visualizing data from two independent devices at the same time, each with its own camera feed, GPS coordinates, flight dynamics, and battery monitoring.

Overview

Two simulated drones fly different flight profiles over the Swiss Alps near Zermatt, each transmitting telemetry and synthetic camera imagery over separate TCP connections.

Connecting both drones at once, the Image View camera feeds, the output control panels, and the Canvas state visualizer need a Serial Studio Pro license. See serial-studio.com for details.

Drone Port Flight pattern Altitude Camera style
Alpha 9001 Circular patrol (~95 m radius) 120 m AGL Satellite imagery + green HUD
Bravo 9002 Drifting S-turn survey (~105 m turn radius) 200 m AGL Thermal/IR remap (iron-bow palette)

Camera feeds

Camera images are fetched from ArcGIS World Imagery satellite tiles (free, no API key required) and cached locally. Each drone's view is centered on its GPS position and rotated to match heading.

Alpha satellite. Photorealistic satellite camera view:

  • Real satellite imagery centered on the drone position, rotated to heading.
  • Green military-style HUD overlay with altitude, heading, and GPS coordinates.

Bravo thermal. Thermal/IR remap of satellite imagery:

  • Same satellite data remapped to an iron-bow thermal palette.
  • Iron-bow palette via OpenCV COLORMAP_INFERNO.
  • Amber FLIR-style HUD overlay with altitude, heading, and GPS coordinates.

Output controls

Each drone has an output control panel on the dashboard with six interactive widgets that send commands back to the simulator.

Control Widget type Range Command sent
Throttle Slider 0-100% THR <value>\r\n
Heading Knob -180° to +180° HDG <value>\r\n
Camera Toggle ON/OFF CAM ON\r\n / CAM OFF\r\n
Takeoff Button TKO\r\n
Return to Home Button RTH\r\n
Crash Button CRASH\r\n

Throttle scales the drone's airspeed. 50% is normal cruise, 0% is idle, 100% is full speed. Heading applies a rotational offset to the flight path. Camera turns the synthetic JPEG feed on or off (telemetry keeps streaming). Takeoff launches from the helipad (only when grounded). RTH triggers return-to-home, landing, and automatic battery recharge. Crash drops the TCP link to simulate a catastrophic failure.

Telemetry per drone (11 fields)

Field Units Description
Latitude deg GPS latitude
Longitude deg GPS longitude
Heading deg Compass heading (0 to 360)
Altitude m Altitude above ground
Airspeed m/s Forward speed
Vertical Speed m/s Climb/descent rate
Roll deg Bank angle
Pitch deg Nose up/down angle
Battery Voltage V 6S LiPo (18 to 25.2 V)
Current Draw A Motor + avionics current
Battery % % Remaining charge (drains over time)

Quick start

  1. Open Dual Drone Telemetry.ssproj in Serial Studio.
  2. Connect both TCP sources. Each one connects to the simulator's TCP server on ports 9001 and 9002.

The project includes a control loop that launches dual_drone_telemetry.py (which starts the two TCP servers) automatically just before connecting, so there is nothing to start by hand. For camera imagery, install its optional dependencies first:

pip install opencv-python numpy   # for camera imagery

The simulator also works without opencv. You just won't get camera images. To run it yourself instead of letting the control loop start it, launch python3 dual_drone_telemetry.py before connecting.

Command-line options

Flag Default Description
--fps 10 Update rate in Hz (telemetry + camera)
--host 127.0.0.1 TCP listen address

Protocol details

Both drones use hexadecimal frame delimiters with JPEG images interleaved in the same byte stream:

  • Alpha: A1 01 A1 01 (start) / A1 02 A1 02 (end).
  • Bravo: B2 03 B2 03 (start) / B2 04 B2 04 (end).

Each cycle sends a delimited JPEG camera frame, then a delimited CSV telemetry frame. Image delimiters are separate from the CSV delimiters:

  • Alpha images: A1 CA FE 01 (start) / A1 FE ED 01 (end).
  • Bravo images: B2 CA FE 02 (start) / B2 FE ED 02 (end).

Command protocol

Serial Studio sends commands back to the simulator over the same TCP connection. Each command is a text line terminated by \r\n.

Command Arguments Effect
THR 0 to 100 Set throttle (scales airspeed; 50 = normal cruise)
HDG -180 to 180 Apply heading offset in degrees
CAM ON or OFF Enable or disable camera image transmission
TKO Launch from helipad (only when grounded)
RTH Return to helipad, land, and recharge battery
CRASH Simulate catastrophic failure — drops the TCP link with a RST. Useful for testing how Serial Studio behaves when one source goes dark in multi-device mode while the other keeps streaming.

Commands are parsed on each simulation tick. Multiple commands can arrive per tick and are applied in order.

Dashboard widgets

Each drone has eight widget groups on the dashboard.

Widget Type Description
Camera Image View Live satellite (Alpha) or thermal/IR (Bravo) camera feed
Navigation GPS Map GPS track on an interactive map
Heading Compass Compass heading indicator
Attitude Gyroscope Roll, pitch, and yaw visualization
Flight Gauges + Bars Airspeed, altitude, and vertical speed
Power Gauges + Bars Battery voltage, current draw, and charge level
Controls Output Panel Throttle, heading, camera toggle, takeoff, RTH, and crash per drone
State Canvas Scripted live state visualizer driven by the telemetry datasets

Flight models

Both drones start grounded at their helipads near Zermatt. Send TKO to launch. Takeoff reaches cruise altitude in about 2 seconds so dashboard changes show up immediately during demos.

Drone Alpha, Zermatt village helipad (46.0207°N, 7.7491°E):

  • Circular patrol at 120 m AGL.
  • Constant mild bank angle (~12°).
  • Slow altitude oscillation (±8 m).
  • Battery drain: about 0.15%/sec in cruise.

Drone Bravo, Trockener Steg plateau (46.0035°N, 7.7465°E):

  • Drifting S-turn survey at 200 m AGL.
  • Dynamic banking (up to ±40°).
  • Higher altitude variation (±15 m).
  • Faster speed, higher current draw.
  • Battery drain: about 0.18%/sec in cruise.

Both drones have low-battery (0-20%) and low-voltage (18-21 V) alarm bands that fire a notification when charge or voltage drains into the band. Send RTH to return, land, and recharge automatically for another flight.

Requirements

  • Python 3.6+.
  • opencv-python and numpy (optional, for camera imagery).
  • Serial Studio Pro (multi-source, Image View, Output Panel, and Canvas).