Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
dcf.c File Reference
#include <math.h>
#include <std.h>
#include "modules/muti/dcf/dcf.h"
#include "subsystems/datalink/telemetry.h"
#include "subsystems/navigation/common_nav.h"
#include "autopilot.h"
+ Include dependency graph for dcf.c:

Go to the source code of this file.

Macros

#define DCF_GAIN_K   10
 
#define DCF_RADIUS   80
 
#define DCF_TIMEOUT   1500
 
#define DCF_BROADTIME   200
 

Functions

static void send_dcf (struct transport_tx *trans, struct link_device *dev)
 
void dcf_init (void)
 
bool distributed_circular (uint8_t wp)
 
void send_theta_to_nei (void)
 
void parseRegTable (uint8_t *buf)
 
void parseThetaTable (uint8_t *buf)
 

Variables

struct dcf_con dcf_control = {DCF_GAIN_K, DCF_RADIUS, DCF_TIMEOUT, 0, DCF_BROADTIME}
 
struct dcf_tab dcf_tables
 
uint32_t last_transmision = 0
 

Macro Definition Documentation

◆ DCF_BROADTIME

#define DCF_BROADTIME   200

Default broadcasting time

Definition at line 55 of file dcf.c.

◆ DCF_GAIN_K

#define DCF_GAIN_K   10

Default gain k for the algorithm

Definition at line 43 of file dcf.c.

◆ DCF_RADIUS

#define DCF_RADIUS   80

Default radius for the circumference

Definition at line 47 of file dcf.c.

◆ DCF_TIMEOUT

#define DCF_TIMEOUT   1500

Default timeout for the neighbors' information

Definition at line 51 of file dcf.c.

Function Documentation

◆ dcf_init()

void dcf_init ( void  )

Definition at line 63 of file dcf.c.

References DCF_MAX_NEIGHBORS, dcf_tables, DefaultPeriodic, dcf_tab::error_sigma, register_periodic_telemetry(), send_dcf(), and dcf_tab::tableNei.

+ Here is the call graph for this function:

◆ distributed_circular()

◆ parseRegTable()

void parseRegTable ( uint8_t buf)

Definition at line 140 of file dcf.c.

References ac_id, DCF_MAX_NEIGHBORS, dcf_tables, and dcf_tab::tableNei.

◆ parseThetaTable()

void parseThetaTable ( uint8_t buf)

Definition at line 169 of file dcf.c.

References DCF_MAX_NEIGHBORS, dcf_tables, get_sys_time_msec(), dcf_tab::last_theta, and dcf_tab::tableNei.

+ Here is the call graph for this function:

◆ send_dcf()

static void send_dcf ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 33 of file dcf.c.

References DCF_MAX_NEIGHBORS, dcf_tables, dev, dcf_tab::error_sigma, and dcf_tab::tableNei.

Referenced by dcf_init().

+ Here is the caller graph for this function:

◆ send_theta_to_nei()

void send_theta_to_nei ( void  )

Definition at line 125 of file dcf.c.

References dcf_control, DCF_MAX_NEIGHBORS, dcf_tables, DefaultChannel, DefaultDevice, msg, dcf_tab::tableNei, and dcf_con::theta.

Referenced by distributed_circular().

+ Here is the caller graph for this function:

Variable Documentation

◆ dcf_control

struct dcf_con dcf_control = {DCF_GAIN_K, DCF_RADIUS, DCF_TIMEOUT, 0, DCF_BROADTIME}

Definition at line 58 of file dcf.c.

Referenced by distributed_circular(), and send_theta_to_nei().

◆ dcf_tables

struct dcf_tab dcf_tables

◆ last_transmision

uint32_t last_transmision = 0

Definition at line 61 of file dcf.c.

Referenced by distributed_circular().