pub fn calculate_pid_parameters(
result: TuningResult,
template: &DcsTemplate,
) -> PidParametersExpand description
Converts a TuningResult into the PID parameters a specific DCS/PLC template expects.
Pure port of CalculatePIDparameters.
Order matters and matches the legacy app exactly: the integral/derivative unit conversion
(minutes -> seconds) happens before the reset-rate/reset-gain/derivative-gain type
conversion, so e.g. Ki ends up computed from Ti already expressed in seconds whenever
the template’s integral_unit is TimeUnit::Seconds — not from Ti in minutes.