Metadata-Version: 2.5
Name: bhuvanesh-aerospace-controls
Version: 0.6.0
Summary: Industry-style PID control and drone attitude simulation tools for aerospace education.
Project-URL: Homepage, https://github.com/BhuvaneshN09/bhuvanesh-aerospace-controls
Project-URL: Repository, https://github.com/BhuvaneshN09/bhuvanesh-aerospace-controls
Project-URL: Issues, https://github.com/BhuvaneshN09/bhuvanesh-aerospace-controls/issues
Author: Bhuvanesh Nallapati
License-Expression: MIT
License-File: LICENSE
Keywords: aerospace,control-systems,drone,education,flight-control,pid,simulation,uav
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24
Provides-Extra: all
Requires-Dist: matplotlib>=3.8; extra == 'all'
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Provides-Extra: plotting
Requires-Dist: matplotlib>=3.8; extra == 'plotting'
Description-Content-Type: text/markdown

# Bhuvanesh Aerospace Controls

`bhuvanesh-aerospace-controls` is an aerospace education package for PID control, drone attitude simulation, and simulation plotting. It is designed for students who want to learn how real flight-control ideas behave before they touch real hardware.

```bash
python3 -m pip install "bhuvanesh-aerospace-controls[plotting]"
```

```python
from bhuvanesh import PIDController, DroneAttitudePlant, simulate_attitude_hold

plant = DroneAttitudePlant(axis="roll", inertia=0.021)
result = simulate_attitude_hold(
    plant=plant,
    controller=PIDController(kp=1.9, ki=0.35, kd=0.12, output_limits=(-0.9, 0.9)),
    target_degrees=15,
    duration=4.0,
)

print(result.metrics())
```

## What Makes It Useful

- Production-style PID controller with output limits, integrator limits, derivative filtering, anti-windup, reset support, and fixed-step updates.
- Drone attitude plant model with inertia, damping, actuator saturation, actuator rate limits, torque bias, sensor noise, sensor bias, and injected disturbances.
- Simulation result object with rise time, settling time, overshoot, steady-state error, control effort, and saturation percentage.
- Plotting helpers for response curves, control effort, tracking error, and publication-ready comparison plots.
- CLI demo for quick experiments from a terminal.
- Cross-platform pure Python package for Ubuntu, macOS, and Windows.

## Safety Scope

This software is not flight-certified and is only a simulation/education package. It is not intended to be connected directly to an operational aircraft. A real flight-control system requires sensor validation, unit calibration, actuator checks, arming and disarming logic, watchdogs, failsafes, fault handling, hardware-in-the-loop testing, and vehicle-specific verification.

## Quick Simulation

```bash
bhuvanesh-drone-sim --axis roll --target 20 --duration 5 --plot
```

Without plotting:

```bash
bhuvanesh-drone-sim --axis pitch --target -10 --duration 3
```

## Plotting

```python
from bhuvanesh import PIDController, DroneAttitudePlant, simulate_attitude_hold
from bhuvanesh.plotting import plot_attitude_response

result = simulate_attitude_hold(
    DroneAttitudePlant(axis="yaw", inertia=0.035),
    PIDController(kp=1.4, ki=0.2, kd=0.08, output_limits=(-0.7, 0.7)),
    target_degrees=30,
    duration=6,
)

plot_attitude_response(result, show=True)
```

## Install For Development

Ubuntu:

```bash
sudo apt update
sudo apt install -y python3 python3-venv python3-pip
cd /home/bhuvaneshnallapati/Documents/ChatGPT/LarpDetector
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[all,dev]"
python3 -m pytest
```

macOS:

```bash
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -e ".[all,dev]"
python3 -m pytest
```

Windows PowerShell:

```powershell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
py -m pip install --upgrade pip
py -m pip install -e ".[all,dev]"
py -m pytest
```

## Build And Upload

```bash
python3 -m pip install --upgrade build twine
rm -rf dist
python3 -m build
python3 -m twine check dist/*
python3 -m twine upload dist/*
```
