Subversion Repositories FlightCtrl

Rev

Rev 2102 | Rev 2106 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2102 Rev 2104
Line 58... Line 58...
58
 * respectively. This is = the number of occurences of each channel in the
58
 * respectively. This is = the number of occurences of each channel in the
59
 * channelsForStates array in analog.c.
59
 * channelsForStates array in analog.c.
60
 */
60
 */
61
#define GYRO_OVERSAMPLING 4
61
#define GYRO_OVERSAMPLING 4
Line 62... Line -...
62
 
-
 
63
//#define ACC_OVERSAMPLING_XY 2
-
 
64
//#define ACC_OVERSAMPLING_Z 1
-
 
65
 
62
 
66
/*
63
/*
67
 * The product of the 3 above constants. This represents the expected change in ADC value sums for 1 deg/s of rotation rate.
64
 * The product of the 3 above constants. This represents the expected change in ADC value sums for 1 deg/s of rotation rate.
68
 */
65
 */
Line 104... Line 101...
104
 * in filtering, and when a gyro becomes near saturated.
101
 * in filtering, and when a gyro becomes near saturated.
105
 * Maybe this distinction is not really necessary.
102
 * Maybe this distinction is not really necessary.
106
 */
103
 */
107
extern int16_t gyro_PID[3];
104
extern int16_t gyro_PID[3];
108
extern int16_t gyro_ATT[3];
105
extern int16_t gyro_ATT[3];
-
 
106
extern int16_t gyroD[3];
-
 
107
 
109
#define GYRO_D_WINDOW_LENGTH 8
108
#define GYRO_D_WINDOW_LENGTH 8
Line 110... Line 109...
110
 
109
 
111
extern int16_t gyroD[3];
110
extern uint16_t UBat;
Line 112... Line 111...
112
extern int16_t UBat;
111
extern uint16_t airspeed;
113
 
112
 
Line 114... Line 113...
114
// 1:11 voltage divider, 1024 counts per 3V, and result is divided by 3.
113
// 1:11 voltage divider, 1024 counts per 3V, and result is divided by 3.
115
#define UBAT_AT_5V (int16_t)((5.0 * (1.0/11.0)) * 1024 / (3.0 * 3))
-
 
116
 
-
 
Line 117... Line 114...
117
extern sensorOffset_t gyroOffset;
114
#define UBAT_AT_5V (int16_t)((5.0 * (1.0/11.0)) * 1024 / (3.0 * 3))
118
//extern sensorOffset_t accOffset;
115
 
119
//extern sensorOffset_t gyroAmplifierOffset;
116
extern sensorOffset_t gyroOffset;
120
 
117
 
Line 134... Line 131...
134
 * Diagnostics: Gyro noise level because of motor vibrations. The variables
131
 * Diagnostics: Gyro noise level because of motor vibrations. The variables
135
 * only really reflect the noise level when the copter stands still but with
132
 * only really reflect the noise level when the copter stands still but with
136
 * its motors running.
133
 * its motors running.
137
 */
134
 */
138
extern uint16_t gyroNoisePeak[3];
135
extern uint16_t gyroNoisePeak[3];
139
//extern uint16_t accNoisePeak[3];
-
 
Line 140... Line 136...
140
 
136
 
141
/*
137
/*
142
 * Air pressure.
138
 * Air pressure.
143
 * The sensor has a sensitivity of 45 mV/kPa.
139
 * The sensor has a sensitivity of 45 mV/kPa.