sobri909 / ArcKit
- суббота, 5 августа 2017 г. в 03:14:11
Location and activity recording framework for iOS
A location and activity recording framework for iOS.
Raw (red) + Smoothed (blue) | Smoothed (blue) + Visits (orange) | Smoothed (blue) + Visits (orange) |
---|---|---|
The blue segments indicate locations that ArcKit determined to be moving. The orange segments indicate stationary. Note that locations inside buildings are more likely to classified as stationary, thus allowing location data to be more easily clustered into "visits".
Raw Locations | Smoothed (blue) + Stuck (orange) | Smoothed (blue) + Stuck (orange) |
---|---|---|
Location accuracy for this trip ranged from 30 to 100 metres, with minimal GPS line of sight and significant "urban canyon" effects (GPS blocked on both sides by tall buildings and blocked from above by an elevated rail line). However stationary / moving state detection was still achieved to an accuracy of 5 to 10 metres.
Note: The orange dots in the second screenshot indicate "stuck in traffic". The third screenshot shows the "stuck" segments as paths, for easier inspection.
pod 'ArcKit'
pod install
before buildingSee the demo app source in this repo for more complete code examples.
let locoManager = LocomotionManager.highlander
let noteCenter = NotificationCenter.default
let queue = OperationQueue.main
// watch for location updates
noteCenter.addObserver(forName: .locomotionSampleUpdated, object: nil, queue: queue) { _ in
print("rawLocation: \(locoManager.rawLocation)")
print("filteredLocation: \(locoManager.filteredLocation)")
print("locomotionSample: \(locoManager.locomotionSample())")
}
// start recording
locoManager.startCoreLocation()