APM:Libraries
Public Member Functions | Public Attributes | Private Attributes | List of all members
AP_AHRS_View Class Reference

#include <AP_AHRS_View.h>

Collaboration diagram for AP_AHRS_View:
[legend]

Public Member Functions

 AP_AHRS_View (AP_AHRS &ahrs, enum Rotation rotation)
 
void update (bool skip_ins_update=false)
 
virtual ~AP_AHRS_View ()
 
const Vector3fget_gyro (void) const
 
Vector3f get_gyro_latest (void) const
 
const Matrix3fget_rotation_body_to_ned (void) const
 
float cos_roll () const
 
float cos_pitch () const
 
float cos_yaw () const
 
float sin_roll () const
 
float sin_pitch () const
 
float sin_yaw () const
 
bool get_position (struct Location &loc) const
 
Vector3f wind_estimate (void)
 
bool airspeed_estimate (float *airspeed_ret) const
 
bool airspeed_estimate_true (float *airspeed_ret) const
 
float get_EAS2TAS (void) const
 
Vector2f groundspeed_vector (void)
 
bool get_velocity_NED (Vector3f &vec) const
 
bool get_expected_mag_field_NED (Vector3f &ret) const
 
bool get_relative_position_NED_home (Vector3f &vec) const
 
bool get_relative_position_NED_origin (Vector3f &vec) const
 
bool get_relative_position_NE_home (Vector2f &vecNE) const
 
bool get_relative_position_NE_origin (Vector2f &vecNE) const
 
void get_relative_position_D_home (float &posD) const
 
bool get_relative_position_D_origin (float &posD) const
 
float groundspeed (void)
 
const Vector3fget_accel_ef_blended (void) const
 
uint32_t getLastPosNorthEastReset (Vector2f &pos) const
 
uint32_t getLastPosDownReset (float &posDelta) const
 
Vector2f rotate_earth_to_body2D (const Vector2f &ef_vector) const
 
Vector2f rotate_body_to_earth2D (const Vector2f &bf) const
 
float get_error_rp (void) const
 
float get_error_yaw (void) const
 

Public Attributes

float roll
 
float pitch
 
float yaw
 
int32_t roll_sensor
 
int32_t pitch_sensor
 
int32_t yaw_sensor
 
float cos_roll
 
float cos_pitch
 
float cos_yaw
 
float sin_roll
 
float sin_pitch
 
float sin_yaw
 

Private Attributes

enum Rotation rotation
 
AP_AHRSahrs
 
Matrix3f rot_view
 
Matrix3f rot_body_to_ned
 
Vector3f gyro
 
struct {
   float   cos_roll
 
   float   cos_pitch
 
   float   cos_yaw
 
   float   sin_roll
 
   float   sin_pitch
 
