npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flightpath/flightpath

v0.0.13

Published

Autonomous Drone Control Platform

Readme

Flightpath — Autonomous Drone Control Platform

A Go-based server for autonomous drone control via the MAVLink protocol. For the front-end, see the Flightpath UI repository.

Architecture

architecture

Project Structure

flightpath/
├── cmd/                            # Main applications for this project
│   └── server/                     # Server entry point
│       └── main.go
├── examples/                       # API usage examples
├── gen/                            # gRPC code generated from protobufs
│   ├── go/
│   └── ts/
├── internal/                       # Private application and library code
│   ├── config/
│   │   ├── config.go               # Configuration structure
│   │   └── loader.go               # Configuration loader
│   ├── logger/                     # Structured logger based on slog
│   │   └── logger.go
│   ├── mavlink/                    # Drone side communication code
│   │   ├── command_dispatcher.go   # Sends commands to drone
│   │   └── message_receiver.go     # Receives messages from Drone
│   ├── middleware/                 # Handlers to process HTTP requests
│   │   ├── cors.go                 # CORS middleware
│   │   ├── logging.go              # Request logging middleware
│   │   └── recovery.go             # Panic recovery middleware
│   ├── server/                     # Server state and lifecycle management
│   │   └── server.go
│   └── services/                   # Core functionality offered by the application
│       ├── context.go              # Shared context for all services (config, logger, etc.)
│       └── mavlink_service.go      # Distributes MAVLink messages to gRPC subscribers
├── proto/                          # Protocol Buffers definitions
│   └── flightpath/
│       └── mavlink_service.proto   # Handles commands and messages from gRPC clients
├── go.mod
└── go.sum

Quick Start

Prerequisites

# 1. Clone repository
git clone https://github.com/flightpath-dev/flightpath
cd flightpath

# 2. Install dependencies
go mod tidy

Run with a PX4 SITL

Start a PX4 SITL by following the instructions in PX4 SITL Setup.

# 1. Run server
go run cmd/server/main.go

# 2. Monitor messages from the SITL
go run examples/message_monitor_flightpath/main.go

Run with a drone connected to a serial port

# 1. Turn on the drone

# 2. Run the server with a serial port configuration 
./scripts/run-serial.sh

# 3. Monitor messages from the drone
go run examples/message_monitor_flightpath/main.go

Run with a drone connected over a UDP port

# 1. Turn on the drone

# 2. Run the server with a UDP configuration
./scripts/run-udp.sh

# 3. Monitor messages from the drone
go run examples/message_monitor_flightpath/main.go

Configuration

Flightpath uses environment variables for configuration, following the 12-factor app pattern.

Server Configuration

  • FLIGHTPATH_GRPC_HOST: gRPC server host (string, default: "0.0.0.0")
  • FLIGHTPATH_GRPC_PORT: gRPC server port (integer, 1-65535, default: 8080)
  • FLIGHTPATH_GRPC_CORS_ORIGINS: Comma-separated list of allowed CORS origins (default: "http://localhost:3000")

MAVLink Configuration

  • FLIGHTPATH_MAVLINK_ENDPOINT_TYPE: MAVLink endpoint type (string, required, default: udp-server)
    • Valid values: serial, udp-server, udp-client, tcp-server, tcp-client

Serial Endpoint

  • FLIGHTPATH_MAVLINK_SERIAL_DEVICE: Serial device path (string, required if type is "serial")
    • Example: /dev/cu.usbserial-D30JAXGS (Mac), /dev/ttyUSB0 (Linux) or COM3 (Windows)
  • FLIGHTPATH_MAVLINK_SERIAL_BAUD: Serial baud rate (integer, required if type is "serial", default: 57600)
    • Example: 57600, 115200

UDP Endpoint

  • FLIGHTPATH_MAVLINK_UDP_ADDRESS: UDP address in "host:port" format (string, required for UDP endpoints, default: "0.0.0.0:14550")
    • Example: 0.0.0.0:14550 (server) or 127.0.0.1:14550 (client)

TCP Endpoint

  • FLIGHTPATH_MAVLINK_TCP_ADDRESS: TCP address in "host:port" format (string, required for TCP endpoints)
    • Example: 0.0.0.0:5760 (server) or 127.0.0.1:5760 (client)

Logging Configuration

  • FLIGHTPATH_LOG_LEVEL: Log level (string, case-insensitive, default: "INFO")
    • Valid values: DEBUG, INFO, WARN, ERROR
    • Example: export FLIGHTPATH_LOG_LEVEL=DEBUG
  • FLIGHTPATH_LOG_FORMAT: Log format (string, case-insensitive, default: "text")
    • Valid values: text, json
    • text: Short, human-readable format (e.g., INFO [main] Starting the server)
    • json: Structured JSON format for log aggregation tools
    • Example: export FLIGHTPATH_LOG_FORMAT=json

Example Configuration

# Server configuration
export FLIGHTPATH_GRPC_HOST=0.0.0.0
export FLIGHTPATH_GRPC_PORT=8080
export FLIGHTPATH_GRPC_CORS_ORIGINS=http://localhost:3000,http://localhost:4000

# MAVLink serial configuration
export FLIGHTPATH_MAVLINK_ENDPOINT_TYPE=serial
export FLIGHTPATH_MAVLINK_SERIAL_DEVICE=/dev/cu.usbserial-D30JAXGS
export FLIGHTPATH_MAVLINK_SERIAL_BAUD=57600

# Or MAVLink UDP configuration
export FLIGHTPATH_MAVLINK_ENDPOINT_TYPE=udp-server
export FLIGHTPATH_MAVLINK_UDP_ADDRESS=0.0.0.0:14550

# Logging configuration
export FLIGHTPATH_LOG_LEVEL=WARN
export FLIGHTPATH_LOG_FORMAT=text

Testing

Run all tests:

go test ./...

Run tests with coverage:

go test -cover ./...

Run tests with verbose output:

go test -v ./...

License

MIT