mirror of https://github.com/ArduPilot/ardupilot
AHRS: avoid a compiler bug in quaternion code
Having _wind in the AP_AHRS class causes a register allocation error when building the Quaternion code with some versions of avr-gcc. Quite bizarre.
This commit is contained in:
parent
455cfa4caa
commit
562069cbd7
|
@ -104,10 +104,11 @@ public:
|
||||||
|
|
||||||
// return a wind estimation vector, in m/s
|
// return a wind estimation vector, in m/s
|
||||||
Vector3f wind_estimate(void) {
|
Vector3f wind_estimate(void) {
|
||||||
return _wind;
|
return Vector3f(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// pointer to compass object, if available
|
// pointer to compass object, if available
|
||||||
Compass * _compass;
|
Compass * _compass;
|
||||||
|
|
||||||
|
@ -131,9 +132,6 @@ protected:
|
||||||
// radians/s/s
|
// radians/s/s
|
||||||
float _gyro_drift_limit;
|
float _gyro_drift_limit;
|
||||||
|
|
||||||
// estimated wind in m/s
|
|
||||||
Vector3f _wind;
|
|
||||||
|
|
||||||
// acceleration due to gravity in m/s/s
|
// acceleration due to gravity in m/s/s
|
||||||
static const float _gravity = 9.80665;
|
static const float _gravity = 9.80665;
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,6 +53,11 @@ public:
|
||||||
// allow for runtime disabling of GPS usage for position
|
// allow for runtime disabling of GPS usage for position
|
||||||
AP_Int8 _gps_use;
|
AP_Int8 _gps_use;
|
||||||
|
|
||||||
|
// return a wind estimation vector, in m/s
|
||||||
|
Vector3f wind_estimate(void) {
|
||||||
|
return _wind;
|
||||||
|
}
|
||||||
|
|
||||||
// for holding parameters
|
// for holding parameters
|
||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
|
@ -131,6 +136,9 @@ private:
|
||||||
Vector3f _last_vel;
|
Vector3f _last_vel;
|
||||||
uint32_t _last_wind_time;
|
uint32_t _last_wind_time;
|
||||||
float _last_airspeed;
|
float _last_airspeed;
|
||||||
|
|
||||||
|
// estimated wind in m/s
|
||||||
|
Vector3f _wind;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AP_AHRS_DCM_H
|
#endif // AP_AHRS_DCM_H
|
||||||
|
|
Loading…
Reference in New Issue