transistorsoft / transistorsoft/react-native-background-geolocation
Facing distance inaccuracy and kms spikes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 446
- PR merge metrics
- No merged PRs in 30d
Description
We're seeing odometer distance spikes on Android in production.
Actual routes of ~100–200 km are reporting odometer values in the thousands of km — one journey reported 9,397 km on a ~195 km drive. Attached are the map views of the recorded routes; the GPS trail itself is correct, only the odometer is wrong.
Looking at consecutive onLocation events, the odometer jumps forward by 5+ km thousands of times and goes negative an almost equal number of times, so it seems to oscillate rather than drift. Affected devices are realme RMX5250, realme RMX3842, samsung SM-M127G, iQOO I2126 and OnePlus CPH2793 (Android 13–16) — all manufacturers with aggressive background process management.
Our config:
{
reset: true,
geolocation: {
desiredAccuracy: DesiredAccuracy.High,
distanceFilter: 10,
stopTimeout: 1,
stationaryRadius: 15,
filter: {
policy: LocationFilterPolicy.Conservative,
useKalman: true,
kalmanProfile: KalmanProfile.Conservative,
trackingAccuracyThreshold: 50,
odometerAccuracyThreshold: 40,
maxImpliedSpeed: 40,
},
},
persistence: { persistMode: PersistMode.Location },
app: {
stopOnTerminate: false,
startOnBoot: true,
enableHeadless: true,
},
http: {
autoSync: true,
batchSync: true,
maxBatchSize: 50,
},
}
Start sequence is start() → changePace(true) → resetOdometer().
Can you help identify what would cause this? Happy to share raw event logs.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported start() → changePace(true) → resetOdometer() sequence and inspect consecutive onLocation events alongside the raw event logs. Reproduce using the listed Android devices and configuration, focusing on the repeated positive and negative odometer jumps. Done means identifying the source of the oscillation and documenting a verified correction or the evidence needed to proceed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100