Go backend for controlling drones through a unified, protocol-agnostic API.
✅ Protocol-Agnostic Frontend - Frontend only knows drone IDs
✅ Configuration-Driven - All connection details in drones.yaml
✅ Multi-Protocol Support - MAVLink, DJI, custom protocols
✅ Zero Frontend Changes - Add drones by editing config file
✅ Production-Ready - Proper separation of concerns
✅ Full Ground Station - Works independently without QGroundControl
# 1. Clone repository
git clone https://github.com/flightpath-dev/flightpath-server
cd flightpath-server
# 2. Install dependencies
go mod tidy
# 3. Configure your drones (edit this file)
nano data/config/drones.yaml
# 4. Run server
go run cmd/server/main.go
# 5. Connect to drone (in another terminal)
./scripts/test.sh connect alphaFrontend:
- Says "Connect to drone alpha"
Backend:
- Looks up "alpha" in
drones.yaml - Reads
mavlinkprotocol,/dev/cu.usbserial-D30JAXGS, 57600 baud - Creates MAVLink client
- Connects and returns success
Note: Frontend never knows about ports, protocols, or baud rates!
The data/config/drones.yaml file defines available drones. This file is committed to the repository and should be updated when adding new drones.
data/config/drones.yaml
drones:
- id: "alpha"
name: "Alpha X500"
description: "Primary test drone - Holybro X500 V2"
protocol: "mavlink"
connection:
type: "serial"
port: "/dev/cu.usbserial-D30JAXGS"
baud_rate: 57600
- id: "bravo"
name: "Bravo Quadcopter"
description: "Secondary test drone"
protocol: "mavlink"
connection:
type: "serial"
port: "/dev/ttyUSB1"
baud_rate: 115200data/
├── config/ # ✅ Version controlled - Configuration files
│ └── drones.yaml # Drone registry
├── logs/ # ❌ Gitignored - Runtime logs
├── runtime/ # ❌ Gitignored - Runtime state
└── cache/ # ❌ Gitignored - Cached data
You can override configuration using environment variables:
# Server configuration
export FLIGHTPATH_HOST=0.0.0.0
export FLIGHTPATH_PORT=8080
# MAVLink defaults (used if not specified in drone config)
export FLIGHTPATH_MAVLINK_PORT=/dev/ttyUSB0
export FLIGHTPATH_MAVLINK_BAUD=57600
# Drone registry location
export FLIGHTPATH_DRONE_REGISTRY=./data/config/drones.yaml
# Logging
export FLIGHTPATH_LOG_LEVEL=info # debug, info, warn, errorflightpath-server/
├── cmd/
│ └── server/
│ └── main.go # Server entry point
├── data/
│ └── config/
│ └── drones.yaml # Drone configurations
├── internal/
│ ├── config/
│ │ ├── config.go # Configuration types
│ │ ├── loader.go # Environment variable loader
│ │ └── drones.go # Drone registry loader
│ ├── mavlink/
│ │ └── client.go # MAVLink protocol implementation
│ ├── middleware/
│ │ ├── cors.go # CORS middleware
│ │ ├── logging.go # Request logging
│ │ └── recovery.go # Panic recovery
│ ├── server/
│ │ ├── dependencies.go # Shared dependencies
│ │ └── server.go # HTTP server setup
│ └── services/
│ ├── connection.go # Connection service (protocol routing)
│ ├── control.go # Control service
│ ├── mission.go # Mission service
│ └── telemetry.go # Telemetry service
├── scripts/
│ └── test.sh # Helper script for testing
├── go.mod
└── go.sum
Manage drone connections by drone id.
# List all drones in registry
./scripts/test.sh list
# Connect to drone
./scripts/test.sh connect alpha
# Get connection status
./scripts/test.sh status alpha
# Disconnect
./scripts/test.sh disconnect alphaSend flight control commands.
# Arm drone (⚠️ REMOVE PROPELLERS FOR TESTING!)
./scripts/test.sh arm alpha
# Disarm drone
./scripts/test.sh disarm alpha
# Set flight mode
./scripts/test.sh mode alpha GUIDED
# Takeoff to 10 meters
./scripts/test.sh takeoff alpha 10
# Land
./scripts/test.sh land alpha
# Return home
./scripts/test.sh rtl alpha
# Go to position (must be in GUIDED mode)
./scripts/test.sh goto alpha 42.5063 -71.1097 50Position Commands:
GoToPosition allows dynamic control of the drone's position. The drone flies to the specified GPS coordinates and altitude.
Requirements:
- Drone must be in GUIDED mode
- Drone must be armed
- GPS lock required (satellite count ≥ 6)
Position Format:
- Latitude: degrees (e.g., 42.5063)
- Longitude: degrees (e.g., -71.1097)
- Altitude: meters MSL (e.g., 50)
# Example: Fly to specific coordinates at 50m altitude
./scripts/test.sh goto alpha 42.5063 -71.1097 50Stream real-time telemetry data from the drone.
Features:
- Real-time position (GPS coordinates, altitude)
- Velocity (3D velocity vector)
- Attitude (roll, pitch, yaw)
- Battery status (voltage, current, remaining %)
- System health (sensors, GPS)
- Flight mode
- GPS accuracy and satellite count
# Get telemetry snapshot (single point-in-time reading)
./scripts/test.sh snapshot alpha
# Monitor telemetry (continuous updates every 2 seconds)
./scripts/test.sh monitor alphaTelemetry Data Available:
- Position: Latitude, longitude, altitude (MSL)
- Velocity: North, east, down components (m/s)
- Attitude: Roll, pitch, yaw (radians)
- Battery: Voltage (V), current (A), remaining (%)
- Health: Sensor status, GPS status
- Navigation: Heading (°), ground speed (m/s), vertical speed (m/s)
- GPS: Accuracy (m), satellite count
- Status: Armed state, flight mode
Autonomous mission planning and execution.
Features:
- Upload waypoint missions to drone
- Start/pause/resume mission execution
- Clear missions from drone
- Track mission progress (current waypoint)
- Stream real-time progress updates
Not Yet Implemented:
- Mission download from drone (planned for future)
# Upload a mission
./scripts/test.sh mission-upload alpha mission.json
# Start mission (switches to AUTO mode)
./scripts/test.sh mission-start alpha
# Pause mission (switches to LOITER)
./scripts/test.sh mission-pause alpha
# Resume mission
./scripts/test.sh mission-resume alpha
# Get mission progress
./scripts/test.sh mission-progress alpha
# Clear mission
./scripts/test.sh mission-clear alphaMission File Format (mission.json):
{
"mission": {
"id": "survey-001",
"name": "Area Survey",
"waypoints": [
{
"sequence": 0,
"action": "ACTION_TAKEOFF",
"position": {
"latitude": 42.5063,
"longitude": -71.1097,
"altitude": 20
}
},
{
"sequence": 1,
"action": "ACTION_WAYPOINT",
"position": {
"latitude": 42.5070,
"longitude": -71.1090,
"altitude": 30
},
"hold_time_sec": 5,
"acceptance_radius": 2.0
},
{
"sequence": 2,
"action": "ACTION_LAND",
"position": {
"latitude": 42.5063,
"longitude": -71.1097,
"altitude": 0
}
}
]
}
}Waypoint Actions:
ACTION_TAKEOFF- Takeoff to altitudeACTION_LAND- Land at positionACTION_WAYPOINT- Fly to waypointACTION_LOITER- Circle indefinitely at positionACTION_HOLD- Hold position for specified time
Waypoint Parameters:
sequence- Waypoint order (0-indexed)position- Latitude, longitude, altitude (MSL in meters)hold_time_sec- How long to hold at waypoint (optional)acceptance_radius- Radius to consider waypoint reached (optional, meters)heading- Target heading at waypoint (optional, degrees)
Flightpath is designed for API-controlled flight without RC transmitter. Understanding flight modes is critical for safe operation.
Use for: Dynamic position commands from the API
What is GUIDED?
- Holds GPS position automatically (no drift)
- Accepts position/velocity commands from API ✅
- Responds immediately to
GoToPositioncommands - When not commanded, hovers safely in place
- Think: "Position hold + API control enabled"
Stay in GUIDED for entire flight:
# 1. Connect and arm
./scripts/test.sh connect alpha
./scripts/test.sh arm alpha
# 2. Set GUIDED mode
./scripts/test.sh mode alpha GUIDED
# 3. Takeoff
./scripts/test.sh takeoff alpha 20
# 4. Send position commands
./scripts/test.sh goto alpha 42.5070 -71.1090 25
./scripts/test.sh goto alpha 42.5065 -71.1085 30
# 5. Land
./scripts/test.sh land alpha
# 6. Disarm
./scripts/test.sh disarm alphaWhy GUIDED?
- ✅ Can send position commands at any time
- ✅ Holds position safely when not commanded
- ✅ No mode switching between commands
- ✅ Most responsive to API commands
Use for: Preventing API commands (safety feature)
What is POSITION_HOLD?
- Holds GPS position automatically (no drift)
- Rejects position/velocity commands from API ❌
- Only responds to RC stick inputs (if connected)
- Think: "Hold position and ignore external commands"
# Switch to POSITION_HOLD to "freeze" drone
./scripts/test.sh mode alpha POSITION_HOLDWhen to use:
- 🔒 Lock drone in place (prevent buggy API commands)
- 🛑 Pause API control temporarily
- ⏸️ Debugging/development pause
Key Difference:
Scenario: API sends GoToPosition command
GUIDED mode:
→ ✅ "Roger, flying to new position"
POSITION_HOLD mode:
→ ❌ "Ignoring command, holding current position"
Use for: Pre-programmed waypoint missions
What is AUTO?
- Follows uploaded waypoint mission
- Fully autonomous (takeoff → waypoints → land)
- Safest for predictable, pre-planned flights
- No real-time API commands needed
Mission workflow:
# 1. Create mission file with waypoints (see mission.json format above)
# 2. Connect and upload mission
./scripts/test.sh connect alpha
./scripts/test.sh mission-upload alpha mission.json
# 3. Arm and start mission
./scripts/test.sh arm alpha
./scripts/test.sh mission-start alpha
# Mission runs automatically: takeoff → waypoints → land
# Monitor progress
./scripts/test.sh mission-progress alpha
# Pause if needed
./scripts/test.sh mission-pause alpha
# Resume
./scripts/test.sh mission-resume alphaWhy AUTO for missions?
- ✅ Pre-planned safe path (reviewed before flight)
- ✅ Includes takeoff and landing waypoints
- ✅ Most predictable behavior
- ✅ Best for unattended operations
- ✅ Automatic failsafes (geofence, battery RTL)
Use for: Emergency return home
What is RTL?
- Autonomous return to launch position
- Climbs to safe altitude, flies home, lands
- Triggered automatically on low battery or geofence breach
- Can be commanded via API
# Emergency return home
./scripts/test.sh rtl alphaAdditional modes available for specific use cases:
STABILIZED - Attitude stabilization only (manual control)
./scripts/test.sh mode alpha STABILIZEDALTITUDE_HOLD - Holds altitude, manual horizontal control
./scripts/test.sh mode alpha ALTITUDE_HOLDMANUAL - Full manual control (no stabilization)
./scripts/test.sh mode alpha MANUALLOITER - Circle around current position
./scripts/test.sh mode alpha LOITER| Mode | Accepts API Commands | Best For | Safety |
|---|---|---|---|
| GUIDED | ✅ Yes | Dynamic API control | ⭐⭐⭐⭐ |
| POSITION_HOLD | ❌ No | Safety lockdown | ⭐⭐⭐⭐⭐ |
| AUTO (Mission) | ❌ No (follows mission) | Pre-planned autonomous | ⭐⭐⭐⭐⭐ |
| RTL | ❌ No (autonomous return) | Emergency return | ⭐⭐⭐⭐⭐ |
| ALTITUDE_HOLD | ❌ No | Manual flight with altitude hold | ⭐⭐⭐ |
| STABILIZED | ❌ No | Manual flight with stabilization | ⭐⭐ |
| MANUAL | ❌ No | Full manual control | ⭐ |
| LOITER | ❌ No | Circle position | ⭐⭐⭐⭐ |
Flightpath uses generic flight mode names that map to PX4-specific modes:
| Flightpath Mode | PX4 Main Mode | PX4 Sub Mode | PX4 Mode Value | Description |
|---|---|---|---|---|
MANUAL |
MANUAL (1) |
- | 1 |
Full manual control |
STABILIZED |
STABILIZED (7) |
- | 7 |
Attitude stabilization |
ALTITUDE_HOLD |
ALTCTL (2) |
- | 2 |
Altitude control |
POSITION_HOLD |
POSCTL (3) |
- | 3 |
GPS position hold |
GUIDED |
OFFBOARD (6) |
- | 6 |
External position control (API) |
AUTO |
AUTO (4) |
MISSION (4) |
262148 |
Follow mission waypoints |
RETURN_HOME |
AUTO (4) |
RTL (5) |
327684 |
Return to launch |
LAND |
AUTO (4) |
LAND (6) |
393220 |
Land at position |
TAKEOFF |
AUTO (4) |
TAKEOFF (2) |
131076 |
Takeoff |
LOITER |
AUTO (4) |
LOITER (3) |
196612 |
Circle position |
PX4 Mode Encoding:
- Simple modes: Use main mode value directly
- AUTO sub-modes:
main_mode | (sub_mode << 16)- Example: RTL =
4 | (5 << 16)=327684
- Example: RTL =
For API Control (Dynamic Flight):
- Stay in GUIDED mode for entire flight
- Use GoToPosition to fly dynamically
- Drone holds position when not commanded (safe)
- Responds immediately to position commands
- Switch to POSITION_HOLD only to "freeze" drone
For Autonomous Operations (Pre-planned):
- Use AUTO mode with pre-programmed missions
- Upload mission including takeoff and landing
- Start mission and monitor progress
- Most predictable and safest for unattended flight
Before flying with API only:
⚠️ Remove propellers for initial testing- ✅ Test mission in simulator first (if using AUTO mode)
- ✅ Verify GPS lock (satellite count ≥ 8)
- ✅ Check battery level (> 50% recommended)
- ✅ Confirm geofence is set correctly
- ✅ Set home position (for RTL)
- ✅ Verify clear flight area
- ✅ Test Return Home procedure
- ✅ Monitor telemetry during flight
# Complete dynamic flight sequence with GUIDED mode
# 1. Connect to drone
./scripts/test.sh connect alpha
# 2. Check telemetry before flight
./scripts/test.sh snapshot alpha
# 3. Arm drone
./scripts/test.sh arm alpha
# 4. Set GUIDED mode (accepts API commands)
./scripts/test.sh mode alpha GUIDED
# 5. Takeoff
./scripts/test.sh takeoff alpha 20
# 6. Monitor telemetry
./scripts/test.sh snapshot alpha
# 7. Send position commands (fly square pattern)
./scripts/test.sh goto alpha 42.5070 -71.1097 25 # North
./scripts/test.sh goto alpha 42.5070 -71.1090 25 # East
./scripts/test.sh goto alpha 42.5063 -71.1090 25 # South
./scripts/test.sh goto alpha 42.5063 -71.1097 25 # West (back to start)
# 8. Land
./scripts/test.sh land alpha
# 9. Disarm
./scripts/test.sh disarm alpha
# 10. Disconnect
./scripts/test.sh disconnect alpha# Complete autonomous mission sequence
# 1. Connect to drone
./scripts/test.sh connect alpha
# 2. Upload mission
./scripts/test.sh mission-upload alpha mission.json
# 3. Check telemetry
./scripts/test.sh snapshot alpha
# 4. Arm drone
./scripts/test.sh arm alpha
# 5. Start mission (automatically switches to AUTO mode)
./scripts/test.sh mission-start alpha
# 6. Monitor mission progress
./scripts/test.sh mission-progress alpha
# 7. Pause if needed
./scripts/test.sh mission-pause alpha
# 8. Resume if paused
./scripts/test.sh mission-resume alpha
# 9. After completion, disarm
./scripts/test.sh disarm alpha
# 10. Clear mission
./scripts/test.sh mission-clear alpha
# 11. Disconnect
./scripts/test.sh disconnect alphaIf something goes wrong:
-
Return Home (Most Common)
./scripts/test.sh rtl alpha
-
Hold Position (Stop and hover - switch to POSITION_HOLD)
./scripts/test.sh mode alpha POSITION_HOLD
-
Pause Mission (If in AUTO mode)
./scripts/test.sh mission-pause alpha
-
Emergency Land (Land immediately at current location)
./scripts/test.sh land alpha
PX4/ArduPilot automatically handles:
- Low Battery → Triggers RTL automatically
- GPS Lost → Enters ALTITUDE_HOLD and hovers
- Geofence Breach → Triggers RTL or LAND
- Datalink Loss → Configured failsafe action (default: RTL)
If API/network connection is lost:
- GUIDED mode → Continues hovering at last position (safe)
- AUTO mode → Continues mission as programmed
- If connection lost > timeout → Triggers failsafe (RTL)
Add your drone to data/config/drones.yaml:
drones:
# ... existing drones ...
- id: "charlie"
name: "Charlie Custom"
description: "Custom built quadcopter"
protocol: "mavlink"
connection:
type: "serial"
port: "/dev/ttyUSB2"
baud_rate: 115200go run cmd/server/main.go./scripts/test.sh connect charlieNo code changes needed!
- MAVLink (PX4, ArduPilot)
- Serial connection (USB, UART)
- UDP connection (for simulators) - planned
- Full flight mode control
- Arm/Disarm, Takeoff/Land, RTL
- Real-time telemetry streaming
- Mission upload and execution
- Position commands (GoToPosition)
- Ground station functionality:
- Sends periodic HEARTBEAT (identifies as GCS)
- Sends SYSTEM_TIME (GPS assistance for faster lock)
- Requests telemetry data streams at 10 Hz
- Satisfies PX4's COM_DL_LOSS_T datalink requirements
- Works independently without QGroundControl
- 🔜 DJI SDK - Planned
- 🔜 Custom - Extensible architecture
Flightpath implements core ground control station functionality according to MAVLink protocol standards, enabling independent operation without QGroundControl.
1. Heartbeat Service (MAVLink Spec)
- Sends periodic HEARTBEAT messages (1 Hz)
- Identifies Flightpath as
MAV_TYPE_GCS(Ground Control Station) - Satisfies PX4's
COM_DL_LOSS_Tdatalink requirement
2. Command Protocol (MAVLink Spec)
- ARM/DISARM commands
- Takeoff, Land, Return-to-Launch
- Flight mode changes
- Position commands (GUIDED mode)
3. Mission Protocol (MAVLink Spec)
- Upload waypoint missions
- Start/pause/resume missions
- Clear missions
- Track mission progress
- Note: Mission download not yet implemented
4. Telemetry Streams
- Requests position, attitude, battery, GPS data
- 10 Hz telemetry updates
- Real-time monitoring via API
5. System Time Synchronization
- Sends SYSTEM_TIME messages for GPS assistance
- Enables GPS "warm start" (1-2 min lock vs 5-10 min cold start)
Advanced GCS Features:
- Parameter read/write (use QGC for parameter changes)
- Flight log download (use QGC for logs)
- File transfer protocol
- Camera/gimbal control
- Geofence/rally point management
- MAVLink Protocol: https://mavlink.io/
- MAVLink Services: https://mavlink.io/en/services/
- MAVLink Common Messages: https://mavlink.io/en/messages/common.html
- PX4 MAVLink Integration: https://docs.px4.io/main/en/middleware/mavlink.html
✅ Independent Operation - Core functions work without QGroundControl
✅ Fast GPS Lock - SYSTEM_TIME provides 1-2 minute acquisition
✅ Full Flight Control - Complete API-driven flight operations
✅ Mission Execution - Upload and run autonomous missions
✅ Standards Compliant - Follows MAVLink protocol specifications
For Advanced Features: Use QGroundControl for parameter tuning, log analysis, and initial setup. After setup, Flightpath handles all flight operations.
import { createClient } from "@connectrpc/connect";
import { createConnectTransport } from "@connectrpc/connect-web";
import { ConnectionService } from "@flightpath-dev/flightpath-proto/gen/ts/drone/v1/connection_connect";
// Create transport
const transport = createConnectTransport({
baseUrl: "http://localhost:8080",
});
// Create client
const client = createClient(ConnectionService, transport);
// Connect - that's all the frontend needs to know!
const response = await client.connect({
droneId: "alpha"
});
console.log(response.message);
// "Connected to Alpha X500 (System ID: 1)"# 1. Start server
go run cmd/server/main.go
# 2. In another terminal - test connection
./scripts/test.sh list # List all drones
./scripts/test.sh connect alpha # Connect to alpha
./scripts/test.sh status alpha # Check status
# 3. Test telemetry
./scripts/test.sh snapshot alpha # Get single telemetry reading
./scripts/test.sh monitor alpha # Monitor telemetry (Ctrl+C to stop)
# 4. Test flight modes (propellers off!)
./scripts/test.sh arm alpha # Arm
./scripts/test.sh mode alpha GUIDED # Set GUIDED mode
./scripts/test.sh mode alpha POSITION_HOLD # Set POSITION_HOLD
./scripts/test.sh mode alpha AUTO # Set AUTO mode
./scripts/test.sh disarm alpha # Disarm
# 5. Test mission planning
./scripts/test.sh mission-upload alpha mission.json # Upload mission
./scripts/test.sh mission-progress alpha # Check progress
./scripts/test.sh mission-clear alpha # Clear mission
# 6. Test position commands (propellers off!)
./scripts/test.sh arm alpha # Arm
./scripts/test.sh mode alpha GUIDED # Set GUIDED mode
./scripts/test.sh goto alpha 42.5063 -71.1097 50 # Send position
./scripts/test.sh disarm alpha # Disarm
# 7. Full flight test with position commands (after successful tests)
./scripts/test.sh arm alpha # Arm
./scripts/test.sh mode alpha GUIDED # Set GUIDED mode
./scripts/test.sh takeoff alpha 20 # Takeoff to 20m
./scripts/test.sh goto alpha 42.5070 -71.1097 25 # Fly north
./scripts/test.sh goto alpha 42.5070 -71.1090 25 # Fly east
./scripts/test.sh land alpha # Land
./scripts/test.sh disarm alpha # Disarm
# 8. Full mission test (after successful mode tests)
./scripts/test.sh mission-upload alpha mission.json # Upload
./scripts/test.sh arm alpha # Arm
./scripts/test.sh mission-start alpha # Start mission
./scripts/test.sh mission-progress alpha # Monitor
./scripts/test.sh disarm alpha # After completion
# 9. Emergency procedures
./scripts/test.sh rtl alpha # Return home
./scripts/test.sh mode alpha POSITION_HOLD # Hold position
./scripts/test.sh mission-pause alpha # Pause mission
# 10. Cleanup
./scripts/test.sh disconnect alpha # Disconnect./scripts/test.sh list # List drones
./scripts/test.sh connect <drone_id> # Connect to drone
./scripts/test.sh disconnect <drone_id> # Disconnect
./scripts/test.sh status <drone_id> # Get status
./scripts/test.sh snapshot <drone_id> # Get telemetry snapshot
./scripts/test.sh monitor <drone_id> # Monitor telemetry (live)
./scripts/test.sh arm <drone_id> # Arm
./scripts/test.sh disarm <drone_id> # Disarm
./scripts/test.sh mode <drone_id> <MODE> # Set flight mode
./scripts/test.sh takeoff <drone_id> <alt> # Takeoff
./scripts/test.sh land <drone_id> # Land
./scripts/test.sh rtl <drone_id> # Return home
./scripts/test.sh goto <drone_id> <lat> <lon> <alt> # Go to position
./scripts/test.sh mission-upload <drone_id> <file> # Upload mission
./scripts/test.sh mission-start <drone_id> # Start mission
./scripts/test.sh mission-pause <drone_id> # Pause mission
./scripts/test.sh mission-resume <drone_id> # Resume mission
./scripts/test.sh mission-progress <drone_id> # Get progress
./scripts/test.sh mission-clear <drone_id> # Clear missionAvailable modes: MANUAL, STABILIZED, ALTITUDE_HOLD, POSITION_HOLD, GUIDED, AUTO, RETURN_HOME, LAND, TAKEOFF, LOITER
# Install Go dependencies
go mod tidy
# Install buf (for proto generation)
brew install bufbuild/buf/buf # macOS
# or
go install github.com/bufbuild/buf/cmd/buf@latestProto definitions are in a separate repository: flightpath-proto
To update to a new proto version:
# Update proto dependency
go get -u github.com/flightpath-dev/flightpath-proto@latest
# Update go.mod
go mod tidy
# Restart server
go run cmd/server/main.go# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run specific package tests
go test ./internal/configCheck that your drone ID exists in data/config/drones.yaml:
# List available drones
./scripts/test.sh list-
Check serial port exists:
# Linux ls /dev/ttyUSB* # macOS ls /dev/tty.usbserial-*
-
Check permissions:
# Linux - add user to dialout group sudo usermod -a -G dialout $USER # macOS - no special permissions needed
-
Verify baud rate matches your drone's configuration (usually 57600 or 115200)
- Check drone is powered on
- Verify serial cable is connected
- Confirm baud rate in
drones.yamlmatches drone settings - Test with QGroundControl first to verify hardware connection
- Check drone is armed (some modes require armed state)
- Verify GPS lock for GPS-dependent modes (GUIDED, POSITION_HOLD, AUTO, RTL)
- Check pre-arm checks passed
- Review drone logs for specific error messages
- Ensure drone is fully powered on and booted
- Wait for GPS lock (satellite count ≥ 6)
- Verify MAVLink messages are being received (check server logs)
- Some telemetry requires GPS lock before reporting valid data
- Verify mission JSON format is correct
- Check waypoint coordinates are valid (lat/lon in degrees)
- Ensure drone is connected and responsive
- Verify at least one waypoint in mission
- Check server logs for specific error messages
GoToPosition commands require GUIDED mode:
# Set GUIDED mode first
./scripts/test.sh mode alpha GUIDED
# Then send position commands
./scripts/test.sh goto alpha 42.5063 -71.1097 50With Flightpath as GCS:
- Ensure you're outdoors with clear sky view
- Wait 1-2 minutes for GPS warm start (Flightpath sends SYSTEM_TIME)
- Check GPS antenna is facing up (ceramic side)
- Verify GPS module is powered and connected
- Check server logs for "Sending SYSTEM_TIME" messages
First time setup:
- Use QGroundControl once to calibrate compass
- Compass must be calibrated at your flying location
- After compass calibration, Flightpath will work independently
# Check what's using port 8080
lsof -i :8080
# Kill the process
kill -9 <PID>
# Or use a different port
export FLIGHTPATH_PORT=8081
go run cmd/server/main.go- Iteration 1 ✅ - Connection and basic control (MAVLink)
- Iteration 2 ✅ - Protocol-agnostic architecture
- Iteration 3 ✅ - Flight mode control (GUIDED, POSITION_HOLD, AUTO, RTL)
- Iteration 4 ✅ - Real-time telemetry streaming
- Iteration 5 ✅ - Mission planning and waypoints
- Iteration 6 ✅ - Position commands (GoToPosition)
- Iteration 7 ✅ - Proper ground station (HEARTBEAT, SYSTEM_TIME, data streams)
- Iteration 8 📋 - React frontend
- Iteration 9 📋 - Authentication
MIT
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
For proto changes, see the flightpath-proto repository.
For issues or questions:
- Open an issue on GitHub
- Check existing documentation
- Review the proto definitions at
flightpath-proto