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.2.tar.gz (11.7 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.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pid_tuner-0.1.2.tar.gz
  • Upload date:
  • Size: 11.7 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.2.tar.gz
Algorithm Hash digest
SHA256 ac9382e7d113bcfa3d1a401753edc5f2f7ab1a4cc1c2d63d041b2e8d771c4d40
MD5 c4a8e3f09f91e4b29b956c5836be3f93
BLAKE2b-256 e2f7ac951662354a49436b99ce4938dbd0ecb26a80360b9c36f668f71e651b0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pid_tuner-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 51773d2ebd03907214d8fabed107e1095760c89f07f7281b3649e3c19fd40a6a
MD5 4be4d4b140ab8a77b817392ce253df21
BLAKE2b-256 01205c1331e2581b9a1219c4469fbff2bff180026686a1b2393d21a48700ab6c

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