 |
Paparazzi UAS
v6.1.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
41 #if PERIODIC_TELEMETRY
43 #include "generated/settings.h"
45 #if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
46 #include "modules/settings/rc_settings.h"
47 static void send_rc_settings(
struct transport_tx *trans,
struct link_device *
dev)
57 static void send_mode(
struct transport_tx *trans,
struct link_device *
dev)
59 pprz_msg_send_PPRZ_MODE(trans,
dev, AC_ID,
65 pprz_msg_send_ESTIMATOR(trans,
dev, AC_ID,
73 pprz_msg_send_ENERGY(trans,
dev, AC_ID,
85 pprz_msg_send_DESIRED(trans,
dev, AC_ID,
91 static void send_airspeed(
struct transport_tx *trans __attribute__((unused)),
92 struct link_device *
dev __attribute__((unused)))
96 pprz_msg_send_AIRSPEED(trans,
dev, AC_ID,
101 pprz_msg_send_AIRSPEED(trans,
dev, AC_ID, &airspeed, &zero, &zero, &zero);
124 #if PERIODIC_TELEMETRY
131 #if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
138 #include "generated/flight_plan.h"
139 #include "generated/airframe.h"
141 #ifdef LOW_BATTERY_KILL_DELAY
142 #warning LOW_BATTERY_KILL_DELAY has been renamed to CATASTROPHIC_BAT_KILL_DELAY, please update your airframe file!
146 #ifndef CATASTROPHIC_BAT_KILL_DELAY
147 #define CATASTROPHIC_BAT_KILL_DELAY 5
151 #ifndef KILL_MODE_DISTANCE
152 #define KILL_MODE_DISTANCE (1.5*MAX_DIST_FROM_HOME)
156 #ifndef MIN_SPEED_FOR_TAKEOFF
157 #define MIN_SPEED_FOR_TAKEOFF 5.
173 #if !USE_GENERATED_AUTOPILOT
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
static void send_desired(struct transport_tx *trans, struct link_device *dev)
float dist2_to_home
squared distance to home waypoint
uint16_t flight_time
flight time in seconds
uint8_t mode
current autopilot mode
void monitor_task(void)
monitor stuff run at 1Hz
static const struct usb_device_descriptor dev
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
float vsupply
supply voltage in V
float h_ctl_roll_setpoint
static void send_energy(struct transport_tx *trans, struct link_device *dev)
float h_ctl_pitch_loop_setpoint
struct Electrical ap_electrical
float charge
consumed electric charge in Ah
#define CATASTROPHIC_BAT_KILL_DELAY
Maximum time allowed for catastrophic battery level before going into kill mode.
struct pprz_autopilot autopilot
Global autopilot structure.
bool bat_low
battery low status
pprz_t throttle
throttle level as will be displayed in GCS
static float stateGetAirspeed_f(void)
Get airspeed (float).
static void send_mode(struct transport_tx *trans, struct link_device *dev)
float v_ctl_climb_setpoint
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
uint8_t mcu1_status
Second MCU status (FBW part)
float v_ctl_auto_airspeed_controlled
#define MIN_SPEED_FOR_TAKEOFF
Default minimal speed for takeoff in m/s.
#define KILL_MODE_DISTANCE
Maximum distance from HOME waypoint before going into kill mode.
void autopilot_firmware_init(void)
Init function.
bool bat_critical
battery critical status
float v_ctl_auto_groundspeed_setpoint
in meters per second
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
float v_ctl_altitude_setpoint
in meters above MSL
static void send_airspeed(struct transport_tx *trans, struct link_device *dev)
static struct EnuCoor_f * stateGetSpeedEnu_f(void)
Get ground speed in local ENU coordinates (float).
float v_ctl_auto_airspeed_setpoint
in meters per second
volatile uint32_t nb_sec
full seconds since startup
float energy
consumed energy in Wh
static void send_estimator(struct transport_tx *trans, struct link_device *dev)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
bool kill_throttle
allow autopilot to use throttle
#define DefaultPeriodic
Set default periodic telemetry.
bool launch
request launch
void autopilot_send_mode(void)
Report autopilot mode on default downlink channel.
float current
current in A
float h_ctl_course_setpoint