Skip to main content

no_std_generated_fixtures/tests/fixtures/
ntc_generated.rs

1// Auto-generated by ph-curves-gen. Do not edit.
2
3use ph_curves::{BoundaryBehavior, MonotonicDirection, ObservationGuardMetadata, PiecewiseLinearTransfer, TransferMetadata};
4
5#[rustfmt::skip]
6static NTC_10K_BETA_3950_INPUTS: [u16; 61] = [142, 152, 163, 175, 187, 200, 212, 226, 239, 254, 269, 285, 303, 320, 337, 357, 377, 398, 418, 441, 464, 512, 567, 625, 684, 749, 821, 887, 958, 1036, 1117, 1200, 1294, 1394, 1494, 1681, 1899, 2110, 2664, 2806, 2930, 3072, 3195, 3308, 3408, 3465, 3522, 3572, 3620, 3666, 3709, 3747, 3785, 3818, 3851, 3880, 3909, 3933, 3956, 3976, 3995];
7#[rustfmt::skip]
8static NTC_10K_BETA_3950_OUTPUTS: [i32; 61] = [124957, 122145, 119291, 116423, 113775, 111120, 108840, 106360, 104211, 101890, 99720, 97552, 95270, 93251, 91349, 89242, 87262, 85304, 83542, 81625, 79813, 76323, 72727, 69310, 66152, 62975, 59759, 57040, 54320, 51535, 48832, 46230, 43455, 40668, 38022, 33373, 28306, 23632, 11641, 8465, 5595, 2151, -1024, -4154, -7155, -8991, -10940, -12762, -14630, -16553, -18493, -20348, -22366, -24281, -26387, -28436, -30724, -32852, -35153, -37431, -39919];
9/// "ntc\_10k\_beta\_3950" sparse physical transfer function.
10///
11/// Source provenance: none declared.
12/// Representation: "NTC Beta divider: R0=10000 ohm, B=3950 K, T0=25 C, fixed=10000 ohm, ADC max=4095, topology=NtcToGround".
13/// Generation policy: requested interpolation error <= 50; max_knots = 256; below = error; above = error.
14/// Domain: 142..=3995 "adc\_code"; output: "degree\_celsius" x 1000.
15/// Knots: 61 (366 bytes array payload).
16/// Exhaustive numerical error: requested <= 50, achieved 48.418946 output quanta
17/// (conservative metadata bound 49) at input 539.
18/// This is table/quantization error against the configured ideal source, not total sensor accuracy.
19/// Observation guard: none.
20#[rustfmt::skip]
21pub const NTC_10K_BETA_3950: PiecewiseLinearTransfer<61> =
22PiecewiseLinearTransfer::new(&NTC_10K_BETA_3950_INPUTS, &NTC_10K_BETA_3950_OUTPUTS, MonotonicDirection::Decreasing)
23.with_boundaries(BoundaryBehavior::Error, BoundaryBehavior::Error);
24/// Metadata for [`NTC_10K_BETA_3950`].
25pub const NTC_10K_BETA_3950_METADATA: TransferMetadata = TransferMetadata {
26    input_unit: "adc_code",
27    output_unit: "degree_celsius",
28    output_scale: 1000,
29    domain_min: 142,
30    domain_max: 3995,
31    range_min: -39919,
32    range_max: 124957,
33    direction: MonotonicDirection::Decreasing,
34    knot_count: 61,
35    strictly_monotonic: true,
36    flat_segment_count: 0,
37    requested_max_error: 50,
38    achieved_max_error: 49,
39    worst_case_input: 539,
40    achieved_max_inverse_code_error: 0,
41};
42/// Optional observation-code guard for [`NTC_10K_BETA_3950`].
43///
44/// Classification of a code as saturation is declared consumer/device policy,
45/// not inferred from the integer value. The runtime getter and this constant agree.
46pub const NTC_10K_BETA_3950_OBSERVATION_GUARD: Option<ObservationGuardMetadata> = None;