Comments (12)
Hi all,
I have created a branch (trial/ActivityType), which should make testing activity type easier.
Activity type can be changed via preferences.
from ios-open-gpx-tracker.
Hi @jkristinsson, you are right, this is something that was reported by another user and I also noticed. I think that has started to happen lately.
My guts say that it may be something related with how the OS provides the location I reviewed the application code and Apple Developer docs, and my guess is that it may be related with activity type setting. I use the default one (other) which I understand it should not stick to the road... but more test and research is required.
A couple of links for future reference:
https://developer.apple.com/documentation/corelocation/cllocationmanager/1620567-activitytype
https://developer.apple.com/documentation/corelocation/clactivitytype?language=swift
The default value of this property is CLActivityType.other. Note that when the value of activityType is CLActivityType.fitness, indoor positioning is disabled.
Thanks, best, Juan.
from ios-open-gpx-tracker.
Yeah, I was also thinking it could be the desiredAccuracy
, but you seems to be using kCLLocationAccuracyBest
and not kCLLocationAccuracyBestForNavigation
which I would expect that behavior from.
https://developer.apple.com/documentation/corelocation/cllocationaccuracy
from ios-open-gpx-tracker.
Revisiting this issue, and after a couple of tests with current implementation which uses CLActivityType.other. My guesses are the following:
- Other seems to have some kind of logic to set one of the other statuses (fitness, automotiveNavigation, airborne)
- Some attributes that it uses are:
My current guess is that fitness mode may be the most close to user GPS real position, but tests within a car vs walking are required.
If the previous assumption is true. The solution may be to add a switch preference to allow user to change from other to fitness.
from ios-open-gpx-tracker.
Considering that the activity type is now user changeable from #113, I assume its ok to close this issue now.
from ios-open-gpx-tracker.
Just a question from a fellow developer, did you ever get this to work? I have problems with map matching / road snapping in my own app happening regardless of activity type used. I don't have any modern hardware to test on though, only iOS 10 and 11. Very hard to find information about this issue.
from ios-open-gpx-tracker.
There are some helpful insights on this blog: http://regex.info/blog/2015-12-03/2651, http://regex.info/blog/2016-01-19/2666.
from ios-open-gpx-tracker.
There are some helpful insights on this blog: http://regex.info/blog/2015-12-03/2651, http://regex.info/blog/2016-01-19/2666.
Thanks. I had actually found those blog posts before but they are from 2015-2016 and there have been a bunch of iOS versions since. I've searched the Internet quite thoroughly on this issue, and this is why I found this github issue which is one of the most recent references.
There are rather few mentions out there and I'm a bit surprised that it would not turn up more often if iOS location service is this quirky. I haven't found any official response from Apple either, ie official method to disable map matching / road snapping. I'll try to get hold of someone that has a recent iPhone so I can test with that. I suspect that maybe this problem has gone away with newer versions of the iOS (and that's why there are quite few mentions), but I haven't found any confirmation on that either.
from ios-open-gpx-tracker.
At the company where I work, we record driving trips for usage-based insurance. This snap behavior is alive and well on iOS 13, and it has not changed. And yes, information about it is incredibly sparse! I can't find anything either.
Furthermore, we recently observed that the GPS speed will snap to 0 when the device moves at around 1mps and when CoreMotion reports that it detects the automotive
activity type. This took us by surprise because we made the assumption that CoreLocation and CoreMotion were independent services, but they appear to work together under the hood.
from ios-open-gpx-tracker.
Thanks, very interesting... well, I guess if I as an app developer can't make it work in any different way, I just have to live with that the app works better on Android and make a note in the manual or something. I have made the app cross-platform using Cordova and I noted this behavior when I made a test bicycle ride with both an Android and iOS device. The Android followed the actual path (with the expected accuracy limitations), while the iOS device took some "creative" paths by following bigger nearby roads here and there and then jumping back to the actual location when getting far enough away from the big road.
I'm just a hobbyist, not much I can do to convince Apple to adjust their APIs. I wonder what the big players in fitness apps have done, like Strava, if they have the same problem in their app or if they've found some way around it. Dedicated GPS devices (Garmin, Wahoo etc) for fitness activities are very popular today though so maybe that's why there's not much mention about the phone not working well for that.
from ios-open-gpx-tracker.
from ios-open-gpx-tracker.
Hello again,
I found out the problem I had in my app. The Cordova plugin I was using had a bug, meaning that regardless of activityType setting it reset it to AutomotiveNavigation when calling Core Location, no wonder it snapped to roads.
With that fixed, Fitness seems to work without road snapping, at least from my brief testing. I'll report the bug upstream to the plugin maintainer. Sorry for messing about here, I should have debugged the plugin properly first...
from ios-open-gpx-tracker.
Related Issues (20)
- Map tiles are covering the track polyline on iOS 16 / Xcode 14.0 HOT 1
- iPhone 14 Pro series safe area misalignment
- Could you add a long interval mode like Google Maps Timeline HOT 1
- Wish: additional warning when cancelling recovery HOT 1
- Allow setting for accuracy when saving track HOT 2
- Auto-recover last track instead of asking
- Use a non-cache folder for keeping the cache
- Fix swiftlint in source code HOT 1
- Import GPX Tracks HOT 2
- Top labels hidden by Dynamic Island on version in App Store HOT 4
- SwiftUI rewrite for the watch app. HOT 2
- Wish: Apple Fitness integration HOT 1
- Search by location
- App Crash
- Data out of order if iPhone unloads app from memory HOT 1
- Issue after long recording session (data loss) HOT 1
- Feature Request: Second confirm for deleting GPX file HOT 1
- Feature Request: shortcut support (also for AW)
- Feature Request: PinπFor accurate moving position
- Bug: Weird GPX output caused by pausing and unpausing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios-open-gpx-tracker.