Avena Webapp API - v0.0.1
    Preparing search index...

    Type Alias CalibrationSpec

    CalibrationSpec:
        | { id?: string; type: "identity"; unit?: string }
        | { a: number; b: number; id?: string; type: "linear"; unit?: string }
        | { coeffs: number[]; id?: string; type: "polynomial"; unit?: string }

    Calibration formula plus its output unit and an optional name, tagged by type.

    Same JSON shape as the Rust CalibrationSpec, for example {"type":"linear","a":2.0,"b":-1.0,"unit":"kPa"}. Older configs may carry an id (the name of a preset it was copied from) and no unit.

    Type Declaration

    • { id?: string; type: "identity"; unit?: string }

      Leaves raw values unchanged; the unit is always volts.

      • Optionalid?: string

        Optional name from older configs; the exporter writes it in the calibration_id CSV column.

      • type: "identity"

        Formula tag.

      • Optionalunit?: string

        Unit of the output. Always V when written by the dashboard.

    • { a: number; b: number; id?: string; type: "linear"; unit?: string }

      Applies a * raw + b.

      • a: number

        Slope, in output units per volt.

      • b: number

        Offset, in output units.

      • Optionalid?: string

        Optional name from older configs; the exporter writes it in the calibration_id CSV column.

      • type: "linear"

        Formula tag.

      • Optionalunit?: string

        Unit the formula converts to, e.g. kPa or µε.

    • { coeffs: number[]; id?: string; type: "polynomial"; unit?: string }

      Applies coeffs[i] * raw ** i and sums each term.

      • coeffs: number[]

        Coefficients in ascending power order; coeffs[0] is the constant term.

      • Optionalid?: string

        Optional name from older configs; the exporter writes it in the calibration_id CSV column.

      • type: "polynomial"

        Formula tag.

      • Optionalunit?: string

        Unit the formula converts to, e.g. kPa or µε.