source: orbit/iOS/Orbit/CoreMotion.framework/Headers/CMDeviceMotion.h @ 876e42b

Servo
Last change on this file since 876e42b was 876e42b, checked in by Steve Castellotti <sc@…>, 7 years ago
  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 *  CMDeviceMotion.h
3 *  CoreMotion
4 *
5 *  Copyright (c) 2010 Apple Inc. All rights reserved.
6 *
7 */
8
9#import <CoreMotion/CMAccelerometer.h>
10#import <CoreMotion/CMAttitude.h>
11#import <CoreMotion/CMGyro.h>
12#import <CoreMotion/CMMagnetometer.h>
13
14/*
15 *  CMMagneticFieldCalibrationAccuracy
16 * 
17 *  Discussion:
18 *        CMMagneticFieldCalibrationAccuracy indicates the calibration
19 *        accuracy of a magnetic field estimate.
20 *
21 */
22typedef enum {
23        CMMagneticFieldCalibrationAccuracyUncalibrated = -1,
24        CMMagneticFieldCalibrationAccuracyLow,
25        CMMagneticFieldCalibrationAccuracyMedium,
26        CMMagneticFieldCalibrationAccuracyHigh
27} CMMagneticFieldCalibrationAccuracy;
28
29/*
30 *  CMCalibratedMagneticField
31 * 
32 *  Discussion:
33 *    A structure containing 3-axis calibrated magnetic field data
34 *    and an estimate of the accuracy of the calibration
35 *
36 *  Fields:
37 *    field:
38 *      The 3-axis calibrated magnetic field vector.
39 *    accuracy:
40 *      An estimate of the calibration accuracy.
41 */
42typedef struct {
43    CMMagneticField field;
44    CMMagneticFieldCalibrationAccuracy accuracy;
45} CMCalibratedMagneticField;
46
47
48/*
49 *  CMDeviceMotion
50 * 
51 *  Discussion:
52 *    A CMDeviceMotion object contains basic information about the device's
53 *              motion.
54 */
55NS_CLASS_AVAILABLE(NA,4_0)
56@interface CMDeviceMotion : CMLogItem
57{
58@private
59        id _internal;
60}
61
62/*
63 *  attitude
64 * 
65 *  Discussion:
66 *    Returns the attitude of the device.
67 *
68 */
69@property(readonly, nonatomic) CMAttitude *attitude;
70
71/*
72 *  rotationRate
73 * 
74 *  Discussion:
75 *    Returns the rotation rate of the device for devices with a gyro.
76 *
77 */
78@property(readonly, nonatomic) CMRotationRate rotationRate;
79
80/*
81 *  gravity
82 * 
83 *  Discussion:
84 *    Returns the gravity vector expressed in the device's reference frame. Note
85 *              that the total acceleration of the device is equal to gravity plus
86 *              userAcceleration.
87 *
88 */
89@property(readonly, nonatomic) CMAcceleration gravity;
90
91/*
92 *  userAcceleration
93 * 
94 *  Discussion:
95 *    Returns the acceleration that the user is giving to the device. Note
96 *              that the total acceleration of the device is equal to gravity plus
97 *              userAcceleration.
98 *
99 */
100@property(readonly, nonatomic) CMAcceleration userAcceleration;
101
102/*
103 *  magneticField
104 * 
105 *  Discussion:
106 *                      Returns the magnetic field vector with respect to the device for devices with a magnetometer.
107 *                      Note that this is the total magnetic field in the device's vicinity without device
108 *                      bias (Earth's magnetic field plus surrounding fields, without device bias),
109 *                      unlike CMMagnetometerData magneticField.
110 */
111@property(readonly, nonatomic) CMCalibratedMagneticField magneticField NS_AVAILABLE(NA,5_0);
112
113@end
Note: See TracBrowser for help on using the repository browser.