38 #ifdef FIXEDWING_FIRMWARE
47 #ifndef DC_AUTOSHOOT_PERIOD
48 #define DC_AUTOSHOOT_PERIOD 1.0
52 #ifndef DC_AUTOSHOOT_DISTANCE_INTERVAL
53 #define DC_AUTOSHOOT_DISTANCE_INTERVAL 50
57 #ifndef DC_AUTOSHOOT_DISTANCE_INIT
58 #define DC_AUTOSHOOT_DISTANCE_INIT 0
62 #ifndef DC_AUTOSHOOT_SURVEY_INTERVAL
63 #define DC_AUTOSHOOT_SURVEY_INTERVAL 50
89 #ifndef DC_SHOT_SYNC_SEND
90 #define DC_SHOT_SYNC_SEND 1
98 #include "pprzlink/messages.h"
168 #ifdef DOWNLINK_SEND_DC_INFO
197 DOWNLINK_SEND_PAYLOAD_COMMAND(
extra_pprz_tp, EXTRA_DOWNLINK_DEVICE, &dst_id, 1, tab);
276 return fminf(a -
b,
b +
m - a);
281 static float last_shot_time = 0.;
288 last_shot_time = now;
void dc_send_command(uint8_t cmd)
Send Command To Camera.
#define DC_AUTOSHOOT_PERIOD
default time interval for periodic mode: 1sec
float dc_circle_start_angle
angle a where first image will be taken at a + delta
#define DC_AUTOSHOOT_DISTANCE_INIT
default distance of the first shoot: 0m (start immediately)
#define DC_AUTOSHOOT_SURVEY_INTERVAL
default distance interval for survey mode: 50m
float dc_survey_interval
distance between dc shots in meters
void dc_periodic(void)
periodic function
uint8_t dc_survey(float interval, float x, float y)
Sets the dc control in distance mode.
void dc_init(void)
initialize settings
float dc_distance_interval
AutoShoot photos on distance to last shot in meters.
dc_autoshoot_type dc_autoshoot
uint8_t dc_stop(void)
Stop dc control.
void dc_send_command_common(uint8_t cmd)
Command sending function.
float dc_circle_last_block
#define DC_AUTOSHOOT_DISTANCE_INTERVAL
default distance interval for distance mode: 50m
static float dim_mod(float a, float b, float m)
uint16_t dc_photo_nr
export the number of the last photo
float dc_gps_x
point of reference for the survey mode
uint8_t dc_distance(float interval)
Sets the dc control in distance mode.
float dc_autoshoot_period
AutoShoot photos every X seconds.
uint16_t dc_gps_count
number of images taken since the last change of dc_mode
void dc_send_shot_position(void)
Send Down the coordinates of where the photo was taken.
float dc_exposure
camera exposure
uint8_t dc_info(void)
Send an info message.
float dc_circle_interval
angle between dc shots in degree
uint8_t dc_circle(float interval, float start)
Sets the dc control in circle mode.
float dc_cam_angle
camera angle
float dc_circle_max_blocks
static struct FloatVect2 last_shot_pos
void WEAK dc_set_expo(float expo UNUSED)
Set camera exposure.
Standard Digital Camera Control Interface.
dc_autoshoot_type
Auotmatic Digital Camera Photo Triggering modes.
Common code for AP and FBW telemetry.
struct GpsState gps
global GPS state
Device independent GPS code (interface)
uint32_t tow
GPS time of week in ms.
int32_t hmsl
height above mean sea level (MSL) in mm
static float float_vect2_norm(struct FloatVect2 *v)
#define VECT2_DIFF(_c, _a, _b)
#define VECT2_COPY(_a, _b)
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct LlaCoor_i * stateGetPositionLla_i(void)
Get position in LLA coordinates (int).
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
static float stateGetHorizontalSpeedDir_f(void)
Get dir of horizontal ground speed (float).
Rotorcraft navigation functions.
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
API to get/set the generic vehicle states.
Architecture independent timing functions.
static float get_sys_time_float(void)
Get the time in seconds since startup.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.