Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
dc.c File Reference
#include "dc.h"
+ Include dependency graph for dc.c:

Go to the source code of this file.

Functions

uint8_t dc_info (void)
 Send an info message containing information about position, course, buffer and all other internal variables used by the dc control. More...
 
uint8_t dc_circle (float interval, float start)
 Sets the dc control in circle mode. More...
 
uint8_t dc_survey (float interval, float x, float y)
 Sets the dc control in distance mode. More...
 
uint8_t dc_stop (void)
 Sets the dc control in inactive mode, stopping all current actions. More...
 

Variables

uint8_t dc_autoshoot_meter_grid = 100
 
uint8_t dc_autoshoot_quartersec_period = 2
 
dc_autoshoot_type dc_autoshoot = DC_AUTOSHOOT_STOP
 
uint16_t dc_gps_count = 0
 
uint8_t dc_cam_tracing = 1
 
float dc_cam_angle = 0
 
float dc_circle_interval = 0
 
float dc_circle_start_angle = 0
 
float dc_circle_last_block = 0
 
float dc_circle_max_blocks = 0
 
float dc_gps_dist = 50
 
float dc_gps_next_dist = 0
 
float dc_gps_x = 0
 
float dc_gps_y = 0
 
bool_t dc_probing = FALSE
 

Function Documentation

uint8_t dc_circle ( float  interval,
float  start 
)

Sets the dc control in circle mode.

The 'start' value is the reference course and 'intervall' the minimum angle between shots. If 'start' is 0 the current course is used instead.

In this mode the dc control assumes a perfect circular course. The first picture is taken at angle start+interval.

Definition at line 112 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(), dc_probing, stateGetNedToBodyEulers_f(), and TRUE.

+ Here is the call graph for this function:

uint8_t dc_info ( void  )

Send an info message containing information about position, course, buffer and all other internal variables used by the dc control.

Definition at line 89 of file dc.c.

References dc_autoshoot, dc_autoshoot_quartersec_period, dc_circle_interval, dc_circle_last_block, dc_circle_start_angle, dc_gps_count, dc_gps_dist, dc_gps_next_dist, dc_gps_x, dc_gps_y, DefaultChannel, DefaultDevice, stateGetNedToBodyEulers_f(), and stateGetPositionEnu_f().

Referenced by dc_circle(), dc_stop(), and dc_survey().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t dc_stop ( void  )

Sets the dc control in inactive mode, stopping all current actions.

Definition at line 153 of file dc.c.

References dc_autoshoot, DC_AUTOSHOOT_STOP, and dc_info().

Referenced by poly_survey_adv(), and SpiralNav().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t dc_survey ( float  interval,
float  x,
float  y 
)

Sets the dc control in distance mode.

The values of 'x' and 'y' are the coordinates of the reference point used for the distance calculations. If 'y' is 0 the value of 'x' is interpreted as index of a waypoint declared in the flight plan. If both 'x' and 'y' are 0 the current position will be used as reference point.

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.

Definition at line 133 of file dc.c.

References dc_autoshoot, DC_AUTOSHOOT_SURVEY, dc_gps_count, dc_gps_dist, dc_gps_next_dist, dc_gps_x, dc_gps_y, DC_IGNORE, dc_info(), stateGetPositionEnu_f(), waypoints, EnuCoor_f::x, and EnuCoor_f::y.

Referenced by poly_survey_adv().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

Definition at line 29 of file dc.c.

Referenced by dc_circle(), dc_info(), dc_periodic_4Hz(), dc_stop(), and dc_survey().

uint8_t dc_autoshoot_meter_grid = 100

Definition at line 27 of file dc.c.

Referenced by dc_init(), and dc_periodic_4Hz().

uint8_t dc_autoshoot_quartersec_period = 2

Definition at line 28 of file dc.c.

Referenced by dc_info(), dc_init(), and dc_periodic_4Hz().

float dc_cam_angle = 0

Definition at line 32 of file dc.c.

Referenced by SpiralNav().

uint8_t dc_cam_tracing = 1

Definition at line 31 of file dc.c.

Referenced by SpiralNav().

float dc_circle_interval = 0

Definition at line 34 of file dc.c.

Referenced by dc_circle(), dc_info(), and dc_periodic_4Hz().

float dc_circle_last_block = 0

Definition at line 36 of file dc.c.

Referenced by dc_circle(), dc_info(), and dc_periodic_4Hz().

float dc_circle_max_blocks = 0

Definition at line 37 of file dc.c.

Referenced by dc_circle(), and dc_periodic_4Hz().

float dc_circle_start_angle = 0

Definition at line 35 of file dc.c.

Referenced by dc_circle(), dc_info(), and dc_periodic_4Hz().

uint16_t dc_gps_count = 0

Definition at line 30 of file dc.c.

Referenced by dc_circle(), dc_info(), dc_periodic_4Hz(), and dc_survey().

float dc_gps_dist = 50

Definition at line 39 of file dc.c.

Referenced by dc_info(), dc_periodic_4Hz(), and dc_survey().

float dc_gps_next_dist = 0

Definition at line 40 of file dc.c.

Referenced by dc_info(), dc_periodic_4Hz(), and dc_survey().

float dc_gps_x = 0

Definition at line 41 of file dc.c.

Referenced by dc_info(), dc_periodic_4Hz(), and dc_survey().

float dc_gps_y = 0

Definition at line 42 of file dc.c.

Referenced by dc_info(), dc_periodic_4Hz(), and dc_survey().

bool_t dc_probing = FALSE

Definition at line 44 of file dc.c.

Referenced by dc_circle(), and dc_periodic_4Hz().