   float   sin_yaw
 
trig
 

Detailed Description

Definition at line 25 of file AP_AHRS_View.h.

Constructor & Destructor Documentation

◆ AP_AHRS_View()

AP_AHRS_View::AP_AHRS_View ( AP_AHRS ahrs,
enum Rotation  rotation 
)

Definition at line 24 of file AP_AHRS_View.cpp.

Here is the call graph for this function:

◆ ~AP_AHRS_View()

virtual AP_AHRS_View::~AP_AHRS_View ( )
inlinevirtual

Definition at line 35 of file AP_AHRS_View.h.

Member Function Documentation

◆ airspeed_estimate()

bool AP_AHRS_View::airspeed_estimate ( float *  airspeed_ret) const
inline

Definition at line 84 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ airspeed_estimate_true()

bool AP_AHRS_View::airspeed_estimate_true ( float *  airspeed_ret) const
inline

Definition at line 88 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ cos_pitch()

float AP_AHRS_View::cos_pitch ( ) const
inline

Definition at line 55 of file AP_AHRS_View.h.

◆ cos_roll()

float AP_AHRS_View::cos_roll ( ) const
inline

Definition at line 52 of file AP_AHRS_View.h.

◆ cos_yaw()

float AP_AHRS_View::cos_yaw ( ) const
inline

Definition at line 58 of file AP_AHRS_View.h.

◆ get_accel_ef_blended()

const Vector3f& AP_AHRS_View::get_accel_ef_blended ( void  ) const
inline

Definition at line 136 of file AP_AHRS_View.h.

Referenced by AC_PosControl::relax_alt_hold_controllers(), and AC_PosControl::run_z_controller().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_EAS2TAS()

float AP_AHRS_View::get_EAS2TAS ( void  ) const
inline

Definition at line 92 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_error_rp()

float AP_AHRS_View::get_error_rp ( void  ) const
inline

Definition at line 158 of file AP_AHRS_View.h.

Referenced by DataFlash_Class::Log_Write_AttitudeView().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_error_yaw()

float AP_AHRS_View::get_error_yaw ( void  ) const
inline

Definition at line 164 of file AP_AHRS_View.h.

Referenced by DataFlash_Class::Log_Write_AttitudeView().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_expected_mag_field_NED()

bool AP_AHRS_View::get_expected_mag_field_NED ( Vector3f ret) const
inline

Definition at line 104 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_gyro()

const Vector3f& AP_AHRS_View::get_gyro ( void  ) const
inline

Definition at line 38 of file AP_AHRS_View.h.

Referenced by AC_AttitudeControl::attitude_controller_run_quat(), AC_AttitudeControl_Heli::integrate_bf_rate_error_to_angle_errors(), AC_AttitudeControl_Heli::passthrough_bf_roll_pitch_rate_yaw(), and AC_AttitudeControl::relax_attitude_controllers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_gyro_latest()

Vector3f AP_AHRS_View::get_gyro_latest ( void  ) const

Definition at line 75 of file AP_AHRS_View.cpp.

Referenced by get_gyro(), AC_AttitudeControl::input_rate_bf_roll_pitch_yaw_3(), AC_AttitudeControl_Sub::rate_controller_run(), AC_AttitudeControl_Heli::rate_controller_run(), and AC_AttitudeControl_Multi::rate_controller_run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_position()

bool AP_AHRS_View::get_position ( struct Location loc) const
inline

Definition at line 76 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_relative_position_D_home()

void AP_AHRS_View::get_relative_position_D_home ( float &  posD) const
inline

Definition at line 124 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_relative_position_D_origin()

bool AP_AHRS_View::get_relative_position_D_origin ( float &  posD) const
inline

Definition at line 128 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_relative_position_NE_home()

bool AP_AHRS_View::get_relative_position_NE_home ( Vector2f vecNE) const
inline

Definition at line 116 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_relative_position_NE_origin()

bool AP_AHRS_View::get_relative_position_NE_origin ( Vector2f vecNE) const
inline

Definition at line 120 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_relative_position_NED_home()

bool AP_AHRS_View::get_relative_position_NED_home ( Vector3f vec) const
inline

Definition at line 108 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_relative_position_NED_origin()

bool AP_AHRS_View::get_relative_position_NED_origin ( Vector3f vec) const
inline

Definition at line 112 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ get_rotation_body_to_ned()

const Matrix3f& AP_AHRS_View::get_rotation_body_to_ned ( void  ) const
inline

◆ get_velocity_NED()

bool AP_AHRS_View::get_velocity_NED ( Vector3f vec) const
inline

Definition at line 100 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ getLastPosDownReset()

uint32_t AP_AHRS_View::getLastPosDownReset ( float &  posDelta) const
inline

Definition at line 144 of file AP_AHRS_View.h.

Referenced by AC_PosControl::check_for_ekf_z_reset(), and AC_PosControl::init_ekf_z_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLastPosNorthEastReset()

uint32_t AP_AHRS_View::getLastPosNorthEastReset ( Vector2f pos) const
inline

Definition at line 140 of file AP_AHRS_View.h.

Referenced by AC_PosControl::check_for_ekf_xy_reset(), and AC_PosControl::init_ekf_xy_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ groundspeed()

float AP_AHRS_View::groundspeed ( void  )
inline

Definition at line 132 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ groundspeed_vector()

Vector2f AP_AHRS_View::groundspeed_vector ( void  )
inline

Definition at line 96 of file AP_AHRS_View.h.

Here is the call graph for this function:

◆ rotate_body_to_earth2D()

Vector2f AP_AHRS_View::rotate_body_to_earth2D ( const Vector2f bf) const

Definition at line 89 of file AP_AHRS_View.cpp.

Referenced by getLastPosDownReset().

Here is the caller graph for this function:

◆ rotate_earth_to_body2D()

Vector2f AP_AHRS_View::rotate_earth_to_body2D ( const Vector2f ef_vector) const

Definition at line 82 of file AP_AHRS_View.cpp.

Referenced by getLastPosDownReset().

Here is the caller graph for this function:

◆ sin_pitch()

float AP_AHRS_View::sin_pitch ( ) const
inline

Definition at line 64 of file AP_AHRS_View.h.

◆ sin_roll()

float AP_AHRS_View::sin_roll ( ) const
inline

Definition at line 61 of file AP_AHRS_View.h.

◆ sin_yaw()

float AP_AHRS_View::sin_yaw ( ) const
inline

Definition at line 67 of file AP_AHRS_View.h.

◆ update()

void AP_AHRS_View::update ( bool  skip_ins_update = false)

Definition at line 47 of file AP_AHRS_View.cpp.

Referenced by AP_AHRS_View(), and AP_AHRS_NavEKF::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wind_estimate()

Vector3f AP_AHRS_View::wind_estimate ( void  )
inline

Definition at line 80 of file AP_AHRS_View.h.

Here is the call graph for this function:

Member Data Documentation

◆ ahrs

AP_AHRS& AP_AHRS_View::ahrs
private

Definition at line 177 of file AP_AHRS_View.h.

Referenced by get_gyro_latest(), and update().

◆ cos_pitch

float AP_AHRS_View::cos_pitch

◆ cos_roll

float AP_AHRS_View::cos_roll

◆ cos_yaw

float AP_AHRS_View::cos_yaw

◆ gyro

Vector3f AP_AHRS_View::gyro
private

Definition at line 181 of file AP_AHRS_View.h.

Referenced by get_gyro(), and update().

◆ pitch

float AP_AHRS_View::pitch

◆ pitch_sensor

int32_t AP_AHRS_View::pitch_sensor

◆ roll

float AP_AHRS_View::roll

◆ roll_sensor

int32_t AP_AHRS_View::roll_sensor

◆ rot_body_to_ned

Matrix3f AP_AHRS_View::rot_body_to_ned
private

Definition at line 180 of file AP_AHRS_View.h.

Referenced by get_rotation_body_to_ned(), and update().

◆ rot_view

Matrix3f AP_AHRS_View::rot_view
private

Definition at line 179 of file AP_AHRS_View.h.

Referenced by AP_AHRS_View(), and update().

◆ rotation

enum Rotation AP_AHRS_View::rotation
private

Definition at line 176 of file AP_AHRS_View.h.

Referenced by AP_AHRS_View(), get_gyro_latest(), and update().

◆ sin_pitch

float AP_AHRS_View::sin_pitch

Definition at line 188 of file AP_AHRS_View.h.

Referenced by AC_PosControl::lean_angles_to_accel().

◆ sin_roll

float AP_AHRS_View::sin_roll

Definition at line 187 of file AP_AHRS_View.h.

Referenced by AC_PosControl::lean_angles_to_accel().

◆ sin_yaw

float AP_AHRS_View::sin_yaw

◆ trig

struct { ... } AP_AHRS_View::trig

◆ yaw

float AP_AHRS_View::yaw

◆ yaw_sensor

int32_t AP_AHRS_View::yaw_sensor

Definition at line 173 of file AP_AHRS_View.h.

Referenced by DataFlash_Class::Log_Write_AttitudeView(), and update().


The documentation for this class was generated from the following files: