25 #include "modules/muti/dcf/dcf.h"
32 #if PERIODIC_TELEMETRY
33 static void send_dcf(
struct transport_tx *trans,
struct link_device *
dev)
38 #endif // PERIODIC TELEMETRY
51 #define DCF_TIMEOUT 1500
55 #define DCF_BROADTIME 200
70 #if PERIODIC_TELEMETRY
84 dcf_control.
theta = atan2f(y - yc, x - xc);
91 if (timeout > dcf_control.
timeout) {
96 float t1 = dcf_control.
theta;
105 float e = atan2f(c2 * s1 - s2 * c1, c1 * c2 + s1 * s2) -
gvf_control.
s * td;
127 struct pprzlink_msg msg;
133 msg.sender_id = AC_ID;
135 msg.component_id = 0;
136 pprzlink_msg_send_DCF_THETA(&msg, &(dcf_control.
theta));
143 if (ac_id == AC_ID) {
144 uint8_t nei_id = DL_DCF_REG_TABLE_nei_id(buf);
145 int16_t desired_sigma = DL_DCF_REG_TABLE_desired_sigma(buf);
bool distributed_circular(uint8_t wp)
uint32_t last_theta[DCF_MAX_NEIGHBORS]
Periodic telemetry system header (includes downlink utility and generated code).
int16_t error_sigma[DCF_MAX_NEIGHBORS]
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
struct dcf_con dcf_control
vector in East North Up coordinates Units: meters
static void send_dcf(struct transport_tx *trans, struct link_device *dev)
bool gvf_ellipse_XY(float x, float y, float a, float b, float alpha)
int16_t tableNei[DCF_MAX_NEIGHBORS][4]
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
#define DCF_MAX_NEIGHBORS
void send_theta_to_nei(void)
#define DefaultPeriodic
Set default periodic telemetry.
static const struct usb_device_descriptor dev
Core autopilot interface common to all firmwares.
uint32_t last_transmision
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
void parseThetaTable(uint8_t *buf)
struct dcf_tab dcf_tables
void parseRegTable(uint8_t *buf)
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
uint8_t autopilot_get_mode(void)
get autopilot mode