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

BUG: Location data recording cadence is unreliable - DHM-S1-14 #454

Closed
diarmidmackenzie opened this issue Apr 11, 2020 · 12 comments
Closed
Labels
Enhancement Enhancing an existing feature or a request tech debt Technical issues that we need to come back to

Comments

@diarmidmackenzie
Copy link

Minor variatons seen in my first test session, but other users have reported much more significant issues. Broad issue covering the whole topic,

Here's my intiial report.

https://docs.google.com/document/d/1Uh1A-h7Ddm6t-rAlHOM90xnsrkLEG9SGcTolf3uIbgQ/edit

[DHM-S1-14 - New 454] Gaps between records in the location data were highly variable: 300, 308, 318, even 518 seconds.

I also have this from Chris Wren, which suggests some more severe issues. His suggestions that we analyze broadly in test is worth following up on.

I noticed that it hasn't been taking up much battery lately, so I dumped my locations and discovered that it hasn't been collecting locations, and also that the exported file is pretty chewed up. It started recording March 31, 10am when I installed it, then it injected some nonsensical timestamps from March 15, then jumped back to March 31, recorded for a little over a day until April 1, 8pm and then stopped, but continued to record the identical timestamp and geolocation several thousand times until I launched the app on April 10, at which point it recorded one novel point. Many of the correct samples seem to be duplicated as well, but not all. So lots of issues there. How do you validate the export files? Do you routinely collect exports from the team to make sure they look right, or have some other testing harness? If it's helpful I put my timestamps in a sheet, here's a link.

@diarmidmackenzie
Copy link
Author

It would be good to start with a view from Dev on what the expected spec is here?

Should locations be logged every 300 seconds, like clockwork? Or is some variability expected?

What level of variability should we consider a bug?

I think the behaviour Chris reports is certainly bugged, but we don't know how widespread that is yet.

Once Dev has clarified what counts as a bug, we should probably aim for the test team to collect and analyze more data to assess the frequency of these problems.

@kenpugsley
Copy link
Collaborator

kenpugsley commented Apr 11, 2020

Great analysis. There was significant rework recently in this area ... notably #378 and #422 . Those will be included in the next beta (0.9.2) which we hope to have out very soon. Would you please retest on that version once we get it out - hopefully tonight or tomorrow.

@kenpugsley
Copy link
Collaborator

Should locations be logged every 300 seconds, like clockwork? Or is some variability expected?

We will get a spec with the expected logging written up for you.

There will be a fair amount of variation in the logged intervals, based upon many factors, and it is somewhat complex. For the most part, if the phone isn't moving significantly, we would expect the logging to be near the 5 minute interval, but can be longer. After the next patch the logging should never be faster than every 4 minutes.

@E3V3A
Copy link

E3V3A commented Apr 12, 2020

To state the obvious. The keywords here are "if the phone isn't moving significantly". So you always need to check the inertial sensors for type and duration of movement . I mentioned this here.

@diarmidmackenzie
Copy link
Author

Changed title to reflect that this issue is specifically about the cadence of logging, not the location data itself (tracked as another issue).

@diarmidmackenzie diarmidmackenzie changed the title BUG: Location data recording unreliable - DHM-S1-14 BUG: Location data recording cadence is unreliable - DHM-S1-14 Apr 13, 2020
@E3V3A
Copy link

E3V3A commented Apr 13, 2020

Just to be clear. When a gps data point is logged, is it using the internal phone clock for time stamp or that of the gps signal? It sound to me that you're using the phone clock, and that processing for this depends on how busy your processor is at the time. Since most people have just about every social network app running at the same time I'm not surprised that there are random lags as to when a data point is actually processed (timestamped).

Unfortunately you did not allow me any access to the google doc above so...not much to look at.

@AdamLeonSmith
Copy link

I have been testing with several users and can contribute more based on v1 installed via the play store.

User 1 - Samsung Galaxy S8

2020-04-25 15:04:21.418000, diff: 331410
2020-04-25 15:12:28.674000, diff: 487256
2020-04-25 15:20:40.598000, diff: 491924
2020-04-25 15:28:17.009000, diff: 456411
2020-04-25 15:34:18.778000, diff: 361769
2020-04-25 16:04:53.095000, diff: 1834317
2020-04-25 16:10:43.065000, diff: 349970
2020-04-25 16:21:26.172000, diff: 643107
2020-04-25 16:27:32.235000, diff: 366063
2020-04-25 16:34:13.883000, diff: 401648
2020-04-25 16:40:07.948000, diff: 354065
2020-04-25 16:45:07.948000, diff: 300000
2020-04-25 16:52:45.428000, diff: 457480
2020-04-25 16:58:46.802000, diff: 361374
2020-04-25 17:04:20.458000, diff: 333656
2020-04-25 17:16:24.900000, diff: 724442
2020-04-25 17:21:55.559000, diff: 330659
2020-04-25 17:33:53.504000, diff: 717945
2020-04-25 17:39:03.866000, diff: 310362
2020-04-25 17:49:30.185000, diff: 626319
2020-04-25 17:57:04.066000, diff: 453881
2020-04-25 18:02:19.389000, diff: 315323
2020-04-25 18:07:22.871000, diff: 303482
2020-04-25 18:13:44.344000, diff: 381473
2020-04-25 18:42:18.335000, diff: 1713991
2020-04-25 19:16:12.716000, diff: 2034381
2020-04-25 19:22:04.617000, diff: 351901
Mean average difference in data point timings: 9.401552976190477 mins
Standard deviation of data point timings: 7.812783252241782 mins

