31#include "generated/flight_plan.h"
50#if (CAM_PAN_MAX == CAM_PAN_NEUTRAL)
51#error CAM_PAN_MAX has to be different from CAM_PAN_NEUTRAL
53#if (CAM_PAN_NEUTRAL == CAM_PAN_MIN)
54#error CAM_PAN_MIN has to be different from CAM_PAN_NEUTRAL
59#ifdef CAM_TILT_NEUTRAL
60#if ((CAM_TILT_MAX) == (CAM_TILT_NEUTRAL))
61#error CAM_TILT_MAX has to be different from CAM_TILT_NEUTRAL
63#if (CAM_TILT_NEUTRAL == CAM_TILT_MIN)
64#error CAM_TILT_MIN has to be different from CAM_TILT_NEUTRAL
70#define CAM_PAN0 RadOfDeg(0)
76#define CAM_TILT0 RadOfDeg(0)
88#define CAM_MODE0 CAM_MODE_OFF
111#ifdef SHOW_CAM_COORDINATES
124#ifdef SHOW_CAM_COORDINATES
131#if defined(CAM_FIXED_FOR_FPV_IN_AUTO1) && CAM_FIXED_FOR_FPV_IN_AUTO1 == 1
171#if defined(CAM_FIXED_FOR_FPV_IN_AUTO1) && CAM_FIXED_FOR_FPV_IN_AUTO1 == 1
175#if defined(CAM_TILT_POSITION_FOR_FPV)
180#if defined(CAM_PAN_POSITION_FOR_FPV)
186#ifdef SHOW_CAM_COORDINATES
195#if defined(COMMAND_CAM_PWR_SW)
197#elif defined(VIDEO_TX_SWITCH)
223#ifdef CAM_PAN_NEUTRAL
234#ifdef CAM_TILT_NEUTRAL
252#ifdef COMMAND_CAM_PAN
255#ifdef COMMAND_CAM_TILT
uint8_t autopilot_get_mode(void)
get autopilot mode
Core autopilot interface common to all firmwares.
void cam_periodic(void)
For CAM_MODE_AC_TARGET mode.
static void send_cam(struct transport_tx *trans, struct link_device *dev)
void cam_angles(void)
Computes the servo values from cam_pan_c and cam_tilt_c.
uint8_t cam_target_wp
For CAM_MODE_XY_TARGET mode.
void cam_waypoint_target(void)
uint8_t cam_target_ac
For CAM_MODE_WP_TARGET mode.
void cam_nadir(void)
Point straight down.
void cam_target(void)
Computes the right angles from target_x, target_y, target_alt.
float cam_target_x
Radians, for CAM_MODE_ANGLES mode.
#define CAM_MODE_XY_TARGET
#define CAM_MODE_STABILIZED
#define CAM_MODE_AC_TARGET
#define CAM_MODE_WP_TARGET
float ground_alt
size == nb_waypoint, waypoint 0 is a dummy waypoint
const uint8_t nb_waypoint
static struct EnuCoor_f * acInfoGetPositionEnu_f(uint8_t ac_id)
Get position in local ENU coordinates (float).
static struct UtmCoor_f * acInfoGetPositionUtm_f(uint8_t ac_id)
Get position from UTM coordinates (float).
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static float stateGetHorizontalSpeedDir_f(void)
Get dir of horizontal ground speed (float).
void vPoint(float fPlaneEast, float fPlaneNorth, float fPlaneAltitude, float fRollAngle, float fPitchAngle, float fYawAngle, float fObjectEast, float fObjectNorth, float fAltitude, float *fPan, float *fTilt)
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
vector in East North Up coordinates Units: meters
API to get/set the generic vehicle states.
static const struct usb_device_descriptor dev
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.