You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.1 KiB
56 lines
1.1 KiB
#ifndef __AP_AHRS_HIL_H__ |
|
#define __AP_AHRS_HIL_H__ |
|
|
|
class AP_AHRS_HIL : public AP_AHRS |
|
{ |
|
public: |
|
// Constructors |
|
AP_AHRS_HIL(AP_InertialSensor &ins, GPS *&gps) : |
|
AP_AHRS(ins, gps), |
|
_drift() |
|
{} |
|
|
|
// Accessors |
|
const Vector3f get_gyro(void) const { |
|
return _omega; |
|
} |
|
|
|
const Matrix3f &get_dcm_matrix(void) const { |
|
return _dcm_matrix; |
|
} |
|
|
|
// Methods |
|
void update(void) { |
|
_ins.update(); |
|
} |
|
|
|
void setHil(float roll, float pitch, float yaw, |
|
float rollRate, float pitchRate, float yawRate); |
|
|
|
// return the current estimate of the gyro drift |
|
const Vector3f &get_gyro_drift(void) const { |
|
return _drift; |
|
} |
|
|
|
// reset the current attitude, used on new IMU calibration |
|
void reset(bool recover_eulers=false) { |
|
} |
|
|
|
void reset_attitude(const float &_roll, const float &_pitch, const float &_yaw) { |
|
// not implemented - use setHil() |
|
} |
|
|
|
float get_error_rp(void) { |
|
return 0; |
|
} |
|
float get_error_yaw(void) { |
|
return 0; |
|
} |
|
|
|
private: |
|
Vector3f _omega; |
|
Matrix3f _dcm_matrix; |
|
Vector3f _drift; |
|
}; |
|
|
|
#endif // __AP_AHRS_HIL_H__
|
|
|