|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
30 #include "generated/modules.h"
31 #include "generated/airframe.h"
37 #define DC_CTRL_PARROT_MYKONOS_RECORD_DELAY 0.05
40 #define DC_CTRL_PARROT_MYKONOS_LOG_DELAY 50
43 #define DC_CTRL_PARROT_MYKONOS_TIMER_OF_DELAY(_delay) ((uint32_t)(_delay * DC_CTRL_PARROT_MYKONOS_PERIODIC_FREQ))
46 #ifndef DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DELAY
47 #define DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DELAY 5.0
49 #define DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_TIMER_OF_DELAY(_delay) ((uint32_t)(_delay * DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_FREQ))
52 #if DC_CTRL_PARROT_MYKONOS_SYNC_SEND
54 #include "pprzlink/messages.h"
61 static inline void dc_ctrl_parrot_mykonos_send_shot_position(
void)
110 #if DC_CTRL_PARROT_MYKONOS_LOG
129 int ret __attribute__((unused));
133 ret = system(
"media-ctl -l \'\"mt9f002 0-0010\":0->\"avicam.0\":0[1]\'");
134 ret = system(
"media-ctl -l \'\"avicam_dummy_dev.0\":0->\"avicam.0\":0[0]\'");
136 ret = system(
"prestart dxowrapperd");
137 ret = system(
"prestart pimp");
139 #if DC_CTRL_PARROT_MYKONOS_STREAM_AT_STARTUP
164 #if DC_CTRL_PARROT_MYKONOS_LOG
165 dc_ctrl_parrot_mykonos_log_shot_position();
168 #if DC_CTRL_PARROT_MYKONOS_SYNC_SEND
169 dc_ctrl_parrot_mykonos_send_shot_position();
211 int ret __attribute__((unused));
217 ret = system(
"pimpctl recording-start front");
225 ret = system(
"pimpctl recording-stop front");
232 ret = system(
"pimpctl take-picture front");
253 ret = system(
"pimpctl stream-start front 192.168.42.0 55004");
260 ret = system(
"pimpctl stream-stop front 192.168.42.0 55004");
268 ret = system(
"pimpctl take-picture front");
291 #ifdef DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST
296 if (
VECT2_NORM2(d_pos) > (DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST * DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST)
303 #ifdef DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DIST
void dc_send_command_common(uint8_t cmd)
Command sending function.
static float stateGetHorizontalSpeedDir_f(void)
Get dir of horizontal ground speed (float).
@ DC_CTRL_PARROT_MYKONOS_RECORD_STOP
#define DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_DELAY
autoshoot timer delay based on periodic freq from modules.h
uint32_t tow
GPS time of week in ms.
void dc_ctrl_parrot_mykonos_autoshoot(void)
enum dc_ctrl_parrot_mykonos_status status
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
struct Dc_Ctrl_Parrot_Mykonos dc_ctrl_parrot_mykonos
Send report.
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
static struct LlaCoor_i * stateGetPositionLla_i(void)
Get position in LLA coordinates (int).
#define DC_CTRL_PARROT_MYKONOS_LOG_DELAY
delay in milli-seconds before logging after a shot in ms
void dc_ctrl_parrot_mykonos_periodic(void)
@ DC_CTRL_PARROT_MYKONOS_NONE
dc_ctrl_parrot_mykonos_status
Device independent GPS code (interface)
void dc_send_command(uint8_t cmd)
Send Command To Camera.
@ DC_CTRL_PARROT_MYKONOS_STREAM_START
Architecture independent timing functions.
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
vector in East North Up coordinates Units: meters
Digital video/photo recorder control for Parrot Mykonos Platform, For others that is: control the cam...
#define DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_TIMER_OF_DELAY(_delay)
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
Common code for AP and FBW telemetry.
#define DC_CTRL_PARROT_MYKONOS_TIMER_OF_DELAY(_delay)
Get timer from delay based on periodic freq from modules.h.
@ DC_CTRL_PARROT_MYKONOS_SHOOT
@ DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_START
#define DC_CTRL_PARROT_MYKONOS_RECORD_DELAY
NOTES: For now only the front cam is used, feel free to extend.
@ DC_CTRL_PARROT_MYKONOS_AUTOSHOOT_STOP
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
void dc_ctrl_parrot_mykonos_autoshoot_start(void)
struct EnuCoor_f last_shot_pos
int32_t hmsl
height above mean sea level (MSL) in mm
void dc_ctrl_parrot_mykonos_init(void)
@ DC_CTRL_PARROT_MYKONOS_STREAM_STOP
void dc_ctrl_parrot_mykonos_command(enum dc_ctrl_parrot_mykonos_status cmd)
@ DC_CTRL_PARROT_MYKONOS_RECORD_START
void dc_init(void)
initialize settings
void dc_periodic(void)
periodic function
struct GpsState gps
global GPS state