Trying to figure out settings to get maximum intensity of the recorded points. The resulting path is very coarse and points frequency is way too low for the configuration parameters passed.
cordova -v): 6.3.1cordova platform ls): android 5.2.2, ios 4.2.1For Android and ANDROID_DISTANCE_FILTER_PROVIDER selected with stationary radius and distance filter set to 1, expect to get more than 400 points during 8.8 miles ride accomplished in about 1.5 hours.
route.zip
Ideally get points for each 1 meter (I understand that this is not realistic), but at least more often than 50 points per mile.
Got about 400 points per 8.8 miles.
Very low accuracy of the measurements. The idea of the application is to have maximum information about the track to be able to analyze every detail about the ride.
Try using ANDROID_ACTIVITY_PROVIDER it provides faster position updates.
hey @anatoly-khomenko these might help: providers and especially providers - distance filter
NOTE: distanceFilter is elastically auto-calculated by the plugin: When speed increases, distanceFilter increases; when speed decreases, so does distanceFilter.
@cordovapolymer @apptum thank you!
This helped on Android. I'm getting much more points now - about 180 per mile ( calculated for the long trip with different activities including car, walking, stationary).
Somehow I've missed the note in documentation.
Do you know by any chance how to get similar results in iOS?
Figured out for iOS as well.
The distanceFilter calculation algorithm here: is not suitable for our purpose. We had to comment out the whole calculation and return _config.distanceFilter instead. Along with using Fitness activity type and stationaryRadius=5 we got the satisfactory frequency of GPS points along the way.
Compare before:

and after:

Posted pull request here. @mauron85, please, consider merging.
Thank you!
@anatoly-khomenko I agree that distance filter is not suitable for all use cases. But I'm not going to merge this. The reason is that I would like to radically improve core functionality using Finite-state machine model.
@anatoly-khomenko did you manage to keep the GPS working on android even if you close the app?
Even this fork only gives me ios position updates every 30 sec. any clue why?! Android works well
@nschurmann yes, it worked for us from the beginning. That's actually the reason we use this version of plugin, not the default Cordova implementation.
The only issue was to use ANDROID_ACTIVITY_PROVIDER to have enough points per mile.
@mamartins iOS updates position basing on the distance filter, so please, check the value for it and if you move faster than distanceFilter meters per 30 seconds, than it should give you points more often.
Android returns position once per specified time if you use ANDROID_ACTIVITY_PROVIDER which I recommend if you need high precision for the track.
@mauron85 Thank you for reviewing my pull request. I understand that the idea behind this plugin is a bit different then precision position and speed tracking. Meanwhile we'll use the fork I've created for our application and will monitor your changes. May be in future we'll switch back to your fork (which I personally would prefer).
@anatoly-khomenko yes, I have distance filter to 1 and also the debug on, on xcode I can see the positions being recorded to the DB, they're simply not pushed. Only one every 30 sec is pushed
@mamartins did you manage to solve this issue?, also sending only one position every 30 seconds instead of everything
@anatoly-khomenko how did you manage to send all the positions at once to the server?, right now with this configuration and also returning the distance filter without calculation it stores in the database the positions, but it sends every 30 seconds or so the first position and the it pops it from the array.
@nschurmann check here:
https://github.com/mauron85/cordova-plugin-background-geolocation/issues/198
Notice: this issue has been closed because it has been reported for branch 2.x or later. It could be already fixed in v3 or is not relevant anymore. You may reopen this issue if it has been closed in error.