1 /* 2 * Copyright (C) 2011 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_LINEAR_ACCEL_HANDLE (ID_LA) 23 #define SENSORS_GRAVITY_HANDLE (ID_GR) 24 #define SENSORS_GYROSCOPE_HANDLE (ID_GY) 25 #define SENSORS_ACCELERATION_HANDLE (ID_A) 26 #define SENSORS_MAGNETIC_FIELD_HANDLE (ID_M) 27 #define SENSORS_ORIENTATION_HANDLE (ID_O) 28 /******************************************/ 29 //COMPASS_ID_AKM 30 #define COMPASS_AKM8975_RANGE (9830.0f) 31 #define COMPASS_AKM8975_RESOLUTION (0.285f) 32 #define COMPASS_AKM8975_POWER (10.0f) 33 //COMPASS_ID_AMI30X 34 #define COMPASS_AMI30X_RANGE (5461.0f) 35 #define COMPASS_AMI30X_RESOLUTION (0.9f) 36 #define COMPASS_AMI30X_POWER (0.15f) 37 //COMPASS_ID_AMI306 38 #define COMPASS_AMI306_RANGE (5461.0f) 39 #define COMPASS_AMI306_RESOLUTION (0.9f) 40 #define COMPASS_AMI306_POWER (0.15f) 41 //COMPASS_ID_YAS529 42 #define COMPASS_YAS529_RANGE (19660.0f) 43 #define COMPASS_YAS529_RESOLUTION (0.012f) 44 #define COMPASS_YAS529_POWER (4.0f) 45 //COMPASS_ID_YAS530 46 #define COMPASS_YAS530_RANGE (8001.0f) 47 #define COMPASS_YAS530_RESOLUTION (0.012f) 48 #define COMPASS_YAS530_POWER (4.0f) 49 //COMPASS_ID_HMC5883 50 #define COMPASS_HMC5883_RANGE (10673.0f) 51 #define COMPASS_HMC5883_RESOLUTION (10.0f) 52 #define COMPASS_HMC5883_POWER (0.24f) 53 //COMPASS_ID_LSM303DLH 54 #define COMPASS_LSM303DLH_RANGE (10240.0f) 55 #define COMPASS_LSM303DLH_RESOLUTION (1.0f) 56 #define COMPASS_LSM303DLH_POWER (1.0f) 57 //COMPASS_ID_LSM303DLM 58 #define COMPASS_LSM303DLM_RANGE (10240.0f) 59 #define COMPASS_LSM303DLM_RESOLUTION (1.0f) 60 #define COMPASS_LSM303DLM_POWER (1.0f) 61 //COMPASS_ID_MMC314X 62 #define COMPASS_MMC314X_RANGE (400.0f) 63 #define COMPASS_MMC314X_RESOLUTION (2.0f) 64 #define COMPASS_MMC314X_POWER (0.55f) 65 //COMPASS_ID_HSCDTD002B 66 #define COMPASS_HSCDTD002B_RANGE (9830.0f) 67 #define COMPASS_HSCDTD002B_RESOLUTION (1.0f) 68 #define COMPASS_HSCDTD002B_POWER (1.0f) 69 //COMPASS_ID_HSCDTD004A 70 #define COMPASS_HSCDTD004A_RANGE (9830.0f) 71 #define COMPASS_HSCDTD004A_RESOLUTION (1.0f) 72 #define COMPASS_HSCDTD004A_POWER (1.0f) 73 /*******************************************/ 74 //ACCEL_ID_LIS331 75 #define ACCEL_LIS331_RANGE (2.480f*GRAVITY_EARTH) 76 #define ACCEL_LIS331_RESOLUTION (.001f*GRAVITY_EARTH) 77 #define ACCEL_LIS331_POWER (1.0f) 78 //ACCEL_ID_LSM303DLX 79 #define ACCEL_LSM303DLX_RANGE (2.480f*GRAVITY_EARTH) 80 #define ACCEL_LSM303DLX_RESOLUTION (0.001f*GRAVITY_EARTH) 81 #define ACCEL_LSM303DLX_POWER (1.0f) 82 //ACCEL_ID_LIS3DH 83 #define ACCEL_LIS3DH_RANGE (2.480f*GRAVITY_EARTH) 84 #define ACCEL_LIS3DH_RESOLUTION (0.001f*GRAVITY_EARTH) 85 #define ACCEL_LIS3DH_POWER (1.0f) 86 //ACCEL_ID_KXSD9 87 #define ACCEL_KXSD9_RANGE (2.5006f*GRAVITY_EARTH) 88 #define ACCEL_KXSD9_RESOLUTION (0.001f*GRAVITY_EARTH) 89 #define ACCEL_KXSD9_POWER (1.0f) 90 //ACCEL_ID_KXTF9 91 #define ACCEL_KXTF9_RANGE (1.0f*GRAVITY_EARTH) 92 #define ACCEL_KXTF9_RESOLUTION (0.033f*GRAVITY_EARTH) 93 #define ACCEL_KXTF9_POWER (0.35f) 94 //ACCEL_ID_BMA150 95 #define ACCEL_BMA150_RANGE (2.0f*GRAVITY_EARTH) 96 #define ACCEL_BMA150_RESOLUTION (0.004f*GRAVITY_EARTH) 97 #define ACCEL_BMA150_POWER (0.2f) 98 //ACCEL_ID_BMA222 99 #define ACCEL_BMA222_RANGE (2.0f*GRAVITY_EARTH) 100 #define ACCEL_BMA222_RESOLUTION (0.001f*GRAVITY_EARTH) 101 #define ACCEL_BMA222_POWER (0.1f) 102 //ACCEL_ID_BMA250 103 #define ACCEL_BMA250_RANGE (2.0f*GRAVITY_EARTH) 104 #define ACCEL_BMA250_RESOLUTION (0.00391f*GRAVITY_EARTH) 105 #define ACCEL_BMA250_POWER (0.139f) 106 //ACCEL_ID_ADXL34X 107 #define ACCEL_ADXL34X_RANGE (2.0f*GRAVITY_EARTH) 108 #define ACCEL_ADXL34X_RESOLUTION (0.001f*GRAVITY_EARTH) 109 #define ACCEL_ADXL34X_POWER (1.0f) 110 //ACCEL_ID_MMA8450 111 #define ACCEL_MMA8450_RANGE (2.0f*GRAVITY_EARTH) 112 #define ACCEL_MMA8450_RESOLUTION (0.001f*GRAVITY_EARTH) 113 #define ACCEL_MMA8450_POWER (1.0f) 114 //ACCEL_ID_MMA845X 115 #define ACCEL_MMA845X_RANGE (2.0f*GRAVITY_EARTH) 116 #define ACCEL_MMA845X_RESOLUTION (0.001f*GRAVITY_EARTH) 117 #define ACCEL_MMA845X_POWER (1.0f) 118 //ACCEL_ID_MPU6050 119 #define ACCEL_MPU6050_RANGE (2.0f*GRAVITY_EARTH) 120 #define ACCEL_MPU6050_RESOLUTION (0.004f*GRAVITY_EARTH) 121 #define ACCEL_MPU6050_POWER (0.0f) 122 /******************************************/ 123 //GYRO MPU3050 124 #define RAD_P_DEG (3.14159f/180.0f) 125 #define GYRO_MPU3050_RANGE (2000.0f*RAD_P_DEG) 126 #define GYRO_MPU3050_RESOLUTION (32.8f*RAD_P_DEG) 127 #define GYRO_MPU3050_POWER (6.1f) 128 //GYRO MPU6050 129 #define GYRO_MPU6050_RANGE (2000.0f*RAD_P_DEG) 130 #define GYRO_MPU6050_RESOLUTION (16.4f*RAD_P_DEG) 131 #define GYRO_MPU6050_POWER (5.5f) 132 133 #endif 134 135