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_SCREEN_ORIENTATION_HANDLE (ID_SO) 37 38 /******************************************/ 39 //MPU9250 INV_COMPASS 40 #define COMPASS_MPU9250_RANGE (9830.f) 41 #define COMPASS_MPU9250_RESOLUTION (0.15f) 42 #define COMPASS_MPU9250_POWER (10.f) 43 #define COMPASS_MPU9250_MINDELAY (10000) 44 //MPU9150 INV_COMPASS 45 #define COMPASS_MPU9150_RANGE (9830.f) 46 #define COMPASS_MPU9150_RESOLUTION (0.285f) 47 #define COMPASS_MPU9150_POWER (10.f) 48 #define COMPASS_MPU9150_MINDELAY (10000) 49 //COMPASS_ID_AK8975 50 #define COMPASS_AKM8975_RANGE (9830.f) 51 #define COMPASS_AKM8975_RESOLUTION (0.285f) 52 #define COMPASS_AKM8975_POWER (10.f) 53 #define COMPASS_AKM8975_MINDELAY (10000) 54 //COMPASS_ID_AK8963C 55 #define COMPASS_AKM8963_RANGE (9830.f) 56 #define COMPASS_AKM8963_RESOLUTION (0.15f) 57 #define COMPASS_AKM8963_POWER (10.f) 58 #define COMPASS_AKM8963_MINDELAY (10000) 59 //COMPASS_ID_AMI30X 60 #define COMPASS_AMI30X_RANGE (5461.f) 61 #define COMPASS_AMI30X_RESOLUTION (0.9f) 62 #define COMPASS_AMI30X_POWER (0.15f) 63 //COMPASS_ID_AMI306 64 #define COMPASS_AMI306_RANGE (5461.f) 65 #define COMPASS_AMI306_RESOLUTION (0.9f) 66 #define COMPASS_AMI306_POWER (0.15f) 67 #define COMPASS_AMI306_MINDELAY (10000) 68 //COMPASS_ID_YAS529 69 #define COMPASS_YAS529_RANGE (19660.f) 70 #define COMPASS_YAS529_RESOLUTION (0.012f) 71 #define COMPASS_YAS529_POWER (4.f) 72 //COMPASS_ID_YAS53x 73 #define COMPASS_YAS53x_RANGE (8001.f) 74 #define COMPASS_YAS53x_RESOLUTION (0.012f) 75 #define COMPASS_YAS53x_POWER (4.f) 76 #define COMPASS_YAS53x_MINDELAY (10000) 77 //COMPASS_ID_HMC5883 78 #define COMPASS_HMC5883_RANGE (10673.f) 79 #define COMPASS_HMC5883_RESOLUTION (10.f) 80 #define COMPASS_HMC5883_POWER (0.24f) 81 //COMPASS_ID_LSM303DLH 82 #define COMPASS_LSM303DLH_RANGE (10240.f) 83 #define COMPASS_LSM303DLH_RESOLUTION (1.f) 84 #define COMPASS_LSM303DLH_POWER (1.f) 85 //COMPASS_ID_LSM303DLM 86 #define COMPASS_LSM303DLM_RANGE (10240.f) 87 #define COMPASS_LSM303DLM_RESOLUTION (1.f) 88 #define COMPASS_LSM303DLM_POWER (1.f) 89 //COMPASS_ID_MMC314X 90 #define COMPASS_MMC314X_RANGE (400.f) 91 #define COMPASS_MMC314X_RESOLUTION (2.f) 92 #define COMPASS_MMC314X_POWER (0.55f) 93 //COMPASS_ID_HSCDTD002B 94 #define COMPASS_HSCDTD002B_RANGE (9830.f) 95 #define COMPASS_HSCDTD002B_RESOLUTION (1.f) 96 #define COMPASS_HSCDTD002B_POWER (1.f) 97 //COMPASS_ID_HSCDTD004A 98 #define COMPASS_HSCDTD004A_RANGE (9830.f) 99 #define COMPASS_HSCDTD004A_RESOLUTION (1.f) 100 #define COMPASS_HSCDTD004A_POWER (1.f) 101 /*******************************************/ 102 //ACCEL_ID_MPU6500 103 #define ACCEL_MPU6500_RANGE (2.f * GRAVITY_EARTH) 104 #define ACCEL_MPU6500_RESOLUTION (0.004f * GRAVITY_EARTH) 105 #define ACCEL_MPU6500_POWER (0.5f) 106 #define ACCEL_MPU6500_MINDELAY (1000) 107 //ACCEL_ID_MPU9250 108 #define ACCEL_MPU9250_RANGE (2.f * GRAVITY_EARTH) 109 #define ACCEL_MPU9250_RESOLUTION (0.004f * GRAVITY_EARTH) 110 #define ACCEL_MPU9250_POWER (0.5f) 111 #define ACCEL_MPU9250_MINDELAY (1000) 112 //ACCEL_ID_MPU9150 113 #define ACCEL_MPU9150_RANGE (2.f * GRAVITY_EARTH) 114 #define ACCEL_MPU9150_RESOLUTION (0.004f * GRAVITY_EARTH) 115 #define ACCEL_MPU9150_POWER (0.5f) 116 #define ACCEL_MPU9150_MINDELAY (1000) 117 //ACCEL_ID_LIS331 118 #define ACCEL_LIS331_RANGE (2.48f * GRAVITY_EARTH) 119 #define ACCEL_LIS331_RESOLUTION (0.001f * GRAVITY_EARTH) 120 #define ACCEL_LIS331_POWER (1.f) 121 //ACCEL_ID_LSM303DLX 122 #define ACCEL_LSM303DLX_RANGE (2.48f * GRAVITY_EARTH) 123 #define ACCEL_LSM303DLX_RESOLUTION (0.001f * GRAVITY_EARTH) 124 #define ACCEL_LSM303DLX_POWER (1.f) 125 //ACCEL_ID_LIS3DH 126 #define ACCEL_LIS3DH_RANGE (2.48f * GRAVITY_EARTH) 127 #define ACCEL_LIS3DH_RESOLUTION (0.001f * GRAVITY_EARTH) 128 #define ACCEL_LIS3DH_POWER (1.f) 129 //ACCEL_ID_KXSD9 130 #define ACCEL_KXSD9_RANGE (2.5006f * GRAVITY_EARTH) 131 #define ACCEL_KXSD9_RESOLUTION (0.001f * GRAVITY_EARTH) 132 #define ACCEL_KXSD9_POWER (1.f) 133 //ACCEL_ID_KXTF9 134 #define ACCEL_KXTF9_RANGE (1.f * GRAVITY_EARTH) 135 #define ACCEL_KXTF9_RESOLUTION (0.033f * GRAVITY_EARTH) 136 #define ACCEL_KXTF9_POWER (0.35f) 137 //ACCEL_ID_BMA150 138 #define ACCEL_BMA150_RANGE (2.f * GRAVITY_EARTH) 139 #define ACCEL_BMA150_RESOLUTION (0.004f * GRAVITY_EARTH) 140 #define ACCEL_BMA150_POWER (0.2f) 141 //ACCEL_ID_BMA222 142 #define ACCEL_BMA222_RANGE (2.f * GRAVITY_EARTH) 143 #define ACCEL_BMA222_RESOLUTION (0.001f * GRAVITY_EARTH) 144 #define ACCEL_BMA222_POWER (0.1f) 145 //ACCEL_ID_BMA250 146 #define ACCEL_BMA250_RANGE (2.f * GRAVITY_EARTH) 147 #define ACCEL_BMA250_RESOLUTION (0.00391f * GRAVITY_EARTH) 148 #define ACCEL_BMA250_POWER (0.139f) 149 #define ACCEL_BMA250_MINDELAY (1000) 150 //ACCEL_ID_ADXL34X 151 #define ACCEL_ADXL34X_RANGE (2.f * GRAVITY_EARTH) 152 #define ACCEL_ADXL34X_RESOLUTION (0.001f * GRAVITY_EARTH) 153 #define ACCEL_ADXL34X_POWER (1.f) 154 //ACCEL_ID_MMA8450 155 #define ACCEL_MMA8450_RANGE (2.f * GRAVITY_EARTH) 156 #define ACCEL_MMA8450_RESOLUTION (0.001f * GRAVITY_EARTH) 157 #define ACCEL_MMA8450_POWER (1.0f) 158 //ACCEL_ID_MMA845X 159 #define ACCEL_MMA845X_RANGE (2.f * GRAVITY_EARTH) 160 #define ACCEL_MMA845X_RESOLUTION (0.001f * GRAVITY_EARTH) 161 #define ACCEL_MMA845X_POWER (1.f) 162 //ACCEL_ID_MPU6050 163 #define ACCEL_MPU6050_RANGE (2.f * GRAVITY_EARTH) 164 #define ACCEL_MPU6050_RESOLUTION (0.004f * GRAVITY_EARTH) 165 #define ACCEL_MPU6050_POWER (5.5f) 166 #define ACCEL_MPU6050_MINDELAY (1000) 167 /******************************************/ 168 //GYRO MPU3050 169 #define RAD_P_DEG (3.14159f / 180.f) 170 #define GYRO_MPU3050_RANGE (2000.f * RAD_P_DEG) 171 #define GYRO_MPU3050_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) 172 #define GYRO_MPU3050_POWER (6.1f) 173 #define GYRO_MPU3050_MINDELAY (1000) 174 //GYRO MPU6050 175 #define GYRO_MPU6050_RANGE (2000.f * RAD_P_DEG) 176 #define GYRO_MPU6050_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) 177 #define GYRO_MPU6050_POWER (5.5f) 178 #define GYRO_MPU6050_MINDELAY (1000) 179 //GYRO MPU9150 180 #define GYRO_MPU9150_RANGE (2000.f * RAD_P_DEG) 181 #define GYRO_MPU9150_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) 182 #define GYRO_MPU9150_POWER (5.5f) 183 #define GYRO_MPU9150_MINDELAY (1000) 184 //GYRO MPU9250 185 #define GYRO_MPU9250_RANGE (2000.f * RAD_P_DEG) 186 #define GYRO_MPU9250_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) 187 #define GYRO_MPU9250_POWER (5.5f) 188 #define GYRO_MPU9250_MINDELAY (1000) 189 //GYRO MPU6500 190 #define GYRO_MPU6500_RANGE (2000.f * RAD_P_DEG) 191 #define GYRO_MPU6500_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) 192 #define GYRO_MPU6500_POWER (5.5f) 193 #define GYRO_MPU6500_MINDELAY (1000) 194 //GYRO ITG3500 195 #define GYRO_ITG3500_RANGE (2000.f * RAD_P_DEG) 196 #define GYRO_ITG3500_RESOLUTION (2000.f / 32768.f * RAD_P_DEG) 197 #define GYRO_ITG3500_POWER (5.5f) 198 #define GYRO_ITG3500_MINDELAY (1000) 199 /******************************************/ 200 //PRESSURE BMP280 201 #define PRESSURE_BMP280_RANGE (1100.f) // hpa 202 #define PRESSURE_BMP280_RESOLUTION (0.0018f) // in psi 203 #define PRESSURE_BMP280_POWER (0.0248f) // 0.00248mA 204 #define PRESSURE_BMP280_MINDELAY (26700) // 26.7Hz 205 #endif /* INV_SENSOR_PARAMS_H */ 206 207