Comments (3)
My thoughts on this:
Back in the day with Moves, I used this trick to make the Moves track more accurate. On long bus rides through the countryside for example, I'd have a long line without any detail with just Moves. If I was running a GPX-Recorder or Navigation app at the same time, the Moves track would be very detailed.
This came (and I'm assuming this) at now extra battery cost for Moves App.
I would appreciate if Arc wouldn't ditch any information that'd make the tracking more accurate.
from locokit.
@thoughtgap Yeah I've noticed a similar effect. Whichever app is requesting the highest location accuracy also benefits all the other apps. [Aside: Although it's not as symmetrical as you'd think - iOS seems to be doing more than just providing every app the best quality location data it has available].
I suspect the energy consumption problem will be a case of Arc/LocoKit getting much more location data than it needs.
If the locations are arriving at 1 Hz, that's ideal, and already more than enough for LocoKit. But if the locations start arriving at 2 Hz, then that's just a waste of energy as far as LocoKit is concerned. But LocoKit is still taking all those locations in, even if it doesn't need them. It's Kalman filtering them, updating the ActivityBrainSample (an internal mutable representation of a LocomotionSample), and all the rest.
So I think the thing to do will be to draw the line at 1 Hz, and either tell the CLLocationManager to defer locations beyond that, or just ignore them when they arrive (if the location deferral API doesn't play nice - I haven't tried it in a couple of years, so I can't remember the details).
I'll also probably experiment with restricting it back to 0.5 Hz (ie location updates only every 2 seconds), just for the fun of it, to see what happens. My hunch is it'll have no negative impact on the resulting data quality, and will result in lower energy consumption and longer battery life. But ... that's not the kind of change I'd want to ship without thorough testing 😉 So it'd just be a personal experiment, unless it proves to be super safe.
from locokit.
So the CLLocationManager "deferred locations" feature can't be used. It requires the desiredAccuracy setting to be set unnecessarily high (ie requesting kCLLocationAccuracyBest
or kCLLocationAccuracyBestForNavigation
).
Instead I've just made the LocomotionManager ignore incoming locations if they arrive too soon and aren't of higher accuracy than the previous.
from locokit.
Related Issues (20)
- Xcode 11, Swift 5.1 HOT 2
- The necessary unit tests should be created HOT 5
- Couldn't build LocoKit Develop branch with Xcode 11.2 HOT 1
- Couldn't build LocoKit Develop branch with Xcode 11.3 HOT 1
- Unable to build in Swift 5 HOT 1
- Battery usage optimization HOT 1
- Is TimelineManager still available? HOT 5
- LocoKit won't build on Apple Silicon Macs HOT 6
- LocoKit SPM resolve warning HOT 2
- ClassifierResults only returns one value: Car HOT 2
- Getting Only stationary activityType from most recent TimelineItem HOT 3
- Deleting TimelineItems HOT 5
- Xcode 13 / Swift 5.5 compatible LocoKitCore HOT 4
- Question for Histogram.probabilityFor HOT 2
- Latest 3.9.1 with iOS 16.4.1 extreme battery drain HOT 4
- Xcode 14.1 Simulator don't build
- Machine Learning Classifiers HOT 1
- The positioning will be erratic at night HOT 8
- LocoKit Service / server EOL announcement
- Activity types detection doesn't work out of the box. HOT 8
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 locokit.