mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Correct leak rate computations on Welcome page
Welcome page was calculating current and 7-day averages using the "normal average" method, which averaged just the non-zero readings, giving excessively high numbers. Now computes using "weighted average" resulting in more meaningful numbers.
This commit is contained in:
parent
7aed374236
commit
678e0f9241
@ -300,8 +300,8 @@ QString Welcome::GenerateCPAPHTML()
|
|||||||
//EventDataType lat = day->timeAboveThreshold(CPAP_Leak, p_profile->cpap->leakRedline())/ 60.0;
|
//EventDataType lat = day->timeAboveThreshold(CPAP_Leak, p_profile->cpap->leakRedline())/ 60.0;
|
||||||
//EventDataType leaks = 1.0/hours * lat;
|
//EventDataType leaks = 1.0/hours * lat;
|
||||||
|
|
||||||
EventDataType leak = day->avg(CPAP_Leak);
|
EventDataType leak = day->wavg(CPAP_Leak);
|
||||||
EventDataType leakdays = p_profile->calcAvg(CPAP_Leak, MT_CPAP, starttime, endtime);
|
EventDataType leakdays = p_profile->calcWavg(CPAP_Leak, MT_CPAP, starttime, endtime);
|
||||||
|
|
||||||
if ((leak < leakdays) && ((leakdays - leak) >= 0.1)) {
|
if ((leak < leakdays) && ((leakdays - leak) >= 0.1)) {
|
||||||
comp = under;
|
comp = under;
|
||||||
|
Loading…
Reference in New Issue
Block a user