79,6 → 79,11 |
*/ |
#define GYRO_ACC_FACTOR ((GYRO_DEG_FACTOR_PITCHROLL) / (DEG_ACC_FACTOR)) |
|
#define PITCHROLLOVER180 (GYRO_DEG_FACTOR_PITCHROLL * 180L) |
#define PITCHROLLOVER360 (GYRO_DEG_FACTOR_PITCHROLL * 360L) |
#define YAWOVER180 (GYRO_DEG_FACTOR_YAW * 180L) |
#define YAWOVER360 (GYRO_DEG_FACTOR_YAW * 360L) |
|
/* |
* Rotation rates |
*/ |
88,25 → 93,24 |
/* |
* Attitudes calculated by numerical integration of gyro rates |
*/ |
extern int32_t angle[2], yawAngleDiff; |
extern int32_t attitude[2]; |
|
// extern volatile int32_t ReadingIntegralTop; // calculated in analog.c |
// This is really a flight module thing, but it should be corrected along |
// when the yaw angle is corrected from the compass, and that happens here. |
// extern int32_t yawAngleDiff; |
|
/* |
* Compass navigation |
*/ |
extern int16_t magneticHeading; |
extern int16_t compassCourse; |
// extern int16_t compassOffCourse; |
extern uint8_t compassCalState; |
extern int32_t yawGyroHeading; |
extern int16_t yawGyroHeadingInDeg; |
extern uint8_t updateCompassCourse; |
//extern int16_t headingInDegrees; |
extern int32_t heading; |
extern uint16_t ignoreCompassTimer; |
extern uint16_t accVector; |
|
void updateCompass(void); |
extern int32_t targetHeading; |
|
|
/* |
* Dynamic gyro offsets. These are signed values that are subtracted from the gyro measurements, |
* to help canceling out drift and vibration noise effects. The dynamic offsets themselves |
143,4 → 147,6 |
*/ |
void calculateFlightAttitude(void); |
|
void attitude_resetHeadingToMagnetic(void); |
|
#endif //_ATTITUDE_H |