|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for an sonar rangfinder sensor when used via an ADC channel. More...
#include "std.h"Go to the source code of this file.
Data Structures | |
| struct | SonarADC |
Functions | |
| void | sonar_adc_init (void) |
| void | sonar_adc_periodic (void) |
| Reading Read ADC value to update sonar measurement. | |
| void | sonar_adc_report (void) |
| Debug report Option to send debug informative values over telemetry. | |
Variables | |
| struct SonarADC | sonar_adc |
Driver for an sonar rangfinder sensor when used via an ADC channel.
Driver module for an analog rangefinder sensor connected to an ADC channel.
This module reads the ADC values from a rangefinder sensor and converts those values to a distance in meters or fractions thereof.
Options include:
Definition in file sonar_adc.h.
| struct SonarADC |
Definition at line 41 of file sonar_adc.h.
| Data Fields | ||
|---|---|---|
| float | distance | Distance measured in meters. |
| uint16_t | raw | raw measuread non scaled range value from sensor |
| float | scale | Scaling factor to convert raw value to a distance in SI unit (meters). |
| bool | update_agl | Do or don't update AGL ABI message. |
|
extern |
Definition at line 121 of file sonar_adc.c.
References adc_buf_channel(), DEFAULT_AV_NB_SAMPLE, DefaultPeriodic, init_butterworth_2_low_pass(), register_periodic_telemetry(), sonar_adc, sonar_adc_buf, SONAR_ADC_LOWPASS_TAU, SONAR_ADC_SCALE, sonar_adc_send_sonar(), sonar_filt, and USE_SONAR_ADC_AGL.
|
extern |
Reading Read ADC value to update sonar measurement.
Definition at line 145 of file sonar_adc.c.
References adc_buf_get(), AGL_SONAR_ADC_ID, get_sys_time_usec(), FloatEulers::phi, sonar_adc, sonar_adc_buf, SONAR_ADC_MAX_RANGE, SONAR_ADC_MIN_RANGE, SONAR_ADC_OFFSET, SONAR_ADC_RAW_OFFSET, sonar_adc_report(), sonar_filt, stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), FloatEulers::theta, update_butterworth_2_low_pass(), and EnuCoor_f::z.
|
extern |
Debug report Option to send debug informative values over telemetry.
Definition at line 206 of file sonar_adc.c.
References DefaultChannel, DefaultDevice, and sonar_adc.
Referenced by sonar_adc_periodic().
|
extern |
Definition at line 107 of file sonar_adc.c.
Referenced by sonar_adc_init(), sonar_adc_periodic(), sonar_adc_report(), sonar_adc_send_sonar(), and sonar_pwm_read().