ORKDeviceMotionRecorderConfiguration Class Reference

Inherits from ORKRecorderConfiguration : NSObject
Declared in ORKRecorder.h

The ORKDeviceMotionRecorderConfiguration class represents a configuration that records device motion data during an active step.

Device motion data is the processed motion data provided by CoreMotion and obtained from a CMMotionManager object. The data can include measures of the overall device orientation obtained from combining accelerometer, magnetometer, and gyroscope data.

Device motion data is serialized to JSON and returned as an ORKFileResult object. For details on the format, see CMDeviceMotion+ORKJSONDictionary.

To use a recorder, include its configuration in the recorderConfigurations property of an ORKActiveStep object, include that step in a task, and present it with a task view controller.

  frequency

The frequency of motion data collection in samples per second (Hz).

@property (nonatomic, readonly) double frequency

Declared In

ORKRecorder.h

– initWithIdentifier:frequency:

Returns an initialized device motion recorder configuration using the specified frequency.

- (instancetype)initWithIdentifier:(NSString *)identifier frequency:(double)frequency

Parameters

identifier

The unique identifier of the recorder configuration.

frequency

Motion data collection frequency in samples per second (Hz).

Return Value

An initialized device motion recorder configuration.

Discussion

This method is the designated initializer.

Declared In

ORKRecorder.h

– initWithCoder:

Returns a new device motion recorder configuration initialized from data in the given unarchiver.

- (instancetype)initWithCoder:(NSCoder *)aDecoder

Parameters

aDecoder

Coder from which to initialize the device motion recorder configuration.

Return Value

A new device motion recorder configuration.

Declared In

ORKRecorder.h