For use with FreeAPS X.
You can copy and paste into FAX, but at your own risk, so please be careful!
Telegram group for interaction and sharing: https://t.me/middleware_freeaps_x
Chris_formula_autosensRatio.js
Chris' formula for dynamic ISF=277700 / (TDD * BG) is currently a challange to implement it in FreeAPS X (FAX) via middlware file due to missing TDD info in FAX.
Thus, it has been created an experimental formula by replacing TDD with autosensRatio resulting in the following formula: dISF=277700 / (adjustableFactor * autosensRatio * BG). Autosens Ratio value is visible in FAX > Settings > Insulin Sensitivities.
As autosens' typical values are between 07 and 1.2 (the limits are adjusted with preference settings autosens MAX/MIN), it has been added an adjustableFactor for tuning the formula. It's recommended to start with adjustableFactor = 25. Lower number = milder dynamic ISF profile.
In order to identify the optimal value of adjustableFactor, it has been created a simulation file Variable ISF simulation.numbers to simulate the dynamic ISF curve vs static ISF. AutosensRatio should be equal to 1.
Please note that this is an experimental approach, so be careful and use it at your own risk!