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

Webservice: Delta has no correlation to xDrips Delta #691

Open
swissalpine opened this issue Nov 23, 2018 · 8 comments
Open

Webservice: Delta has no correlation to xDrips Delta #691

swissalpine opened this issue Nov 23, 2018 · 8 comments

Comments

@swissalpine
Copy link

In the last days I remarked a strange behaviour: The Delta given by the Webservice differs from the right Delta shown in xDrip+. I'm not shure if that could be related to my change to G6 (native mode).
image
image

@swissalpine
Copy link
Author

To show that this is a serious problem which could cause therapy decissions see this difference (delta +15 vs. delta -6):
image
image
I'm not capable to look deeper in / understand your code but I'm wondering why you must calculate the deltas in the following line instead of displaying the allready calculated values:
WebServiceSGV.java, line 116:

item.put("delta", new BigDecimal(reading.getDg_slope() * 5 * 60 * 1000).setScale(3, BigDecimal.ROUND_HALF_UP));

@jamorham
Copy link
Collaborator

Can you let me know which collector you are using where you are seeing this?

@swissalpine
Copy link
Author

swissalpine commented Nov 30, 2018 via email

@dmelliott20
Copy link

I am seeing the same issue on delta values uploaded to NS.

@tolot27
Copy link
Collaborator

tolot27 commented Jan 6, 2022

@swissalpine Please can you test whether this problem still exists in the latest builds?

@swissalpine
Copy link
Author

Of course it persists, the problem was never fixed.
My guess is that xDrip+ does not deliver the delta calculated in the app, but the original Dexcom delta. There may be different calculations at work here: xDrip+, AAPS and since then my Garmin watchfaces calculate the delta from the last two values; it seems to me that the genuine Dexcom delta is calculated differently and includes the trend, so this delta does not look back like ours, but tries to guess a future trend.
However, the trend that xDrip+ sends to Nightscout with the genuine G6 sensor is different from the one displayed in the app.

@BaQs
Copy link

BaQs commented Dec 26, 2023

Hello,
Any news here ?
I think this is the root cause of spike-app being unable to predict anymore (it was working when master was xdrip4ios and not xdrip+)

@Navid200
Copy link
Collaborator

Navid200 commented Jun 8, 2024

Based on what I am seeing as the behavior of xDrip and everything I have read in all the issues in this repository, I can make the following conclusions:

  • xDrip submits to Nightscout/AAPS/webservice the exact same values it receives from G6 or G7 as the value of delta and as the trend arrow slope.

  • xDrip calculates the delta between its current reading and its previous reading and uses that as the delta and trend arow slope that it shows on the xDrip main screen.

Therefore, there is no discrepancy between what you would get from Dexcom app or Dexcom receiver and what xDrip submits to Nightscout or AAPS or webservice.

The only discrepancy is between what G6 or G7 reports as delta or trend arrow and what xDrip shows on its home screen.

If you disagree with any of that, please let me know.


If anyone likes to open a PR to add a setting to set xDrip to show the same trend arrow and delta as G6 or G7, please go ahead.
Please add the setting to the home shelf as that is where all the settings related to the trend arrow are.

This is not a bug. This is the behavior of xDrip.
I don't think we ever had to perfectly match the trend arrow and delta of an app that performs smoothing and as a result adds delay.
Yet, I understand if someone does not like the trend arrow to fluctuate so much. So, a new setting could address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants