Metadata-Version: 2.1
Name: assault-and-battery
Version: 0.1.1
Summary: A battery discharge curve calculator slash torture test.
Home-page: https://gitlab.com/stavros/assault-and-battery/
License: AGPL-3.0-or-later
Author: Stavros Korokithakis
Author-email: hi@stavros.io
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: matplotlib (>=3.4.3,<4.0.0)
Requires-Dist: pyserial (>=3.5,<4.0)
Project-URL: Repository, https://gitlab.com/stavros/assault-and-battery/
Description-Content-Type: text/markdown

# Battery discharge calculator

This is a simple script that will calculate the discharge curve of a battery. It does
this by communicating with a flight controller running INAV (with calibrated voltage and
current sensors) with a constant load attached.

It reads the voltage, instant amperage, and Ah consumed, and writes the samples to a CSV
file for later plotting.


## Installation

Use pipx:

```bash
$ pipx install assault_and_battery
```

And run the script as:

```bash
$ assault --help
```

## Usage

Plug an FC with calibrated sensors to USB, making sure to either cut the VCC cable (or
put some tape over the VCC pin), or use Bluetooth, USB-Serial, or some other way that
doesn't power the FC. Also make sure to not have any ground loops.

Then, run the script and start your load. It will output a CSV file with the current
date and all the measurements.

To plot stuff, use `assault plot <csv file>`. You can delete the first few values if the
load hasn't ramped up, or if you want to get rid of starting noise. This will produce
a graph, that's about it.

