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
87 #ifndef DC_SHOT_SYNC_SEND
88 #define DC_SHOT_SYNC_SEND 1
96 #include "pprzlink/messages.h"
165 #ifdef DOWNLINK_SEND_DC_INFO
193 DOWNLINK_SEND_PAYLOAD_COMMAND(
extra_pprz_tp, EXTRA_DOWNLINK_DEVICE, 0, 1, tab);
263 static float dim_mod(
float a,
float b,
float m)
270 return fminf(a - b, b + m - a);
275 static float last_shot_time = 0.;
282 last_shot_time = now;
293 VECT2_DIFF(delta_pos, cur_pos, last_shot_pos);
#define DC_AUTOSHOOT_SURVEY_INTERVAL
default distance interval for survey mode: 50m
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
dc_autoshoot_type
Auotmatic Digital Camera Photo Triggering modes.
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
uint8_t dc_info(void)
Send an info message.
#define DC_AUTOSHOOT_DISTANCE_INIT
default distance of the first shoot: 0m (start immediately)
#define VECT2_COPY(_a, _b)
#define VECT2_DIFF(_c, _a, _b)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
uint16_t dc_photo_nr
export the number of the last photo
static float get_sys_time_float(void)
Get the time in seconds since startup.
float dc_circle_last_block
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.
void dc_init(void)
initialize settings
uint8_t dc_survey(float interval, float x, float y)
Sets the dc control in distance mode.
int32_t hmsl
height above mean sea level (MSL) in mm
Standard Digital Camera Control Interface.
float dc_circle_max_blocks
static float float_vect2_norm(struct FloatVect2 *v)
Architecture independent timing functions.
static float dim_mod(float a, float b, float m)
uint32_t tow
GPS time of week in ms.
Device independent GPS code (interface)
void dc_send_command_common(uint8_t cmd)
Command sending function.
dc_autoshoot_type dc_autoshoot
uint8_t dc_distance(float interval)
Sets the dc control in distance mode.
float dc_gps_x
point of reference for the survey mode
#define DC_AUTOSHOOT_PERIOD
default time interval for periodic mode: 1sec
static struct FloatVect2 last_shot_pos
float dc_circle_start_angle
angle a where first image will be taken at a + delta
Rotorcraft navigation functions.
void dc_send_command(uint8_t cmd)
Send Command To Camera.
static float stateGetHorizontalSpeedDir_f(void)
Get dir of horizontal ground speed (float).
API to get/set the generic vehicle states.
void dc_periodic(void)
periodic function
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
uint8_t dc_stop(void)
Stop dc control.
float dc_survey_interval
distance between dc shots in meters
Common code for AP and FBW telemetry.
float dc_autoshoot_period
AutoShoot photos every X seconds.
float dc_distance_interval
AutoShoot photos on distance to last shot in meters.
uint16_t dc_gps_count
number of images taken since the last change of dc_mode
struct GpsState gps
global GPS state
static struct LlaCoor_i * stateGetPositionLla_i(void)
Get position in LLA coordinates (int).
#define DC_AUTOSHOOT_DISTANCE_INTERVAL
default distance interval for distance mode: 50m
void dc_send_shot_position(void)
Send Down the coordinates of where the photo was taken.
float dc_cam_angle
camera angle