These are chat archives for nightscout/intend-to-bolus
This is pretty much what I have done for an AR model for BG prediction. This is the links to the functions.
This is a step up from pseudocode, as I have not tested the code hardcore. It is bound to have both compile-time and runtime errors.
It uses numerical methods so it's likely heavy computation.
@danamlewis , I didn't send an email notification, unless gitter automatically did.
The old AP algorithm that I did back in like 2011 basically did correction basals, and it wasn't applied in real-time, so I had to sum the "correction basals" into a single bolus, which is an "illegal operation". Is that what you were looking for?
I haven't had a very productive day, fwiw. I need to finish up the AR stuff ASAP.