#[derive(Debug, Clone, Copy)]
pub struct DsfbConfig {
pub healthy_window: usize,
pub drift_window: usize,
pub slew_window: usize,
pub persistence_threshold: usize,
pub slew_persistence_threshold: usize,
pub envelope_sigma: f64,
pub drift_floor: f64,
pub slew_floor: f64,
pub channel_vote_fraction: f64,
pub max_channels: usize,
}
impl DsfbConfig {
#[must_use]
pub const fn cmapss_fd001_default() -> Self {
Self {
healthy_window: 20,
drift_window: 10,
slew_window: 10,
persistence_threshold: 15,
slew_persistence_threshold: 10,
envelope_sigma: 2.5,
drift_floor: 0.001,
slew_floor: 0.0005,
channel_vote_fraction: 0.3,
max_channels: 14,
}
}
#[must_use]
pub const fn cmapss_fd003_default() -> Self {
Self {
healthy_window: 20,
drift_window: 10,
slew_window: 10,
persistence_threshold: 15,
slew_persistence_threshold: 10,
envelope_sigma: 2.5,
drift_floor: 0.001,
slew_floor: 0.0005,
channel_vote_fraction: 0.3,
max_channels: 14,
}
}
#[must_use]
pub const fn cmapss_fd002_default() -> Self {
Self {
healthy_window: 25,
drift_window: 12,
slew_window: 12,
persistence_threshold: 18,
slew_persistence_threshold: 12,
envelope_sigma: 3.0,
drift_floor: 0.001,
slew_floor: 0.0005,
channel_vote_fraction: 0.3,
max_channels: 14,
}
}
}
impl Default for DsfbConfig {
fn default() -> Self {
Self::cmapss_fd001_default()
}
}