riann - RIANN (Robust IMU-based Attitude Neural Network)
Description: An efficient neural network for real-time attitude estimation using IMU data.

# RIANN (Robust IMU-based Attitude Neural Network)

An efficient neural network for real-time attitude estimation using IMU data.

    #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

    pip install riann

    or from source

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

    ## Quickstart

    ::: {#cell-10 .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

    Output shape: (100, 4)

:::