Metadata-Version: 2.4
Name: flightlog
Version: 0.1.2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Requires-Dist: pyarrow>=14
Requires-Dist: mcp>=1.2 ; extra == 'mcp'
Requires-Dist: polars>=0.20 ; extra == 'polars'
Requires-Dist: pytest>=7 ; extra == 'test'
Requires-Dist: hypothesis>=6 ; extra == 'test'
Requires-Dist: jsonschema>=4 ; extra == 'test'
Requires-Dist: polars>=0.20 ; extra == 'test'
Requires-Dist: pymavlink>=2.4.40 ; extra == 'test'
Requires-Dist: mcp>=1.2 ; extra == 'test'
Provides-Extra: mcp
Provides-Extra: polars
Provides-Extra: test
Summary: ArduPilot DataFlash (.bin) and MAVLink .tlog flight logs as Arrow tables, flight-facts checks with ArduPilot wiki thresholds, and a read-only MCP server
Keywords: ardupilot,mavlink,dataflash,tlog,drone,arrow,pyarrow,polars,mcp
Author-email: Matt Busel <matt@busel.dev>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/Mattbusel/flightlog/tree/main/docs
Project-URL: Homepage, https://github.com/Mattbusel/flightlog
Project-URL: Issues, https://github.com/Mattbusel/flightlog/issues

# flightlog

ArduPilot DataFlash (`.bin`) and MAVLink telemetry (`.tlog`) logs as Arrow
tables, plus **flight-facts**: deterministic log checks whose thresholds are
quoted from the ArduPilot wiki, and a read-only MCP server.

```text
pip install flightlog            # tables and facts (needs pyarrow)
pip install "flightlog[mcp]"     # plus the flightlog-mcp server
```

Until `flightlog` is on PyPI, install the wheel from the GitHub release:
`pip install flightlog --find-links https://github.com/Mattbusel/flightlog/releases/expanded_assets/v0.1.2`
(add `"flightlog[mcp]"` or `"flightlog[polars]"` the same way).

```python
import flightlog

log = flightlog.open("00000001.BIN")
att = log.table("ATT")                 # pyarrow.Table, one row per message
imu = log.polars("IMU", instance=0)    # polars.DataFrame
print(log.params["FS_EKF_THRESH"])
for c in log.facts()["checks"]:
    print(c["id"], c["status"], c["summary"])
```

- Values match pymavlink's `DFReader` (scaled `c/C/e/E/L` fields, text cut
  at NUL); tested message for message against pymavlink 2.4.50 on ArduPilot
  SITL autotest logs and on damaged copies of them.
- Damaged logs: the reader resynchronizes like pymavlink and reports every
  skipped byte range in `log.integrity`.
- `flightlog.compat.DFReader_binary` gives pymavlink's `recv_match()` style
  on top of the same reader.
- `flightlog-mcp` serves logs to MCP clients (read-only, limited to the
  directories you pass).

Documentation: https://github.com/Mattbusel/flightlog/tree/main/docs

