Missed +predDev from IOBPredBG. Re-added.

This commit is contained in:
Tim Street 2022-09-13 18:42:56 +01:00 committed by GitHub
parent 786228189f
commit 546ff7b1e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -581,7 +581,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
var predDev = ci * ( 1 - Math.min(1,IOBpredBGs.length/(60/5)) );
//IOBpredBG = IOBpredBGs[IOBpredBGs.length-1] + predBGI + predDev;
IOBpredBG = IOBpredBGs[IOBpredBGs.length-1] + (round(( -iobTick.activity * (1800 / ( TDD * (Math.log((Math.max( IOBpredBGs[IOBpredBGs.length-1],39) / insulinDivisor ) + 1 ) ) ))
* 5 ),2));
* 5 ),2)) + predDev;
// calculate predBGs with long zero temp without deviations
//var ZTpredBG = ZTpredBGs[ZTpredBGs.length-1] + predZTBGI;