Update dependencies and do necessary migrations

This commit is contained in:
Zachary Levy
2026-03-03 17:19:10 -08:00
parent e06e76e46b
commit 18f7e19726
18 changed files with 140 additions and 111 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
mod part;
pub use part::*;
#[allow(unused_imports)]
pub use part::*;
+4 -4
View File
@@ -1,6 +1,6 @@
//! Note - Thermocouple conversion uses [f64] arithmetic internally.
use libm::pow;
use libm::exp;
use crate::error::InvalidValue;
use crate::quantity::{Celsius, MilliVolts, Quantity};
@@ -45,7 +45,7 @@ fn _convert(
Ok(Celsius(celsius as f32))
} else if mv >= 20.644 && mv <= 54.886 {
let celsius = 1.318058e2
let celsius = -1.318058e2
+ 4.830222E+1 * mv
+ -1.646031 * mv_pow2
+ 5.464731E-2 * mv_pow3
@@ -136,8 +136,8 @@ pub fn temp_to_voltage_poly(
Ok(MilliVolts(mv as f32))
} else if celsius >= 0.0 && celsius <= 1372.0 {
let base = celsius - 0.126968600000E+03;
let exp = -0.118343200000E-03 * (base * base);
let addition = pow(0.1185976, exp);
let exponent = -0.118343200000E-03 * (base * base);
let addition = 0.1185976 * exp(exponent);
let mv = -0.176004136860E-01
+ 0.389212049750E-01 * celsius