Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1612 | dongfang | 1 | #ifndef _INVENSENSE_H |
2 | #define _INVENSENSE_H |
||
3 | |||
4 | #include "sensors.h" |
||
5 | |||
6 | #define GYRO_HW_NAME "ISens" |
||
7 | |||
8 | /* |
||
9 | * Configuration for my prototype board with InvenSense gyros. |
||
10 | * The FC 1.3 board is installed upside down, therefore 2 acc. meters are reversed. |
||
11 | */ |
||
12 | #define ACC_REVERSE_ROLLAXIS yes |
||
13 | #define ACC_REVERSE_ZAXIS yes |
||
14 | |||
15 | /* |
||
16 | * The InvenSense gyros have a lower sensitivity than for example the ADXRS610s on the FC 2.0 ME, |
||
17 | * but they have a wider range too. |
||
18 | * 2mV/deg/s gyros and no amplifiers: |
||
19 | * H = 0.002 V / deg / s * 1 * 1024 / 3V = 0.6827 units/(deg/s) |
||
20 | */ |
||
21 | #define GYRO_HW_FACTOR 0.6827f |
||
22 | |||
23 | /* |
||
24 | * Correction factor - determined experimentally: Hold the copter in the hand, and turn it 90 degrees. |
||
25 | * If AnglePitch or AngleRoll in debug in MK-Tool changes by x degrees, multiply the value here by x/90. |
||
26 | * If the hardware related contants are set correctly, flight should be OK without bothering to |
||
27 | * make any adjustments here. It is only for luxury. |
||
28 | */ |
||
29 | #define GYRO_PITCHROLL_CORRECTION 0.93f |
||
30 | |||
31 | /* |
||
32 | * Same for yaw. |
||
33 | */ |
||
34 | #define GYRO_YAW_CORRECTION 0.97f |
||
35 | |||
36 | /* |
||
37 | * Yaw axis is reverse. |
||
38 | */ |
||
39 | #define GYRO_REVERSE_YAW yes |
||
40 | |||
41 | #endif |