The tester recorded their location for a period of ~4 hours. On average the location was recorded every 9 minutes instead of 5. Additionally, travel (by car) took place between 1850 and 1913.

User 2 - Pixel 2

2020-04-25 09:49:08, diff: 527477
2020-04-25 09:54:24, diff: 316000
2020-04-25 10:06:31, diff: 727000
2020-04-25 10:12:01, diff: 330000
2020-04-25 10:21:52, diff: 591000
2020-04-25 10:29:56, diff: 484000
2020-04-25 10:34:56, diff: 300000
2020-04-25 10:45:12, diff: 616000
2020-04-25 10:50:18, diff: 306000
2020-04-25 10:55:19, diff: 301000
2020-04-25 11:00:22, diff: 303000
2020-04-25 11:05:25, diff: 303000
2020-04-25 11:15:04, diff: 579000
2020-04-25 11:22:46, diff: 462000
2020-04-25 11:30:36, diff: 470000
2020-04-25 11:38:39, diff: 483000
2020-04-25 11:43:40, diff: 301000
2020-04-25 11:52:00, diff: 500000
2020-04-25 11:58:40, diff: 400000
2020-04-25 12:03:41, diff: 301000
2020-04-25 12:09:19, diff: 338000
2020-04-25 12:18:42, diff: 563000
2020-04-25 12:28:41, diff: 599000
2020-04-25 12:38:40, diff: 599000
2020-04-25 12:43:40, diff: 300000
2020-04-25 12:48:40, diff: 300000
2020-04-25 12:53:41, diff: 301000
2020-04-25 12:58:43, diff: 302000
2020-04-25 13:05:27, diff: 404000
2020-04-25 13:10:29, diff: 302000
2020-04-25 13:15:29, diff: 300000
2020-04-25 13:25:28, diff: 599000
2020-04-25 13:31:20, diff: 352000
Mean average difference in data point timings: 6.793861274509805 mins
Standard deviation of data point timings: 2.146615253713806 mins

User 3 - Pixel 3a

User has been recording for several days so the full data is not included. Summary
Mean average difference in data point timings: 6.757129367327668 mins
Standard deviation of data point timings: 2.5519055032182916 mins

@diarmidmackenzie
Copy link
Author

diarmidmackenzie commented Apr 26, 2020

Several recent test reports of real-world GPS testng, all massively impacted by this issue & seeing GPS logging lock-ups of up to 8 hours.

https://pathcheck.atlassian.net/wiki/spaces/TEST/pages/24412196/25+April+2020+-+Real-world+GPS+test+1

https://pathcheck.atlassian.net/wiki/spaces/TEST/pages/24412463/25+April+2020+-+Real+world+GPS+%232

https://pathcheck.atlassian.net/wiki/spaces/TEST/pages/24543370/26+April+-+Real+World+GPS+Test+4

Results from these tests seem to point to there being multiple issues here, each with a different signature. Suggest we begin investigation of the issue in general, and then break out into multiple issues if needed.

This is now becoming urgent as it both blocks further testing, and it will impact testing at our initial prospects, and also be visible to anyone who downloads the APp from teh app store & chooses to test it out.

@summetj summetj added Enhancement Enhancing an existing feature or a request tech debt Technical issues that we need to come back to labels Apr 29, 2020
@summetj
Copy link
Collaborator

summetj commented Apr 29, 2020

Question: Does this impact iOS as well as Android?

I hope some of the work w.r.t. GPS inaccuracy may end up solving the cadence issue as well.

(Perhaps we should log more frequently (2.5 minutes?) and only save every 5 minutes or upon motion?) Getting a "ping" from accerometer data that the phone is actually moving could help us save power by NOT sampling location when the phone is not moving.)

If anybody who is working on the GPS logging system wants me to assign this issue to them please speak up....

@diarmidmackenzie
Copy link
Author

I don't have iOS - I have only analyzed one data set from iOS from Elvira, and it was perfect. More testing needed, though.

Using accelerometer, we should consider that mobvement & acceleration are not the same thing. People on e.g. trains may be moving fast with no trigger on the accelerometer.

We may be willing to trade off these cases for the improved battery life - but we should do so consciously.

@summetj
Copy link
Collaborator

summetj commented Apr 30, 2020

Using accelerometer, we should consider that movement & acceleration are not the same thing. People on e.g. trains may be moving fast with no trigger on the accelerometer.

There should still be enough jerk in trains/cars to trigger logging unless you are in a VERY smooth train with no corners or acceleration/deceleration ever...

@Patrick-Erichsen
Copy link
Contributor

Closing this issue out as we have work in-flight to improve both the reliability and accuracy of our location tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancing an existing feature or a request tech debt Technical issues that we need to come back to
Projects
None yet
Development

No branches or pull requests

6 participants