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

#include <AP_Airspeed_MS4525.h>

Inheritance diagram for AP_Airspeed_MS4525:
[legend]
Collaboration diagram for AP_Airspeed_MS4525:
[legend]

Public Member Functions

 AP_Airspeed_MS4525 (AP_Airspeed &frontend, uint8_t _instance)
 
 ~AP_Airspeed_MS4525 (void)
 
bool init () override
 
bool get_differential_pressure (float &pressure) override
 
bool get_temperature (float &temperature) override
 
- Public Member Functions inherited from AP_Airspeed_Backend
 AP_Airspeed_Backend (AP_Airspeed &frontend, uint8_t instance)
 
virtual ~AP_Airspeed_Backend ()
 

Private Member Functions

void _measure ()
 
void _collect ()
 
void _timer ()
 
void _voltage_correction (float &diff_press_pa, float &temperature)
 
float _get_pressure (int16_t dp_raw) const
 
float _get_temperature (int16_t dT_raw) const
 

Private Attributes

float _temp_sum
 
float _press_sum
 
uint32_t _temp_count
 
uint32_t _press_count
 
float _temperature
 
float _pressure
 
uint32_t _last_sample_time_ms
 
uint32_t _measurement_started_ms
 
AP_HAL::OwnPtr< AP_HAL::I2CDevice_dev
 

Additional Inherited Members

- Protected Member Functions inherited from AP_Airspeed_Backend
int8_t get_pin (void) const
 
float get_psi_range (void) const
 
uint8_t get_bus (void) const
 
AP_Airspeed::pitot_tube_order get_tube_order (void) const
 
float get_airspeed_ratio (void) const
 
void set_use_zero_offset (void)
 
void set_skip_cal (void)
 
void set_offset (float ofs)
 
- Protected Attributes inherited from AP_Airspeed_Backend
AP_HAL::Semaphoresem
 

Detailed Description

Definition at line 30 of file AP_Airspeed_MS4525.h.

Constructor & Destructor Documentation

◆ AP_Airspeed_MS4525()

AP_Airspeed_MS4525::AP_Airspeed_MS4525 ( AP_Airspeed frontend,
uint8_t  _instance 
)

Definition at line 32 of file AP_Airspeed_MS4525.cpp.

◆ ~AP_Airspeed_MS4525()

AP_Airspeed_MS4525::~AP_Airspeed_MS4525 ( void  )
inline

Definition at line 34 of file AP_Airspeed_MS4525.h.

Here is the call graph for this function:

Member Function Documentation

◆ _collect()

void AP_Airspeed_MS4525::_collect ( )
private

Definition at line 125 of file AP_Airspeed_MS4525.cpp.

Referenced by _timer(), init(), and ~AP_Airspeed_MS4525().

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

◆ _get_pressure()

float AP_Airspeed_MS4525::_get_pressure ( int16_t  dp_raw) const
private

Definition at line 104 of file AP_Airspeed_MS4525.cpp.

Referenced by _collect(), and ~AP_Airspeed_MS4525().

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

◆ _get_temperature()

float AP_Airspeed_MS4525::_get_temperature ( int16_t  dT_raw) const
private

Definition at line 118 of file AP_Airspeed_MS4525.cpp.

Referenced by _collect(), and ~AP_Airspeed_MS4525().

Here is the caller graph for this function:

◆ _measure()

void AP_Airspeed_MS4525::_measure ( )
private

Definition at line 87 of file AP_Airspeed_MS4525.cpp.

Referenced by _timer(), init(), and ~AP_Airspeed_MS4525().

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

◆ _timer()

void AP_Airspeed_MS4525::_timer ( )
private

Definition at line 214 of file AP_Airspeed_MS4525.cpp.

Referenced by init(), and ~AP_Airspeed_MS4525().

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

◆ _voltage_correction()

void AP_Airspeed_MS4525::_voltage_correction ( float &  diff_press_pa,
float &  temperature 
)
private

correct for 5V rail voltage if the system_power ORB topic is available

See http://uav.tridgell.net/MS4525/MS4525-offset.png for a graph of offset versus voltage for 3 sensors

Definition at line 197 of file AP_Airspeed_MS4525.cpp.

Referenced by _collect(), and ~AP_Airspeed_MS4525().

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

◆ get_differential_pressure()

bool AP_Airspeed_MS4525::get_differential_pressure ( float &  pressure)
overridevirtual

Implements AP_Airspeed_Backend.

Definition at line 228 of file AP_Airspeed_MS4525.cpp.

Referenced by ~AP_Airspeed_MS4525().

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

◆ get_temperature()

bool AP_Airspeed_MS4525::get_temperature ( float &  temperature)
overridevirtual

Implements AP_Airspeed_Backend.

Definition at line 246 of file AP_Airspeed_MS4525.cpp.

Referenced by ~AP_Airspeed_MS4525().

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

◆ init()

bool AP_Airspeed_MS4525::init ( void  )
overridevirtual

Implements AP_Airspeed_Backend.

Definition at line 38 of file AP_Airspeed_MS4525.cpp.

Referenced by ~AP_Airspeed_MS4525().

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

Member Data Documentation

◆ _dev

AP_HAL::OwnPtr<AP_HAL::I2CDevice> AP_Airspeed_MS4525::_dev
private

Definition at line 61 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), _measure(), and init().

◆ _last_sample_time_ms

uint32_t AP_Airspeed_MS4525::_last_sample_time_ms
private

Definition at line 59 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), get_differential_pressure(), get_temperature(), and init().

◆ _measurement_started_ms

uint32_t AP_Airspeed_MS4525::_measurement_started_ms
private

Definition at line 60 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), _measure(), and _timer().

◆ _press_count

uint32_t AP_Airspeed_MS4525::_press_count
private

Definition at line 56 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), and get_differential_pressure().

◆ _press_sum

float AP_Airspeed_MS4525::_press_sum
private

Definition at line 54 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), and get_differential_pressure().

◆ _pressure

float AP_Airspeed_MS4525::_pressure
private

Definition at line 58 of file AP_Airspeed_MS4525.h.

Referenced by get_differential_pressure().

◆ _temp_count

uint32_t AP_Airspeed_MS4525::_temp_count
private

Definition at line 55 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), and get_temperature().

◆ _temp_sum

float AP_Airspeed_MS4525::_temp_sum
private

Definition at line 53 of file AP_Airspeed_MS4525.h.

Referenced by _collect(), and get_temperature().

◆ _temperature

float AP_Airspeed_MS4525::_temperature
private

Definition at line 57 of file AP_Airspeed_MS4525.h.

Referenced by get_temperature().


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