Windrose

CLUTGen

wkhadgar · 7 GitHub stars

Generates calibrated lookup tables at build time to turn raw ADC readings into physical units.

CLUTGen

wkhadgar · 7 GitHub stars

Generates calibrated lookup tables at build time to turn raw ADC readings into physical units.

  • Follows branch zephyr: each west update will get its latest commits. To stay on one version, it is recommended to use a release tag.

Install

# From the workspace root
curl -fsSL https://kartben.github.io/windrose/m/clutgen.yaml \
     -o zephyr/submanifests/clutgen.yaml
west update clutgen
west packages -m clutgen pip --install

Details

Revision
zephyr
License
Apache-2.0
Maintainers
@wkhadgar
Last commit
7 mo ago
Includes
Python requirements

About

CLUTGen automates the creation of Look-Up Tables for embedded systems, converting raw ADC readings into calibrated physical units such as temperature, pressure, or distance.

Given a set of calibration samples, CLUTGen fits an interpolation curve and generates a production-ready .c/.h pair with the full LUT precomputed for every possible ADC reading. At runtime, conversion is a single array index operation, so you can trade costly RAM operations from math.h and other similar libraries for a constant and predictable ROM cost.

This Zephyr module integrates CLUTGen directly into the west build system. LUT generation runs at CMake configure time and the generated files are automatically linked into the application.