Skip to main content

FPV PID Tuner CLI tools

Project description

pid-tuner

🛠️ FPV PID Tuner — A professional CLI toolkit for analyzing and tuning PID on FPV drones. Plot gyro vs. PID outputs, zoom in on D‑term spikes, compare flight logs, and get data‑driven tuning suggestions.

PyPI Version Python License: MIT Build Status


🔍 Features

  • Summary: runtime, total spikes, spike rate, avg & max |D‑term|, and avg throttle at spike times.
  • Plot: gyro vs. PID output curves; zoomed views of D‑term spikes; optional throttle overlay.
  • Spikes: detect, filter, page through spike events; export CSVs for detailed analysis.
  • Future: compare multiple logs side‑by‑side; automated tuning recommendations; Betaflight integration.

1. Installation

Requires: Python 3.8+.

From PyPI

pip install pid-tuner

From Source (editable)

git clone git@github.com:bmags73/pid-tuner.git
cd pid-tuner
pip install -e .

2. Quickstart Guide

Place your Blackbox CSV logs in any folder and run commands against them:

a) Summary of PID Spikes

pid-tuner summary \
  --log logs/sample1.csv \
  --axes roll,pitch \
  --window 50 \
  --threshold 2.0

b) Generate Plots

pid-tuner plot \
  --axes roll,pitch,yaw \
  --overlay-throttle \
  --out-dir graphs/

c) Browse Spike Details

pid-tuner spikes \
  --axes roll,pitch \
  --min-mag 30 \
  --time-window 0.5,2.0 \
  --page 1 \
  --per-page 20

3. Advanced Usage

3.1 Batch Processing Multiple Logs

You can quickly analyze a whole directory of Blackbox CSVs with a simple shell loop:

for log in logs/*.csv; do
  echo "Processing $log"
  pid-tuner summary --log "$log" --axes roll,pitch,yaw --window 50 --threshold 2.0
  pid-tuner plot    --log "$log" --axes roll,pitch,yaw --out-dir graphs/
  pid-tuner spikes  --log "$log" --axes roll,pitch,yaw --min-mag 30 --time-window 0.5,2.0
done

3.2 Configuration File Support (Upcoming)

Define your analysis parameters in config.yml or config.json to run as:

pid-tuner batch --config config.yml
# config.yml
logs:
  - logs/flight1.csv
  - logs/flight2.csv
axes: [roll, pitch, yaw]
threshold: 2.5
window: 60
out_dir: graphs/

(This feature is under development — contributions welcome!)## 4. Contribution & API Reference

API Docs

Generate API reference with Sphinx + mkdocstrings:

pip install sphinx mkdocstrings
sphinx-quickstart docs
# update docs/conf.py and index.rst as needed
sphinx-build docs docs/_build/html

Contributing

  • Fork the repo and create feature branches.
  • Run pytest to ensure all tests pass.
  • Update/add docstrings and tests for new features.
  • Submit a Pull Request with clear description and screenshots.

5. License

MIT © bMagSquatch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pid_tuner-0.1.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pid_tuner-0.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file pid_tuner-0.1.1.tar.gz.

File metadata

  • Download URL: pid_tuner-0.1.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pid_tuner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 da646fab3bef6a0fdbcf84bfdbed887f1c6e7bb4965332b5054bf29b32dcae1a
MD5 f7fc1c6883be26ba5a27887ed9550e1b
BLAKE2b-256 0cba42a495a2bb669f0ca422c6e9ea87b0e715048ee20338a4961594f355ba1e

See more details on using hashes here.

File details

Details for the file pid_tuner-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pid_tuner-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pid_tuner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 572a1453db8b2be45f17cce894e2ada659bee046c0ccf10e0eef68e06a559928
MD5 9e9bd727190334d795a8c82a737e1a36
BLAKE2b-256 7db7c6e03fd7eda461a79d9df39091530119263c5aa032af43484e151b92a773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page