STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
TypeK.hpp
Go to the documentation of this file.
1#pragma once
2
3// Type K thermocouple curve, shared by calibration_service (ESP32 TC boards) and t7_bridge.
4//
5// One set of numbers, used both ways. type_k_c_from_mv() is the NIST ITS-90 type K inverse that
6// calibration_service has always applied (moved here unchanged). type_k_mv_from_c(), needed for
7// cold-junction compensation, is that same function solved for millivolts rather than a second
8// polynomial, so the two directions cannot disagree with each other.
9
10namespace fsw {
11namespace calibration {
12
13/** Lowest and highest EMF the inverse covers (mV): -250 C to 1372 C. */
14constexpr double kTypeKMinMv = -6.404;
15constexpr double kTypeKMaxMv = 69.553;
16
17/** Temperature (C) for a type K EMF in mV, referenced to 0 C. NaN outside the curve. */
18double type_k_c_from_mv(double mv);
19
20/** EMF (mV, referenced to 0 C) a type K produces at `c`. NaN outside the curve. */
21double type_k_mv_from_c(double c);
22
23} // namespace calibration
24} // namespace fsw
Output smoothing for calibrated PT pressure, per sensor uid (ESP32 and LabJack T7 alike).
double type_k_mv_from_c(double c)
EMF (mV, referenced to 0 C) a type K produces at c.
Definition TypeK.cpp:38
double type_k_c_from_mv(double mv)
Temperature (C) for a type K EMF in mV, referenced to 0 C.
Definition TypeK.cpp:9
constexpr double kTypeKMaxMv
Definition TypeK.hpp:15
constexpr double kTypeKMinMv
Lowest and highest EMF the inverse covers (mV): -250 C to 1372 C.
Definition TypeK.hpp:14
Motorized ball valve position: raw ADC counts -> % open.