 |
Paparazzi UAS
v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
40 #if PERIODIC_TELEMETRY
42 #include "generated/settings.h"
44 #if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
45 #include "modules/settings/rc_settings.h"
46 static void send_rc_settings(
struct transport_tx *trans,
struct link_device *
dev)
56 static void send_mode(
struct transport_tx *trans,
struct link_device *
dev)
75 pprz_msg_send_PPRZ_MODE(trans,
dev, AC_ID,
81 pprz_msg_send_ESTIMATOR(trans,
dev, AC_ID,
89 pprz_msg_send_ENERGY(trans,
dev, AC_ID,
101 pprz_msg_send_DESIRED(trans,
dev, AC_ID,
107 static void send_airspeed(
struct transport_tx *trans __attribute__((unused)),
108 struct link_device *
dev __attribute__((unused)))
112 pprz_msg_send_AIRSPEED(trans,
dev, AC_ID,
117 pprz_msg_send_AIRSPEED(trans,
dev, AC_ID, &airspeed, &zero, &zero, &zero);
126 #ifdef AP_MODE_MANUAL
136 pprz_msg_send_FBW_STATUS(trans,
dev, AC_ID,
154 #if PERIODIC_TELEMETRY
161 #if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
171 #include "generated/flight_plan.h"
172 #include "generated/airframe.h"
174 #ifdef LOW_BATTERY_KILL_DELAY
175 #warning LOW_BATTERY_KILL_DELAY has been renamed to CATASTROPHIC_BAT_KILL_DELAY, please update your airframe file!
179 #ifndef CATASTROPHIC_BAT_KILL_DELAY
180 #define CATASTROPHIC_BAT_KILL_DELAY 5
184 #ifndef KILL_MODE_DISTANCE
185 #define KILL_MODE_DISTANCE (1.5*MAX_DIST_FROM_HOME)
189 #ifndef MIN_SPEED_FOR_TAKEOFF
190 #define MIN_SPEED_FOR_TAKEOFF 5.
202 #if !USE_GENERATED_AUTOPILOT
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
static void send_fbw_status(struct transport_tx *trans, struct link_device *dev)
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 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
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.
pprz_t throttle
throttle level as will be displayed in GCS
static float stateGetAirspeed_f(void)
Get airspeed (float).
static const struct usb_device_descriptor dev
static void send_mode(struct transport_tx *trans, struct link_device *dev)
uint8_t fbw_mode
Fly by wire modes.
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.
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.
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
#define AP_MODE_MANUAL
AP modes.
struct Electrical electrical
uint8_t autopilot_get_mode(void)
get autopilot mode
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 CONTROL_FREQUENCY
#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
struct RadioControl radio_control
float h_ctl_course_setpoint