OPEnSLab-OSU / ednaServer

GNU Affero General Public License v3.0
4 stars 0 forks source link

Moving Average for pressure sensor, global cut off for pressure sensor #49

Closed NathanJesudason closed 1 year ago

NathanJesudason commented 1 year ago

Describe the feature you'd like Moving average to transition out of sample state, once that reaches the global max (set in UI and stored in config.js) transition to next state. If the moving average goes way beyond safety parameters, then transition to idle (max pressure limit).

Basically sample cut off pressure and system max pressure checks with a moving average

Additional context Look into how we want to calculate moving average. Involves UI work for adding in a global state, and REST API for the pressure cutoffs. Remove pressure as a parameter from tasks.

AC: System stops when above safety pressure levels, Moving average acceptably handles spikes (should see steady trendlines in pressure graphs instead of large spikes), and User can set task global pressure. Tasks in sample state should transition once hitting that task global pressure.

NathanJesudason commented 1 year ago

Waiting for first round of testing

NathanJesudason commented 1 year ago

Change moving average to median sampling?

NathanJesudason commented 1 year ago

Cut off at 25, to leave 5 PSI for preservative. Make multiple branches with different pressure algorithms?

NathanJesudason commented 1 year ago

https://github.com/OPEnSLab-OSU/ednaServer/tree/49-moving-median

NathanJesudason commented 1 year ago

Skips over sample every time? This indicates that the way max system pressure or pressure reading is likely wrong