dive-math / ccr / classifyO2Cell
Function: classifyO2Cell()
classifyO2Cell(
input):O2CellVerdict|null
Defined in: ccr/o2-cells.ts:76
Classify an O₂ cell from its ambient-air and pure-O₂ millivolt readings.
Ambient handling:
- Manufacturer spec (10-14 Aii, 9-14 AST) is a hard UPPER limit — above ceiling is an automatic FAIL.
- Below the manufacturer floor is NOT an automatic fail — it's a caution flag on the ambient reading itself (ambientFlag: "low"), while the PASS/QUALIFIED/FAIL verdict still comes from the ratio-to-100%-O2 math, same as any other reading.
- 8 mV is an absolute floor regardless of the ratio.
Parameters
input
ambientMv
number
brand
o2Mv
number
Returns
O2CellVerdict | null
The verdict, or null when the ratio test does not apply (Greenflash).
Throws
If either reading is negative or not finite, or brand is not in O2_SENSOR_BRANDS.
Example
ts
classifyO2Cell({ brand: 'Aii', ambientMv: 11, o2Mv: 52.58 })?.status // 'PASS'