Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculate average using system_time instead of assuming 1 data point every 5m #7

Open
scottleibrand opened this issue Jul 27, 2015 · 0 comments

Comments

@scottleibrand
Copy link
Contributor

Starting at https://github.com/openaps/openaps-js/blob/master/bin/determine-basal.js#L8 we determine the average delta over the last 3, 2, or 1 available CGM data points. In cases where CGM data is missing, this results in an overestimate of the (absolute value of the) average delta, which can cause OpenAPS to overreact until it gets more CGM data.

It would be better to calculate the average delta using the elapsed CGM system time between the two data points under comparison, instead of naively assuming each data point represents 5 minutes.

amazaheri pushed a commit that referenced this issue Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant