Skip to content

Extend predictive low alarm to Trio#680

Open
bjorkert wants to merge 1 commit into
devfrom
trio-predicted-low
Open

Extend predictive low alarm to Trio#680
bjorkert wants to merge 1 commit into
devfrom
trio-predicted-low

Conversation

@bjorkert

Copy link
Copy Markdown
Member

The low alarm's predictive look-ahead previously only worked with Loop, which publishes a single forecast. Trio publishes four separate forecasts (ZT, IOB, COB, UAM), so the predictive series was empty and the early low warning never fired.

This builds the alarm's forward series from the lowest of the four forecasts at each point in time, giving Trio an equivalent predictive-low signal: the alarm fires if any forecast dips to or below the threshold.

  • AlarmTask: new lowestForecast combiner and alarmPredictionData, which feeds the low condition for both Loop and Trio.
  • LowBgAlarmEditor: wording now refers to the forecast instead of Loop's prediction, and drops the "not available for Trio" note.
  • Tests for the forecast combining and the low condition across Loop and Trio inputs.

Also adds a missing import Foundation to SensorAgeConditionTests, which otherwise failed to compile under the current Xcode.

The low alarm's predictive look-ahead only worked with Loop, which
publishes a single forecast. Trio publishes four separate forecasts
(ZT, IOB, COB, UAM), so the predictive series was empty and the
look-ahead never fired.

Build the alarm's forward series from the lowest of the four forecasts
at each point in time, so the alarm fires if any forecast dips to or
below the threshold. Update the low alarm editor wording to refer to
the forecast rather than to Loop's prediction.

Add tests for the forecast combining and the low condition for both
Loop and Trio inputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant