react-native-background-geolocation
react-native-background-geolocation copied to clipboard
Location updates jumps at high speeds
Your Environment
- Plugin version: 4.4.4
- Platform: iOS
- OS version: 15.4
- Device manufacturer / model: IOS Simulator, iPhone XS
- React Native version: 0.66.4
- Plugin config
{
// Geolocation Config
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
heartbeatInterval: 60,
// IOS
preventSuspend: true,
// Android
foregroundService: true,
fastestLocationUpdateInterval: 30 * 1000,
// Application config
debug: __DEV__,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE
}
Expected Behavior
Location updates should be uploaded consistently, according to the speed and elasticity parameters. In the configuration above I did not include those, but various testing was done playing with distanceFilter, disableElasticity and activityType all with the same result.
Actual Behavior
When the device is moving at high speed, the position register in background is not continuous. In the example above I'm using the iOS simulator but real tests have shown similar results
Context
I'm trying to register the device position in background. I'm not directly using the plugin https options because I need to process some data on every reading. The application uploads to an internal server with a simple axios call.
Please try to reproduce with the SampleApp (linked in the readme).
I do not experience this phenomenon.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.
Hi, we noticed a similar problem three times in the last year. Two times was problem detected on iPhone XR with iOS 14.7, BG version 3.10.0 and iOS 15.1 and BG version 4.3.0. Once was detected on iPhone 12 with iOS 15.5 and BG version 4.4.5. When we visualized obtained locations, we noticed that we had 1 minute gaps.
Before each gap we see in out application logs:
sample-rate: 0.2 | M7 DISABLED
At the end of gap we see this:
Location-services: ON
During gap no onLocation event occured, but messages like these are repeated:
📍<+38.01695416,+13.94085764> +/- 4.75m (speed 18.33 mps / course 226.88) @ 31/05/2022, 13:00:45 Central European Summer Time Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.1s stoppedAt is set. Bailing out
We still don't know what cause this behaviour :(
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.