# SENSOR.CPP — reconstruction notes Built against the surviving 4.10 CODE header `CODE/BT/BT/SENSOR.HPP` (Sensor : PoweredSubsystem). Attributes RadarPercent / SelfTest / BadVoltage chain `PoweredSubsystem::NextAttributeID`. ## Reconstructed - Ctor: primes radarPercent=1, selfTest=False, badVoltage=False and installs `Sensor::SensorSimulation` as the per-frame Performance (unless the owner is a replicant copy, which is console-driven). - `TestClass` / `TestInstance` / `ResetToInitialState` / the shared-data statics. ## PARTIAL: Sensor::SensorSimulation (per-frame) The authentic `SensorSimulation` (BT411 @004b1c4c) does, each frame: 1. `PoweredSubsystem::PoweredSubsystemSimulation(time_slice)` (power/voltage tick), 2. `radarPercent = RadarBaseline - GetSubsystemDamageLevel()`, 3. gate on the electrical Ready state (`badVoltage`, zeroes radar if not Ready), 4. gate on the heat state — Normal / Degradation (`radar *= 0.5`) / Failure (radar 0, selfTest off). Steps 1/3/4 depend on the **power/heat per-frame simulation chain that is not yet reconstructed** — `PoweredSubsystem::PoweredSubsystemSimulation`, `Generator::GeneratorSimulation`, `HeatSink::HeatSinkSimulation`, `HeatWatcher::WatchSimulation`, `PowerWatcher::Simulation` are all staged `Fail`. None of those are installed as Performances yet (only Sensor installs one), so the roster otherwise ticks `DoNothingOnce`. Until the power/heat wave, `SensorSimulation` runs the one reconstructed input (step 2, using `MechSubsystem::GetSubsystemDamageLevel`, clamped ≥ 0) and reports the sensor healthy (selfTest=True, badVoltage=False). This is a **deliberately safe partial**: it keeps the engine's `Entity::PerformAndWatch` roster-tick path alive (it must not `Fail`, or the whole per-frame simulation aborts the frame the mission reaches RunningMission) while producing a real radar-capability value. Deepen it with the power/heat simulation wave. A gated one-shot (`BT_MECH_LOG`) logs the first Sensor frame — the marker that the entity/roster simulation has engaged (RunningMission).