Five simulated ECLSS sensors (O₂, CO₂, humidity, cabin pressure, temperature) each emit a noisy reading every tick. An exponentially weighted moving average (EWMA) smooths each stream and flags an anomaly the instant the smoothed value leaves a control band around the running mean:
S_t = λ·x_t + (1-λ)·S_(t-1)
σ_S = σ_x · sqrt( λ / (2-λ) ) (asymptotic EWMA std-dev)
Alarm if |S_t − μ| > L·σ_S
λ trades responsiveness for noise rejection: a small λ smooths harder but reacts slower to a real drift; L trades sensitivity for false-alarm rate. Inject Random Fault forces one stream into a step, drift or spike for a few seconds so you can watch the detector catch it (or miss it).
Every raw sample also has to leave the station. The downlink bandwidth slider caps how many samples/second can be sent to ground; anything the link can't carry queues in the onboard buffer (the glowing cylinder). If sensors generate data faster than downlink + local compression can drain it, the buffer fills and oldest samples are dropped — the same store-and-forward pressure real ISS/Orion telemetry systems deal with when high-rate biomedical or environmental logs compete for a fixed-bandwidth link.
- Sensor towers — height and colour track each stream's live EWMA value; a tower flashes red the instant its own alarm fires.
- Buffer cylinder — fill level is total queued samples ÷ buffer capacity; it drains at the downlink rate and grows at the combined sensor sample rate.
- False alarms — an alarm that fires with no active fault counted against the current λ/L setting, so you can see the real precision/recall trade-off of the detector.