Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1775 - 1
/*
1612 dongfang 2
#ifndef _INVENSENSE_H
3
#define _INVENSENSE_H
4
 
5
#include "sensors.h"
6
 
7
#define GYRO_HW_NAME "ISens"
1646 - 8
 
1775 - 9
/ *
1612 dongfang 10
 * The InvenSense gyros have a lower sensitivity than for example the ADXRS610s on the FC 2.0 ME,
11
 * but they have a wider range too.
12
 * 2mV/deg/s gyros and no amplifiers:
13
 * H = 0.002 V / deg / s * 1 * 1024 / 3V = 0.6827 units/(deg/s)
1775 - 14
 * /
1612 dongfang 15
#define GYRO_HW_FACTOR 0.6827f
16
 
1775 - 17
/ *
1612 dongfang 18
 * Correction factor - determined experimentally: Hold the copter in the hand, and turn it 90 degrees.
19
 * If AnglePitch or AngleRoll in debug in MK-Tool changes by x degrees, multiply the value here by x/90.
20
 * If the hardware related contants are set correctly, flight should be OK without bothering to
21
 * make any adjustments here. It is only for luxury.
1775 - 22
 * /
1612 dongfang 23
#define GYRO_PITCHROLL_CORRECTION 0.93f
24
 
1775 - 25
/ *
1612 dongfang 26
 * Same for yaw.
1775 - 27
 * /
1612 dongfang 28
#define GYRO_YAW_CORRECTION 0.97f
29
#endif
1775 - 30
*/