![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Standard Digital Camera Control Interface. More...
Go to the source code of this file.
Macros | |
#define | DC_AUTOSHOOT_PERIOD 1.0 |
default time interval for periodic mode: 1sec | |
#define | DC_AUTOSHOOT_DISTANCE_INTERVAL 50 |
default distance interval for distance mode: 50m | |
#define | DC_AUTOSHOOT_DISTANCE_INIT 0 |
default distance of the first shoot: 0m (start immediately) | |
#define | DC_AUTOSHOOT_SURVEY_INTERVAL 50 |
default distance interval for survey mode: 50m | |
#define | DC_SHOT_SYNC_SEND 1 |
by default send DC_SHOT message when photo was taken | |
Functions | |
void | dc_send_shot_position (void) |
Send Down the coordinates of where the photo was taken. | |
void | dc_init (void) |
initialize settings | |
uint8_t | dc_info (void) |
Send an info message. | |
void | dc_send_command_common (uint8_t cmd) |
Command sending function. | |
void WEAK | dc_set_expo (float expo UNUSED) |
Set camera exposure. | |
uint8_t | dc_distance (float interval) |
Sets the dc control in distance mode. | |
uint8_t | dc_circle (float interval, float start) |
Sets the dc control in circle mode. | |
uint8_t | dc_survey (float interval, float x, float y) |
Sets the dc control in distance mode. | |
uint8_t | dc_stop (void) |
Stop dc control. | |
static float | dim_mod (float a, float b, float m) |
void | dc_periodic (void) |
periodic function | |
Variables | |
dc_autoshoot_type | dc_autoshoot = DC_AUTOSHOOT_STOP |
uint16_t | dc_gps_count = 0 |
number of images taken since the last change of dc_mode | |
uint8_t | dc_cam_tracing = 1 |
float | dc_cam_angle = 0 |
camera angle | |
float | dc_exposure |
camera exposure | |
float | dc_circle_interval = 0 |
angle between dc shots in degree | |
float | dc_circle_start_angle = 0 |
angle a where first image will be taken at a + delta | |
float | dc_circle_last_block = 0 |
float | dc_circle_max_blocks = 0 |
float | dc_survey_interval = DC_AUTOSHOOT_SURVEY_INTERVAL |
distance between dc shots in meters | |
float | dc_gps_next_dist = 0 |
float | dc_gps_x = 0 |
point of reference for the survey mode | |
float | dc_gps_y = 0 |
static struct FloatVect2 | last_shot_pos = {0.0, 0.0} |
float | dc_distance_interval |
AutoShoot photos on distance to last shot in meters. | |
float | dc_autoshoot_period |
AutoShoot photos every X seconds. | |
Standard Digital Camera Control Interface.
-Standard IO -I2C Control
Usage: (from the flight plan, the settings or any airborne code):
Definition in file dc.c.
#define DC_AUTOSHOOT_DISTANCE_INIT 0 |
#define DC_AUTOSHOOT_DISTANCE_INTERVAL 50 |
#define DC_AUTOSHOOT_PERIOD 1.0 |
#define DC_AUTOSHOOT_SURVEY_INTERVAL 50 |
#define DC_SHOT_SYNC_SEND 1 |
Sets the dc control in circle mode.
In this mode the dc control assumes a perfect circular course.
The 'start' value is the reference course and 'interval' the minimum angle between shots. If 'start' is DC_IGNORE the current course is used instead.
The first picture is taken at angle start+interval.
interval | minimum angle between shots in deg |
start | reference course in deg (or special DC_IGNORE) |
Definition at line 218 of file dc.c.
References dc_autoshoot, DC_AUTOSHOOT_CIRCLE, dc_circle_interval, dc_circle_last_block, dc_circle_max_blocks, dc_circle_start_angle, dc_gps_count, DC_IGNORE, dc_info(), foo, and stateGetNedToBodyEulers_f().
Sets the dc control in distance mode.
Shoot the next pic if distance to last saved shot position is greater than interval.
The first picture is taken at after interval.
interval | minimum distance between shots in m |
Definition at line 205 of file dc.c.
References dc_autoshoot, DC_AUTOSHOOT_DISTANCE, dc_distance_interval, dc_gps_count, dc_info(), foo, last_shot_pos, FloatVect2::x, and FloatVect2::y.
Send an info message.
Containing information about position, course, buffer and all other internal variables used by the dc control.
Definition at line 166 of file dc.c.
References course, dc_autoshoot, dc_autoshoot_period, dc_circle_interval, dc_circle_last_block, dc_circle_start_angle, dc_gps_count, dc_gps_next_dist, dc_gps_x, dc_gps_y, dc_photo_nr, dc_survey_interval, DefaultChannel, DefaultDevice, foo, mode, stateGetNedToBodyEulers_f(), and stateGetPositionLla_i().
Referenced by dc_circle(), dc_distance(), dc_stop(), and dc_survey().
initialize settings
Definition at line 158 of file dc.c.
References dc_autoshoot, DC_AUTOSHOOT_DISTANCE_INTERVAL, DC_AUTOSHOOT_PERIOD, dc_autoshoot_period, DC_AUTOSHOOT_STOP, dc_distance_interval, and dc_exposure.
periodic function
Definition at line 279 of file dc.c.
References course, dc_autoshoot, DC_AUTOSHOOT_CIRCLE, DC_AUTOSHOOT_DISTANCE, dc_autoshoot_period, DC_AUTOSHOOT_PERIODIC, DC_AUTOSHOOT_STOP, DC_AUTOSHOOT_SURVEY, dc_circle_interval, dc_circle_last_block, dc_circle_max_blocks, dc_circle_start_angle, dc_distance_interval, dc_gps_count, dc_gps_next_dist, dc_gps_x, dc_gps_y, dc_send_command(), DC_SHOOT, dc_survey_interval, dim_mod(), float_vect2_norm(), foo, get_sys_time_float(), last_shot_pos, stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), VECT2_COPY, VECT2_DIFF, FloatVect2::x, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by atmega_i2c_cam_ctrl_periodic(), dc_ctrl_parrot_mykonos_periodic(), digital_cam_uart_periodic(), digital_cam_video_periodic(), gpio_cam_ctrl_periodic(), pprzlink_cam_ctrl_periodic(), and servo_cam_ctrl_periodic().
Command sending function.
Definition at line 192 of file dc.c.
References extra_pprz_tp, and foo.
Referenced by dc_send_command().
Send Down the coordinates of where the photo was taken.
Definition at line 153 of file dc.c.
Referenced by atmega_i2c_cam_ctrl_send(), dc_send_command(), gpio_cam_ctrl_periodic(), and servo_cam_ctrl_periodic().
Stop dc control.
Sets the dc control in inactive mode, stopping all current actions.
Definition at line 262 of file dc.c.
References dc_autoshoot, DC_AUTOSHOOT_STOP, and dc_info().
Referenced by gvf_nav_survey_polygon_run(), nav_spiral_run(), and nav_survey_polygon_run().
Sets the dc control in distance mode.
In this mode, the dc control assumes a perfect line formed course since the distance is calculated relative to the first given point of reference. So not usable for circles or other comparable shapes.
The values of 'x' and 'y' are the coordinates of the reference point used for the distance calculations. If 'y' is DC_IGNORE the value of 'x' is interpreted as index of a waypoint declared in the flight plan. If both 'x' and 'y' are DC_IGNORE the current position will be used as reference point.
interval | distance between shots in meters |
x | x coordinate of reference point (or special DC_IGNORE) |
y | y coordinate of reference point (or special DC_IGNORE) |
Definition at line 240 of file dc.c.
References dc_autoshoot, DC_AUTOSHOOT_DISTANCE_INIT, DC_AUTOSHOOT_SURVEY, dc_gps_count, dc_gps_next_dist, dc_gps_x, dc_gps_y, DC_IGNORE, dc_info(), dc_survey_interval, foo, stateGetPositionEnu_f(), WaypointX, WaypointY, FloatVect2::x, EnuCoor_f::x, FloatVect2::y, and EnuCoor_f::y.
Referenced by gvf_nav_survey_polygon_run(), and nav_survey_polygon_run().
Definition at line 269 of file dc.c.
Referenced by dc_periodic().
dc_autoshoot_type dc_autoshoot = DC_AUTOSHOOT_STOP |
Definition at line 67 of file dc.c.
Referenced by dc_circle(), dc_distance(), dc_info(), dc_init(), dc_periodic(), dc_stop(), dc_survey(), and nav_survey_poly_osam_run().
float dc_autoshoot_period |
AutoShoot photos every X seconds.
Definition at line 86 of file dc.c.
Referenced by dc_info(), dc_init(), and dc_periodic().
float dc_cam_angle = 0 |
uint8_t dc_cam_tracing = 1 |
Definition at line 69 of file dc.c.
Referenced by nav_spiral_run().
float dc_circle_interval = 0 |
angle between dc shots in degree
Definition at line 74 of file dc.c.
Referenced by dc_circle(), dc_info(), and dc_periodic().
float dc_circle_last_block = 0 |
Definition at line 76 of file dc.c.
Referenced by dc_circle(), dc_info(), and dc_periodic().
float dc_circle_max_blocks = 0 |
Definition at line 77 of file dc.c.
Referenced by dc_circle(), and dc_periodic().
float dc_circle_start_angle = 0 |
angle a where first image will be taken at a + delta
Definition at line 75 of file dc.c.
Referenced by dc_circle(), dc_info(), and dc_periodic().
float dc_distance_interval |
AutoShoot photos on distance to last shot in meters.
Definition at line 85 of file dc.c.
Referenced by dc_distance(), dc_init(), dc_periodic(), nav_survey_hybrid_run(), nav_survey_poly_run(), and nav_survey_rectangle_rotorcraft_run().
float dc_exposure |
camera exposure
Definition at line 72 of file dc.c.
Referenced by dc_expo_cb(), dc_init(), dc_set_expo(), and pprzlink_cam_ctrl_init().
uint16_t dc_gps_count = 0 |
number of images taken since the last change of dc_mode
Definition at line 68 of file dc.c.
Referenced by dc_circle(), dc_distance(), dc_info(), dc_periodic(), and dc_survey().
float dc_gps_next_dist = 0 |
Definition at line 80 of file dc.c.
Referenced by dc_info(), dc_periodic(), and dc_survey().
float dc_gps_x = 0 |
point of reference for the survey mode
Definition at line 81 of file dc.c.
Referenced by dc_info(), dc_periodic(), and dc_survey().
float dc_gps_y = 0 |
Definition at line 82 of file dc.c.
Referenced by dc_info(), dc_periodic(), and dc_survey().
float dc_survey_interval = DC_AUTOSHOOT_SURVEY_INTERVAL |
distance between dc shots in meters
Definition at line 79 of file dc.c.
Referenced by dc_info(), dc_periodic(), and dc_survey().
|
static |
Definition at line 84 of file dc.c.
Referenced by dc_distance(), and dc_periodic().