|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
28 #include "generated/airframe.h"
33 #ifndef PTU_PRESSURE_OFFSET
34 #define PTU_PRESSURE_OFFSET 0
36 #ifndef PTU_PRESSURE_SCALE
37 #define PTU_PRESSURE_SCALE 1.0
39 #ifndef PTU_TEMPERATURE_OFFSET
40 #define PTU_TEMPERATURE_OFFSET 0
42 #ifndef PTU_TEMPERATURE_SCALE
43 #define PTU_TEMPERATURE_SCALE 1.0
45 #ifndef PTU_HUMIDTY_OFFSET
46 #define PTU_HUMIDTY_OFFSET 0
48 #ifndef PTU_HUMIDTY_SCALE
49 #define PTU_HUMIDTY_SCALE 1.0
53 #ifndef ADC_CHANNEL_PTU_NB_SAMPLES
54 #define ADC_CHANNEL_PTU_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
71 #include "pprzlink/messages.h"
91 log_ptu_started =
false;
106 if (!log_ptu_started) {
108 "P(adc) T(adc) H(usec) GPS_fix TOW(ms) Week Lat(1e7rad) Lon(1e7rad) HMSL(mm) gpseed(cm/s) course(1e7rad) climb(cm/s)\n");
109 log_ptu_started =
true;
111 sdLogWriteLog(
pprzLogFile,
"%d %d %d %d %d %d %d %d %d %d %d %d\n",
122 #define PTU_DATA_SIZE 3
123 float ptu_data[PTU_DATA_SIZE];
#define PTU_HUMIDTY_OFFSET
struct adc_buf pressure_buf
int32_t lon
in degrees*1e7
#define PTU_PRESSURE_SCALE
#define PTU_HUMIDTY_SCALE
uint32_t tow
GPS time of week in ms.
#define ADC_CHANNEL_PTU_NB_SAMPLES
ADC buffers.
void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
Link between ChibiOS ADC drivers and Paparazzi adc_buffers.
void gpio_setup_output(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
arch independent ADC (Analog to Digital Converter) API
struct NedCoor_i ned_vel
speed NED in cm/s
uint16_t pressure_adc
Raw values.
int32_t lat
in degrees*1e7
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
Device independent GPS code (interface)
uint16_t gspeed
norm of 2d ground speed in cm/s
#define PTU_TEMPERATURE_SCALE
void mf_ptu_periodic(void)
Common code for AP and FBW telemetry.
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
#define PTU_TEMPERATURE_OFFSET
int32_t hmsl
height above mean sea level (MSL) in mm
void mf_ptu_init(void)
Data acquisition module for Meteo France PTU board.
static void gpio_set(ioportid_t port, uint16_t pin)
Set a gpio output to high level.
struct GpsState gps
global GPS state
#define PTU_PRESSURE_OFFSET
Default scale and offset send raw values if nothing defined in airframe file.
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.