1 /*
2 * Copyright (C) 2012 Invensense, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17 #ifndef INV_SENSOR_PARAMS_H
18 #define INV_SENSOR_PARAMS_H
19 
20 /* Physical parameters of the sensors supported by Invensense MPL */
21 #define SENSORS_ROTATION_VECTOR_HANDLE             (ID_RV)
22 #define SENSORS_GAME_ROTATION_VECTOR_HANDLE        (ID_GRV)
23 #define SENSORS_LINEAR_ACCEL_HANDLE                (ID_LA)
24 #define SENSORS_GRAVITY_HANDLE                     (ID_GR)
25 #define SENSORS_GYROSCOPE_HANDLE                   (ID_GY)
26 #define SENSORS_RAW_GYROSCOPE_HANDLE               (ID_RG)
27 #define SENSORS_ACCELERATION_HANDLE                (ID_A)
28 #define SENSORS_MAGNETIC_FIELD_HANDLE              (ID_M)
29 #define SENSORS_RAW_MAGNETIC_FIELD_HANDLE          (ID_RM)
30 #define SENSORS_ORIENTATION_HANDLE                 (ID_O)
31 #define SENSORS_SIGNIFICANT_MOTION_HANDLE          (ID_SM)
32 #define SENSORS_PEDOMETER_HANDLE                   (ID_P)
33 #define SENSORS_STEP_COUNTER_HANDLE                (ID_SC)
34 #define SENSORS_GEOMAGNETIC_ROTATION_VECTOR_HANDLE (ID_GMRV)
35 #define SENSORS_PRESSURE_HANDLE                    (ID_PS)
36 #define SENSORS_FLUSH_COMPLETE                     (ID_FC)
37 #define SENSORS_SCREEN_ORIENTATION_HANDLE          (ID_SO)
38 
39 /******************************************/
40 /******************************************/
41 //MPU9350 INV_COMPASS
42 #define COMPASS_MPU9350_RANGE           (9830.f)
43 #define COMPASS_MPU9350_RESOLUTION      (0.15f)
44 #define COMPASS_MPU9350_POWER           (10.f)
45 #define COMPASS_MPU9350_MINDELAY        (1000)
46 //MPU9250 INV_COMPASS
47 #define COMPASS_MPU9250_RANGE           (9830.f)
48 #define COMPASS_MPU9250_RESOLUTION      (0.15f)
49 #define COMPASS_MPU9250_POWER           (10.f)
50 #define COMPASS_MPU9250_MINDELAY        (10000)
51 //MPU9150 INV_COMPASS
52 #define COMPASS_MPU9150_RANGE           (9830.f)
53 #define COMPASS_MPU9150_RESOLUTION      (0.285f)
54 #define COMPASS_MPU9150_POWER           (10.f)
55 #define COMPASS_MPU9150_MINDELAY        (10000)
56 //COMPASS_ID_AK8975
57 #define COMPASS_AKM8975_RANGE           (9830.f)
58 #define COMPASS_AKM8975_RESOLUTION      (0.285f)
59 #define COMPASS_AKM8975_POWER           (10.f)
60 #define COMPASS_AKM8975_MINDELAY        (10000)
61 //COMPASS_ID_AK8963C
62 #define COMPASS_AKM8963_RANGE           (9830.f)
63 #define COMPASS_AKM8963_RESOLUTION      (0.15f)
64 #define COMPASS_AKM8963_POWER           (10.f)
65 #define COMPASS_AKM8963_MINDELAY        (10000)
66 //COMPASS_ID_AMI30X
67 #define COMPASS_AMI30X_RANGE            (5461.f)
68 #define COMPASS_AMI30X_RESOLUTION       (0.9f)
69 #define COMPASS_AMI30X_POWER            (0.15f)
70 //COMPASS_ID_AMI306
71 #define COMPASS_AMI306_RANGE            (5461.f)
72 #define COMPASS_AMI306_RESOLUTION       (0.9f)
73 #define COMPASS_AMI306_POWER            (0.15f)
74 #define COMPASS_AMI306_MINDELAY         (10000)
75 //COMPASS_ID_YAS529
76 #define COMPASS_YAS529_RANGE            (19660.f)
77 #define COMPASS_YAS529_RESOLUTION       (0.012f)
78 #define COMPASS_YAS529_POWER            (4.f)
79 //COMPASS_ID_YAS53x
80 #define COMPASS_YAS53x_RANGE            (8001.f)
81 #define COMPASS_YAS53x_RESOLUTION       (0.012f)
82 #define COMPASS_YAS53x_POWER            (4.f)
83 #define COMPASS_YAS53x_MINDELAY         (10000)
84 //COMPASS_ID_HMC5883
85 #define COMPASS_HMC5883_RANGE           (10673.f)
86 #define COMPASS_HMC5883_RESOLUTION      (10.f)
87 #define COMPASS_HMC5883_POWER           (0.24f)
88 //COMPASS_ID_LSM303DLH
89 #define COMPASS_LSM303DLH_RANGE         (10240.f)
90 #define COMPASS_LSM303DLH_RESOLUTION    (1.f)
91 #define COMPASS_LSM303DLH_POWER         (1.f)
92 //COMPASS_ID_LSM303DLM
93 #define COMPASS_LSM303DLM_RANGE         (10240.f)
94 #define COMPASS_LSM303DLM_RESOLUTION    (1.f)
95 #define COMPASS_LSM303DLM_POWER         (1.f)
96 //COMPASS_ID_MMC314X
97 #define COMPASS_MMC314X_RANGE           (400.f)
98 #define COMPASS_MMC314X_RESOLUTION      (2.f)
99 #define COMPASS_MMC314X_POWER           (0.55f)
100 //COMPASS_ID_HSCDTD002B
101 #define COMPASS_HSCDTD002B_RANGE        (9830.f)
102 #define COMPASS_HSCDTD002B_RESOLUTION   (1.f)
103 #define COMPASS_HSCDTD002B_POWER        (1.f)
104 //COMPASS_ID_HSCDTD004A
105 #define COMPASS_HSCDTD004A_RANGE        (9830.f)
106 #define COMPASS_HSCDTD004A_RESOLUTION   (1.f)
107 #define COMPASS_HSCDTD004A_POWER        (1.f)
108 /*******************************************/
109 //ACCEL_ID_MPU6500
110 #define ACCEL_MPU6500_RANGE             (2.f * GRAVITY_EARTH)
111 #define ACCEL_MPU6500_RESOLUTION        (0.004f * GRAVITY_EARTH)
112 #define ACCEL_MPU6500_POWER             (0.5f)
113 #define ACCEL_MPU6500_MINDELAY          (1000)
114 //ACCEL_ID_MPU9350
115 #define ACCEL_MPU9350_RANGE             (2.f * GRAVITY_EARTH)
116 #define ACCEL_MPU9350_RESOLUTION        (0.004f * GRAVITY_EARTH)
117 #define ACCEL_MPU9350_POWER             (0.5f)
118 #define ACCEL_MPU9350_MINDELAY          (1000)
119 //ACCEL_ID_MPU9250
120 #define ACCEL_MPU9250_RANGE             (2.f * GRAVITY_EARTH)
121 #define ACCEL_MPU9250_RESOLUTION        (0.004f * GRAVITY_EARTH)
122 #define ACCEL_MPU9250_POWER             (0.5f)
123 #define ACCEL_MPU9250_MINDELAY          (1000)
124 //ACCEL_ID_MPU9150
125 #define ACCEL_MPU9150_RANGE             (2.f * GRAVITY_EARTH)
126 #define ACCEL_MPU9150_RESOLUTION        (0.004f * GRAVITY_EARTH)
127 #define ACCEL_MPU9150_POWER             (0.5f)
128 #define ACCEL_MPU9150_MINDELAY          (1000)
129 //ACCEL_ID_LIS331
130 #define ACCEL_LIS331_RANGE              (2.48f * GRAVITY_EARTH)
131 #define ACCEL_LIS331_RESOLUTION         (0.001f * GRAVITY_EARTH)
132 #define ACCEL_LIS331_POWER              (1.f)
133 //ACCEL_ID_LSM303DLX
134 #define ACCEL_LSM303DLX_RANGE           (2.48f * GRAVITY_EARTH)
135 #define ACCEL_LSM303DLX_RESOLUTION      (0.001f * GRAVITY_EARTH)
136 #define ACCEL_LSM303DLX_POWER           (1.f)
137 //ACCEL_ID_LIS3DH
138 #define ACCEL_LIS3DH_RANGE              (2.48f * GRAVITY_EARTH)
139 #define ACCEL_LIS3DH_RESOLUTION         (0.001f * GRAVITY_EARTH)
140 #define ACCEL_LIS3DH_POWER              (1.f)
141 //ACCEL_ID_KXSD9
142 #define ACCEL_KXSD9_RANGE               (2.5006f * GRAVITY_EARTH)
143 #define ACCEL_KXSD9_RESOLUTION          (0.001f * GRAVITY_EARTH)
144 #define ACCEL_KXSD9_POWER               (1.f)
145 //ACCEL_ID_KXTF9
146 #define ACCEL_KXTF9_RANGE               (1.f * GRAVITY_EARTH)
147 #define ACCEL_KXTF9_RESOLUTION          (0.033f * GRAVITY_EARTH)
148 #define ACCEL_KXTF9_POWER               (0.35f)
149 //ACCEL_ID_BMA150
150 #define ACCEL_BMA150_RANGE              (2.f * GRAVITY_EARTH)
151 #define ACCEL_BMA150_RESOLUTION         (0.004f * GRAVITY_EARTH)
152 #define ACCEL_BMA150_POWER              (0.2f)
153 //ACCEL_ID_BMA222
154 #define ACCEL_BMA222_RANGE              (2.f * GRAVITY_EARTH)
155 #define ACCEL_BMA222_RESOLUTION         (0.001f * GRAVITY_EARTH)
156 #define ACCEL_BMA222_POWER              (0.1f)
157 //ACCEL_ID_BMA250
158 #define ACCEL_BMA250_RANGE              (2.f * GRAVITY_EARTH)
159 #define ACCEL_BMA250_RESOLUTION         (0.00391f * GRAVITY_EARTH)
160 #define ACCEL_BMA250_POWER              (0.139f)
161 #define ACCEL_BMA250_MINDELAY           (1000)
162 //ACCEL_ID_ADXL34X
163 #define ACCEL_ADXL34X_RANGE             (2.f * GRAVITY_EARTH)
164 #define ACCEL_ADXL34X_RESOLUTION        (0.001f * GRAVITY_EARTH)
165 #define ACCEL_ADXL34X_POWER             (1.f)
166 //ACCEL_ID_MMA8450
167 #define ACCEL_MMA8450_RANGE             (2.f * GRAVITY_EARTH)
168 #define ACCEL_MMA8450_RESOLUTION        (0.001f * GRAVITY_EARTH)
169 #define ACCEL_MMA8450_POWER             (1.0f)
170 //ACCEL_ID_MMA845X
171 #define ACCEL_MMA845X_RANGE             (2.f * GRAVITY_EARTH)
172 #define ACCEL_MMA845X_RESOLUTION        (0.001f * GRAVITY_EARTH)
173 #define ACCEL_MMA845X_POWER             (1.f)
174 //ACCEL_ID_MPU6050
175 #define ACCEL_MPU6050_RANGE             (2.f * GRAVITY_EARTH)
176 #define ACCEL_MPU6050_RESOLUTION        (0.004f * GRAVITY_EARTH)
177 #define ACCEL_MPU6050_POWER             (5.5f)
178 #define ACCEL_MPU6050_MINDELAY          (1000)
179 /******************************************/
180 //GYRO MPU3050
181 #define RAD_P_DEG                       (3.14159f / 180.f)
182 #define GYRO_MPU3050_RANGE              (2000.f * RAD_P_DEG)
183 #define GYRO_MPU3050_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
184 #define GYRO_MPU3050_POWER              (6.1f)
185 #define GYRO_MPU3050_MINDELAY           (1000)
186 //GYRO MPU6050
187 #define GYRO_MPU6050_RANGE              (2000.f * RAD_P_DEG)
188 #define GYRO_MPU6050_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
189 #define GYRO_MPU6050_POWER              (5.5f)
190 #define GYRO_MPU6050_MINDELAY           (1000)
191 //GYRO MPU9150
192 #define GYRO_MPU9150_RANGE              (2000.f * RAD_P_DEG)
193 #define GYRO_MPU9150_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
194 #define GYRO_MPU9150_POWER              (5.5f)
195 #define GYRO_MPU9150_MINDELAY           (1000)
196 //GYRO MPU9350
197 #define GYRO_MPU9350_RANGE              (2000.f * RAD_P_DEG)
198 #define GYRO_MPU9350_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
199 #define GYRO_MPU9350_POWER              (5.5f)
200 #define GYRO_MPU9350_MINDELAY           (1000)
201 //GYRO MPU9250
202 #define GYRO_MPU9250_RANGE              (2000.f * RAD_P_DEG)
203 #define GYRO_MPU9250_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
204 #define GYRO_MPU9250_POWER              (5.5f)
205 #define GYRO_MPU9250_MINDELAY           (1000)
206 //GYRO MPU6500
207 #define GYRO_MPU6500_RANGE              (2000.f * RAD_P_DEG)
208 #define GYRO_MPU6500_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
209 #define GYRO_MPU6500_POWER              (5.5f)
210 #define GYRO_MPU6500_MINDELAY           (1000)
211 //GYRO ITG3500
212 #define GYRO_ITG3500_RANGE              (2000.f * RAD_P_DEG)
213 #define GYRO_ITG3500_RESOLUTION         (2000.f / 32768.f * RAD_P_DEG)
214 #define GYRO_ITG3500_POWER              (5.5f)
215 #define GYRO_ITG3500_MINDELAY           (1000)
216 /******************************************/
217 //PRESSURE BMP280
218 #define PRESSURE_BMP280_RANGE           (1100.f)   // hpa
219 #define PRESSURE_BMP280_RESOLUTION      (0.0018f)  // in psi
220 #define PRESSURE_BMP280_POWER           (0.0248f)  // 0.00248mA
221 #define PRESSURE_BMP280_MINDELAY        (100000)   // 10Hz
222 #endif  /* INV_SENSOR_PARAMS_H */
223 
224