CSSpatialProvider Class Reference

Inherits from NSObject
Declared in CSSpatialProvider.h

Overview

Class that provides data for the following sensors:

- Compass sensor (currently not implemented)
- Orientation sensor
- Accelerometer sensor
- Acceleration sensor
- Rotation sensor
- Jump sensor (legacy, should probably be avoided)

It polls at fixed intervals to collect data and subseuqently stores that data in the individual sensors. The settings below can be used to further specify its behavior.

Spatial settings

  • kCSSpatialSettingInterval
    Interval between sampling spatial (motion) data. Specified in seconds, by default set to 60 seconds.
  • kCSSpatialSettingFrequency
    Sample frequency of the motion data sampling. Specified in Herz. By default set to 50 Hz. Note that this is limited by hardware potential.
  • kCSSpatialSettingNrSamples
    Number of samples to collect for each sampling cycle. Specified in numbers of samples. By default set to 150 samples, this means 3 seconds of sampled data when using the standard of 50 Hz as sampling frequency.

– initWithCompass:orientation:accelerometer:acceleration:rotation:jumpSensor:

Init function taking the different sensors in which to store the data @param compass @param orientation @param accelerometer @param acceleration @param rotation @param jumpSensor

- (id)initWithCompass:(CSCompassSensor *)compass orientation:(CSOrientationSensor *)orientation accelerometer:(CSAccelerometerSensor *)accelerometer acceleration:(CSAccelerationSensor *)acceleration rotation:(CSRotationSensor *)rotation jumpSensor:(CSJumpSensor *)jumpSensor

Declared In

CSSpatialProvider.h

– poll

Poll the motion sensors once *

- (void)poll

Declared In

CSSpatialProvider.h