# RIANN (Robust IMU-based Attitude Neural Network)


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

``` python
#hide
from riann.riann import *
```

## What is RIANN?

RIANN is a lightweight neural network implementation for estimating
orientation (attitude) from inertial measurement unit (IMU) data. It
processes accelerometer and gyroscope readings to provide
quaternion-based attitude estimation, optimized for real-time
applications.

## Key Features

- Fast and accurate quaternion-based attitude estimation
- Optimized for real-time processing with state preservation
- Supports both batch processing and step-by-step integration
- Robust against sensor noise and motion artifacts
- Simple Python API with minimal dependencies

## Installation

``` bash
pip install riann

or from source

```bash
git clone https://github.com/daniel-om-weber/riann.git
cd riann
pip install -e .

## Quickstart

::: {.cell}
``` {.python .cell-code}
import numpy as np
from riann.riann import RIANN

# Initialize RIANN
riann = RIANN()

# Prepare IMU data
acc = np.ones((100, 3))  # Accelerometer data (100 samples, XYZ axes)
gyr = np.zeros((100, 3)) # Gyroscope data (100 samples, XYZ axes)
fs = 200                 # Sampling rate in Hz

# Get attitude quaternions
attitude = riann.predict(acc, gyr, fs)
print(f"Output shape: {attitude.shape}")  # (100, 4) - 100 quaternions
```

<div class="cell-output cell-output-stdout">

    Output shape: (100, 4)

</div>

:::
