Skip to content

Commit

Permalink
Increase accuracy of mg/dl to mmol/l ratio
Browse files Browse the repository at this point in the history
Using a ratio of 18 mg/ml to 1 mmol/l causes NightScout to report different values compared Dexcom app/receivers.

A more accurate value is based on 0.0555 mmol/l to 1 mg/dl. The inverse is 18.018018018 mg/dl to 1 mmol/l

This puts the value closer to the Dexcom app/receiver. Affected values:

|mg/dl|  18|18.018018018|
|----:|---:|-----------:|
|  109| 6.1|         6.0|
|  118| 6.6|         6.5|
|  127| 7.1|         7.0|
|  136| 7.6|         7.5|
|  145| 8.1|         8.0|
|  154| 8.6|         8.5|
|  163| 9.1|         9.0|
|  172| 9.6|         9.5|
|  181|10.1|        10.0|
|  190|10.6|        10.5|
|  199|11.1|        11.0|
|  208|11.6|        11.5|
|  217|12.1|        12.0|
|  226|12.6|        12.5|
|  235|13.1|        13.0|
|  244|13.6|        13.5|
|  253|14.1|        14.0|
|  262|14.6|        14.5|
|  271|15.1|        15.0|
|  280|15.6|        15.5|
|  289|16.1|        16.0|
|  298|16.6|        16.5|
|  307|17.1|        17.0|
|  309|17.2|        17.1|
|  316|17.6|        17.5|
|  318|17.7|        17.6|
|  325|18.1|        18.0|
|  327|18.2|        18.1|
|  334|18.6|        18.5|
|  336|18.7|        18.6|
|  343|19.1|        19.0|
|  345|19.2|        19.1|
|  352|19.6|        19.5|
|  354|19.7|        19.6|
|  361|20.1|        20.0|
|  363|20.2|        20.1|
|  370|20.6|        20.5|
|  372|20.7|        20.6|
|  379|21.1|        21.0|
|  381|21.2|        21.1|
|  388|21.6|        21.5|
|  390|21.7|        21.6|
|  397|22.1|        22.0|
|  399|22.2|        22.1|
  • Loading branch information
cpitchford authored Dec 2, 2021
1 parent 55e14fe commit 0bd983c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"HTTP_BAD_REQUEST": 400,
"ENTRIES_DEFAULT_COUNT" : 10,
"PROFILES_DEFAULT_COUNT" : 10,
"MMOL_TO_MGDL": 18,
"MMOL_TO_MGDL": 18.018018018,
"ONE_DAY" : 86400000,
"TWO_DAYS" : 172800000,
"FIFTEEN_MINUTES": 900000,
Expand Down

0 comments on commit 0bd983c

Please sign in to comment.