Classes
The following classes are available globally.
-
Undocumented
See moreDeclaration
Swift
public class ItemSegment: Equatable
-
The central class for interacting with LocoKit location and motion recording. All actions should be performed on the
LocomotionManager.highlander
singleton.Overview
LocomotionManager monitors raw device location and motion data and applies filtering and smoothing algorithms to produce a stream of high level
LocomotionSample
objects, a composite representation of the device and user’s location and activity state at each point in time.Locomotion samples include filtered and smoothed locations, the user’s moving or stationary state, current activity type (eg walking, running, cycling, etc), step hertz (ie walking, running, or cycling cadence), and more.
Energy Efficiency
LocomotionManager dynamically adjusts various device monitoring parameters, balancing current conditions and desired results to achieve the desired accuracy in the most energy efficient manner.
Starting and Stopping Recording
To start recording location and motion data call
startRecording()
, and callstopRecording()
to stop.Update Notifications
LocomotionManager will send
locomotionSampleUpdated
notifications via the system default NotificationCenter when each new location arrives.Raw, Filtered, and Smoothed Data
LocoKit provides three levels of location data: Raw CLLocations, filtered CLLocations, and high level location and activity state LocomotionSamples. See the documentation for
rawLocation
,filteredLocation
, andLocomotionSample
for details on each.Moving State
When each raw location arrives LocomotionManager updates its determination of whether the user is moving or stationary, based on changes between current and previous locations over time. The most up to date determination is available either from the
See moremovingState
property on the LocomotionManager, or on the latestlocomotionSample
. See themovingState
documentation for further details.Declaration
Swift
@objc public class LocomotionManager: NSObject
-
A composite, high level representation of the device’s location, motion, and activity states over a brief duration of time.
The current sample can be retrieved from
LocomotionManager.highlander.locomotionSample()
.Dynamic Sample Sizes
Each sample’s duration is dynamically determined, depending on the quality and quantity of available ocation and motion data. Samples sizes typically range from 10 to 60 seconds, however varying conditions can sometimes produce sample durations outside those bounds.
Higher quality and quantity of available data results in shorter sample durations, with more specific representations of single moments in time.
Lesser quality or quantity of available data result in longer sample durations, thus representing the average or most common states and location over the sample period instead of a single specific moment.
See moreDeclaration
Swift
open class LocomotionSample: ActivityTypeTrainable, TimelineObject, Codable
-
Undocumented
See moreDeclaration
Swift
open class Path: TimelineItem
-
Undocumented
See moreDeclaration
Swift
public class TimelineClassifier
-
The abstract base class for timeline items.
See moreDeclaration
Swift
open class TimelineItem: TimelineObject, Hashable, Comparable, Codable
-
Undocumented
See moreDeclaration
Swift
open class TimelineManager
-
An in-memory timeline data store. For persistent timeline data storage, see
See morePersistentTimelineStore
.Declaration
Swift
open class TimelineStore
-
Undocumented
See moreDeclaration
Swift
public class TimelineStoreCacheDelegate: NSObject, NSCacheDelegate
-
Undocumented
See moreDeclaration
Swift
open class Visit: TimelineItem
-
Undocumented
See moreDeclaration
Swift
open class PersistentPath: Path, PersistentObject
-
Undocumented
See moreDeclaration
Swift
open class PersistentSample: LocomotionSample, PersistentObject
-
Add some description here.
See moreDeclaration
Swift
open class PersistentTimelineManager: TimelineManager
-
Undocumented
See moreDeclaration
Swift
open class PersistentTimelineStore: TimelineStore
-
Undocumented
See moreDeclaration
Swift
open class PersistentVisit: Visit, PersistentObject