Calibration and lookup
Table.h
Heap-free lookup curves and maps for embedded C and C++.

At a glance
- Validated linear and bilinear interpolation
- Caller-owned C storage and compile-time-sized C++ storage
- Deterministic edge clamping with integer or float32 data
- Arduino, PlatformIO, CMake, and optional Rust integration
Technical overview
See the project documentation for current installation instructions, APIs, and compatibility details.
Table.h provides lookup curves and maps for ECU calibration, sensor conversion, control, and other embedded tasks. Its portable C11 core and C++11 facade interpolate values without allocating heap memory.
Axes are validated as strictly increasing, finite lookups clamp at the nearest edge, and immutable views can describe calibration held in flash. Applications can choose fixed-width integer or float32 storage independently for axes and cells.
#include <Table.h>
table::Curve<unsigned char, 4, short> throttle;
const short millivolts[] = {500, 1500, 2500, 4500};
const unsigned char percent[] = {0, 25, 55, 100};
throttle.init(millivolts, percent);
float result = 0.0F;
throttle.lookup(2000.0F, result);
Optional Protobuf support lets table snapshots take part in Programmor-compatible device configurations. The base library does not depend on serialisation.