|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/meteo/meteo_stick.h"#include "modules/core/abi.h"#include "peripherals/ads1220.h"#include "mcu_periph/pwm_input.h"#include "generated/airframe.h"#include "pprzlink/messages.h"#include "modules/datalink/downlink.h"
Include dependency graph for meteo_stick.c:Go to the source code of this file.
Macros | |
| #define | MS_PRESSURE_OFFSET 0.0f |
| Default scale and offset Only used if calibration from EEPROM is not used/available. | |
| #define | MS_PRESSURE_SCALE 1.0f |
| #define | MS_TEMPERATURE_OFFSET 0.0f |
| #define | MS_TEMPERATURE_SCALE 1.0f |
| #define | MS_HUMIDTY_OFFSET 0.0f |
| #define | MS_HUMIDTY_SCALE 1.0f |
| #define | MS_DIFF_PRESSURE_OFFSET 0.0f |
| #define | MS_DIFF_PRESSURE_SCALE 1.0f |
| #define | MS_PITOT_COUNTER 20 |
| #define | MS_PITOT_FILTER 0.6 |
| #define | SEND_MS_SYNC FALSE |
| Send over telemetry synchrone to reading. | |
| #define | LOG_MS TRUE |
| Includes to log on SD card as ASCII csv. | |
| #define | LOG_MS_FLIGHTRECORDER FALSE |
| Includes and function to log to flight recorder. | |
| #define | MS_LOG_FILE flightrecorder_sdlog |
Functions | |
| static float | get_pressure (uint32_t raw) |
| static float | get_temp (uint32_t raw) |
| static float | get_diff (uint32_t raw) |
| static float | get_pitot (uint32_t raw) |
| static float | get_humidity (uint32_t raw) |
| static void | meteo_stick_send_data (struct transport_tx *trans, struct link_device *device) |
| Funnction to send over different transport and device. | |
| void | meteo_stick_init (void) |
| Init function. | |
| void | meteo_stick_periodic (void) |
| Periodic function. | |
| void | meteo_stick_event (void) |
| Event function. | |
| void | meteo_stick_report (void) |
Variables | |
| struct MeteoStick | meteo_stick |
| General structure. | |
| static const float | maxAdc = 8388608.0f |
| Prescaling of data according to datasheets. | |
| static float | pitot_offset |
| static int | pitot_counter |
Includes to log on SD card as ASCII csv.
TRUE by default
Definition at line 197 of file meteo_stick.c.
Includes and function to log to flight recorder.
FALSE by default
Definition at line 261 of file meteo_stick.c.
| #define MS_DIFF_PRESSURE_OFFSET 0.0f |
Definition at line 53 of file meteo_stick.c.
| #define MS_DIFF_PRESSURE_SCALE 1.0f |
Definition at line 56 of file meteo_stick.c.
| #define MS_HUMIDTY_OFFSET 0.0f |
Definition at line 47 of file meteo_stick.c.
| #define MS_HUMIDTY_SCALE 1.0f |
Definition at line 50 of file meteo_stick.c.
| #define MS_LOG_FILE flightrecorder_sdlog |
Definition at line 266 of file meteo_stick.c.
| #define MS_PITOT_COUNTER 20 |
Definition at line 128 of file meteo_stick.c.
| #define MS_PITOT_FILTER 0.6 |
Definition at line 130 of file meteo_stick.c.
| #define MS_PRESSURE_OFFSET 0.0f |
Default scale and offset Only used if calibration from EEPROM is not used/available.
Definition at line 35 of file meteo_stick.c.
| #define MS_PRESSURE_SCALE 1.0f |
Definition at line 38 of file meteo_stick.c.
| #define MS_TEMPERATURE_OFFSET 0.0f |
Definition at line 41 of file meteo_stick.c.
| #define MS_TEMPERATURE_SCALE 1.0f |
Definition at line 44 of file meteo_stick.c.
Send over telemetry synchrone to reading.
FALSE by default (the asynchronous report function is used by default)
Definition at line 188 of file meteo_stick.c.
Definition at line 132 of file meteo_stick.c.
References ADS1220_GAIN_2, Ads1220GainTable, MeteoStick::current_temperature, foo, maxAdc, meteo_stick, MS_DIFF_PRESSURE_OFFSET, MS_DIFF_PRESSURE_SCALE, MTOSTK_DIF_PRESS, mtostk_get_calibrated_value(), and pitot_offset.
Referenced by get_pitot(), and meteo_stick_event().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 150 of file meteo_stick.c.
References MeteoStick::current_temperature, foo, meteo_stick, MS_HUMIDTY_OFFSET, MS_HUMIDTY_SCALE, mtostk_get_calibrated_value(), MTOSTK_HUMIDITY, and S1.
Referenced by meteo_stick_periodic().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 145 of file meteo_stick.c.
References foo, and get_diff().
Referenced by meteo_stick_event().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 95 of file meteo_stick.c.
References MeteoStick::current_temperature, foo, maxAdc, meteo_stick, MS_PRESSURE_OFFSET, MS_PRESSURE_SCALE, MTOSTK_ABS_PRESS, and mtostk_get_calibrated_value().
Referenced by meteo_stick_event().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 106 of file meteo_stick.c.
References ADS1220_GAIN_4, Ads1220GainTable, foo, maxAdc, meteo_stick, MS_TEMPERATURE_OFFSET, MS_TEMPERATURE_SCALE, mtostk_get_calibrated_value(), and MTOSTK_TEMP.
Referenced by meteo_stick_event().
Here is the call graph for this function:
Here is the caller graph for this function:Event function.
Definition at line 434 of file meteo_stick.c.
References ads1220_event(), MeteoStick::current_airspeed, MeteoStick::current_pressure, MeteoStick::current_temperature, Ads1220::data, Ads1220::data_available, MeteoStick::diff_pressure, eeprom25AA256_event(), foo, get_diff(), get_pitot(), get_pressure(), get_sys_time_usec(), get_temp(), meteo_stick, METEO_STICK_SENDER_ID, MS_PITOT_COUNTER, MS_PITOT_FILTER, pitot_counter, pitot_offset, MeteoStick::pressure, and MeteoStick::temperature.
Here is the call graph for this function:Init function.
Functions.
Definition at line 300 of file meteo_stick.c.
References ADS1220_CONTINIOUS_CONVERSION, ADS1220_GAIN_1, ADS1220_GAIN_2, ADS1220_GAIN_4, ADS1220_IDAC_250_uA, ADS1220_IDAC_OFF, ADS1220_IMUX_A0_RP1, ADS1220_IMUX_OFF, ads1220_init(), ADS1220_MUX_AIN0_AIN1, ADS1220_MUX_AIN0_AVSS, ADS1220_RATE_45_HZ, ADS1220_VREF_EXTERNAL_REF, ADS1220_VREF_VDD, Ads1220::config, Ads1220Config::conv, MeteoStick::current_airspeed, MeteoStick::current_humidity, MeteoStick::current_pressure, MeteoStick::current_temperature, MeteoStick::diff_pressure, eeprom25AA256_init(), foo, Ads1220Config::gain, MeteoStick::humidity_period, Ads1220Config::i1mux, Ads1220Config::i2mux, Ads1220Config::idac, log_tagged, meteo_stick, MS_PITOT_COUNTER, MTOSTK_NUM_SENSORS, Ads1220Config::mux, Ads1220Config::pga_bypass, pitot_counter, MeteoStick::pressure, Ads1220Config::rate, MeteoStick::reset_dp_offset, MeteoStick::temperature, and Ads1220Config::vref.
Here is the call graph for this function:Periodic function.
Definition at line 377 of file meteo_stick.c.
References ads1220_periodic(), MeteoStick::current_humidity, DefaultChannel, DefaultDevice, MeteoStick::diff_pressure, eeprom25AA256_read(), foo, get_humidity(), MeteoStick::humidity_period, meteo_stick, meteo_stick_send_data(), MS_PITOT_COUNTER, MTOSTK_NUM_SENSORS, mtostk_populate_cal_from_buffer(), pitot_counter, MeteoStick::pressure, pwm_input_period_tics, MeteoStick::reset_dp_offset, SPITransDone, and MeteoStick::temperature.
Here is the call graph for this function:Definition at line 497 of file meteo_stick.c.
References DefaultChannel, DefaultDevice, and meteo_stick_send_data().
Here is the call graph for this function:
|
static |
Funnction to send over different transport and device.
Definition at line 170 of file meteo_stick.c.
References MeteoStick::current_airspeed, MeteoStick::current_humidity, MeteoStick::current_pressure, MeteoStick::current_temperature, foo, gps, GpsState::hmsl, meteo_stick, stateGetPositionLla_i(), and GpsState::tow.
Referenced by meteo_stick_periodic(), and meteo_stick_report().
Here is the call graph for this function:
Here is the caller graph for this function:Prescaling of data according to datasheets.
Definition at line 93 of file meteo_stick.c.
Referenced by get_diff(), get_pressure(), and get_temp().
| struct MeteoStick meteo_stick |
General structure.
Definition at line 87 of file meteo_stick.c.
Referenced by get_diff(), get_humidity(), get_pressure(), get_temp(), meteo_stick_event(), meteo_stick_init(), meteo_stick_periodic(), and meteo_stick_send_data().
|
static |
Definition at line 126 of file meteo_stick.c.
Referenced by meteo_stick_event(), meteo_stick_init(), and meteo_stick_periodic().
|
static |
Definition at line 125 of file meteo_stick.c.
Referenced by get_diff(), and meteo_stick_event().