diff --git a/src/controller/model_utils/signal_reducer.rs b/src/controller/model_utils/signal_reducer.rs index 032fb19..17c198e 100644 --- a/src/controller/model_utils/signal_reducer.rs +++ b/src/controller/model_utils/signal_reducer.rs @@ -1,15 +1,19 @@ +#[allow(non_snake_case)] pub fn reactive_resistance_of_capacitor(Cm: f64, L: f64, f: f64) -> f64 { 1f64 / (2f64 * std::f64::consts::PI * f * Cm * L) } +#[allow(non_snake_case)] pub fn full_resistance_of_capacitor(Xc: f64, Rs: f64, Rm: f64, L: f64) -> f64 { (Xc.powf(2f64) + (Rs + Rm * L).powf(2f64)).sqrt() } +#[allow(non_snake_case)] pub fn voltage_from_signal_source(Vs: f64, Xc: f64, Z: f64) -> f64 { (Vs * Xc) / Z } +#[allow(non_snake_case)] pub fn coef_of_signal_reduce(Vs: f64, V: f64) -> f64 { Vs / V }