Metadata-Version: 2.4
Name: bhuvanesh-aerospace-controls
Version: 0.2.1
Summary: Bhuvanesh Aerospace Controls: dependency-free PID tools for drone students.
Author: Bhuvanesh
License-Expression: MIT
Keywords: aerospace,drone,quadrotor,pid,flight-control
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.9; extra == "dev"
Dynamic: license-file

# Bhuvanesh Aerospace Controls

`bhuvanesh` is a small, dependency-free Python library for learning and prototyping drone flight-control loops. The first release provides a bounded PID controller and an X-frame quadrotor attitude mixer. Every demo identifies the project as **Bhuvanesh Aerospace Controls**.

This project is for simulation and bench testing. Do not connect it to a flying aircraft without adding sensor validation, arming and disarming logic, watchdogs, failsafes, calibrated units, and hardware-in-the-loop testing.

## Install on Ubuntu

```bash
# Run these commands from the folder containing pyproject.toml.
cd /path/to/bhuvanesh-aerospace-controls
sudo apt update
sudo apt install -y python3 python3-venv python3-pip
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python -m pytest
```

If Ubuntu reports that `ensurepip` is unavailable, install the venv package
matching your Python minor version, then retry the venv command:

```bash
sudo apt install -y "python$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')-venv"
python3 -m venv .venv
```

## Quick start

```python
from bhuvanesh import Attitude, QuadrotorPID

controller = QuadrotorPID()
result = controller.update(
    target=Attitude(roll=5.0),
    measured=Attitude(roll=2.0),
    throttle=0.50,
    dt=0.01,
)
print(result.motors.as_tuple())
```

Run the included smoke demo:

```bash
python -m bhuvanesh.cli --roll 5 --throttle 0.5
# or, after installation:
bhuvanesh-demo --roll 5 --throttle 0.5
```

The PID output is bounded, integral windup is limited, and derivative action is based on measured motion to avoid a setpoint kick. Motor commands are normalized from 0 to 1.

## Windows and macOS

The package is pure Python and uses the same commands on Windows and macOS.

Windows PowerShell:

```powershell
py -m venv .venv
.venv\Scripts\Activate.ps1
py -m pip install bhuvanesh-aerospace-controls
py -m bhuvanesh --roll 5 --throttle 0.5
```

macOS Terminal:

```bash
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install bhuvanesh-aerospace-controls
python3 -m bhuvanesh --roll 5 --throttle 0.5
```
