123 #if AP_AHRS_NAVEKF_AVAILABLE 178 float true_airspeed = *airspeed_ret *
get_EAS2TAS();
195 _trim.set_and_save(trim);
211 if( save_to_eeprom ) {
246 const Vector2f airspeed_vector(cosf(
yaw) * airspeed, sinf(
yaw) * airspeed);
247 gndVelADS = airspeed_vector - wind2d;
256 if (gotAirspeed && gotGPS) {
266 const float alpha = 1.0f -
beta;
277 if (gotAirspeed && !gotGPS) {
281 if (!gotAirspeed && gotGPS) {
291 float &cr,
float &cp,
float &cy,
292 float &sr,
float &sp,
float &sy)
const 296 if (fabsf(yaw_vector.
x) > 0 ||
297 fabsf(yaw_vector.
y) > 0) {
309 const float cx2 = rot.
c.
x * rot.
c.
x;
326 if (
is_zero(cp) || isinf(cr) || isnan(cr) || isinf(sr) || isnan(sr)) {
366 if (
_view !=
nullptr) {
389 #if APM_BUILD_TYPE(APM_BUILD_ArduPlane) 412 aoa_velocity = aoa_velocity - aoa_wind;
413 const float vel_len = aoa_velocity.
length();
423 if (aoa_velocity.
x > 0) {
468 #if AP_AHRS_NAVEKF_AVAILABLE
static const struct AP_Param::GroupInfo var_info[]
void to_euler(float *roll, float *pitch, float *yaw) const
virtual bool get_velocity_NED(Vector3f &vec) const
Vector2< float > Vector2f
bool airspeed_estimate_true(float *airspeed_ret) const
void set_board_orientation(enum Rotation orientation, Matrix3f *custom_rotation=nullptr)
float safe_sqrt(const T v)
const Vector3f & get_gyro(uint8_t i) const
virtual Vector3f wind_estimate(void) const =0
AP_Int8 _board_orientation
float get_airspeed(uint8_t i) const
#define AP_GROUPINFO(name, idx, clazz, element, def)
void from_euler(float roll, float pitch, float yaw)
virtual bool airspeed_estimate(float *airspeed_ret) const
void Log_Write_Home_And_Origin()
virtual Vector2f groundspeed_vector(void)
virtual void update_AOA_SSA(void)
virtual const Matrix3f & get_rotation_body_to_ned(void) const =0
static AP_AHRS * get_singleton()
AP_AHRS_View * create_view(enum Rotation rotation)
Vector2f rotate_earth_to_body2D(const Vector2f &ef_vector) const
virtual void add_trim(float roll_in_radians, float pitch_in_radians, bool save_to_eeprom=true)
Matrix3f _rotation_vehicle_body_to_autopilot_body
Matrix3< T > transposed(void) const
Matrix3f _custom_rotation
virtual void set_trim(Vector3f new_trim)
float ground_speed(uint8_t instance) const
void update_cd_values(void)
bool is_zero(const T fVal1)
friend class AP_AHRS_View
void set_board_orientation(enum Rotation orientation, Matrix3f *custom_rotation=nullptr)
Matrix3f _rotation_autopilot_body_to_vehicle_body
Vector2f rotate_body_to_earth2D(const Vector2f &bf) const
static DataFlash_Class * instance(void)
Vector3f get_gyro_latest(void) const
virtual const Vector3f & get_gyro_drift(void) const =0
Receiving valid messages and 2D lock.
GPS_Status status(uint8_t instance) const
Query GPS status.
float safe_asin(const T v)
Vector3< T > mul_transpose(const Vector3< T > &v) const
float constrain_float(const float amt, const float low, const float high)
#define AP_AHRS_TRIM_LIMIT
void Log_Write_Origin(uint8_t origin_type, const Location &loc)
static constexpr float radians(float deg)
virtual bool get_origin(Location &ret) const
virtual uint8_t get_primary_gyro_index(void) const
AP_InertialSensor & ins()
void calc_trig(const Matrix3f &rot, float &cr, float &cp, float &cy, float &sr, float &sp, float &sy) const
bool airspeed_sensor_enabled(void) const
float get_EAS2TAS(void) const
bool home_is_set(void) const
static AP_AHRS * _singleton
uint32_t _last_AOA_update_ms