Show boron and measured power on dashboard
This commit is contained in:
@@ -425,6 +425,8 @@ class ReactorDashboard:
|
||||
("Rod Mode", "AUTO" if not self.reactor.control.manual_control else "MANUAL"),
|
||||
("Setpoint", f"{self.reactor.control.setpoint_mw:7.0f} MW"),
|
||||
("Reactivity", f"{state.core.reactivity_margin:+.4f}"),
|
||||
("Boron", f"{state.boron_ppm:7.1f} ppm"),
|
||||
("P(meas)", f"{self._measured_power(state):6.1f} MW"),
|
||||
],
|
||||
)
|
||||
left_y = self._draw_section(
|
||||
@@ -800,6 +802,14 @@ class ReactorDashboard:
|
||||
enthalpy_kjkg = (constants.STEAM_LATENT_HEAT / 1_000.0)
|
||||
return (enthalpy_kjkg * mass_flow) / 1_000.0
|
||||
|
||||
def _measured_power(self, state: PlantState) -> float:
|
||||
ctl = getattr(self, "reactor", None)
|
||||
if ctl and getattr(ctl, "control", None):
|
||||
filtered = getattr(ctl.control, "_filtered_power_mw", 0.0)
|
||||
if filtered > 0.0:
|
||||
return filtered
|
||||
return state.core.power_output_mw
|
||||
|
||||
def _desired_throttle(self, turbine_state) -> float:
|
||||
if not self.reactor.turbines:
|
||||
return 0.0
|
||||
|
||||
Reference in New Issue
Block a user