nicodel / Run-Bike-Hike

17 stars 4 forks source link

Frequency of adding new point should follow the positioning frequency's setting. #75

Closed Bonbadil closed 9 years ago

Bonbadil commented 9 years ago

Hello, A setting had been added to let the user choose the frequency of awakening the GPS chip. But the app still continuously add new point, even if no new positioning data is produced by the GPS. This point between two geolocalisations seem useless to me. For example, on my phone, I store 2 track's points by second, even with a positioning period set at 10 seconds. Why watchPosition still calling success callback so often if we set maximumAge to several seconds?

nicodel commented 9 years ago

HI, Are you sure about that ?? This sould not happen. I run tests on my side this afternoon.

nicodel commented 9 years ago

I have trouble to confirm this.

Bonbadil commented 9 years ago

Hello, I've tested again, with the last develop branch source, on my ZTE OpenC with FFOS 1.3. I've had to reset the app's data (there were a lot too much stored tracks (weirdly too much, another bug?) and I had difficulties to delete tracks quickly (another bug?)). So, I recorded 4 tracks, with 1 second, 5 seconds, 10 seconds and continued refresh of GPS positioning. Which give me 4 tracks (and another bug, my fault :p): image png 320 x 533 pixels Then, I open each track and look in the Firefox console the "t" line (from track-view.js:59 console.log()). I get for each one a data array with 42 elements. Precisely. So precisely that I tried a 10 seconds recording. I go back to the list, and get 9 tracks! The same bug than the first one? When I found the last recorded one, I found 22 elements in the data array.

So, it seem to me that the setting don't change the number of data point stored on my phone. And that there is some other problems. :p

nicodel commented 9 years ago

I got a look at the specs, and it depends on the device. If the device actually supports cache position, this should work. If not...