Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "generated/airframe.h"
#include "approach_moving_target.h"
#include "generated/modules.h"
#include "modules/core/abi.h"
#include "filters/low_pass_filter.h"
#include <stdio.h>
#include "modules/datalink/telemetry.h"
Go to the source code of this file.
Data Structures | |
struct | AmtTelem |
Macros | |
#define | APPROACH_MOVING_TARGET_CUTOFF_FREQ_FILTERS_HZ 0.5 |
#define | APPROACH_MOVING_TARGET_SLOPE 35.0 |
#define | APPROACH_MOVING_TARGET_DISTANCE 60.0 |
#define | APPROACH_MOVING_TARGET_SPEED -1.0 |
#define | APPROACH_MOVING_TARGET_ERR_SLOWDOWN_GAIN 0.25 |
#define | APPROACH_MOVING_TARGET_POS_GAIN 0.3 |
#define | APPROACH_MOVING_TARGET_SPEED_GAIN 1.0 |
#define | APPROACH_MOVING_TARGET_RELVEL_GAIN 1.0 |
#define | DEBUG_AMT TRUE |
Functions | |
struct FloatVect3 | nav_get_speed_sp_from_diagonal (struct EnuCoor_i target, float pos_gain, float rope_heading) |
void | update_waypoint (uint8_t wp_id, struct FloatVect3 *target_ned) |
static void | send_approach_moving_target (struct transport_tx *trans, struct link_device *dev) |
void | approach_moving_target_init (void) |
void | approach_moving_target_set_low_pass_freq (float filter_freq) |
void | approach_moving_target_enable (uint8_t wp_id) |
void | follow_diagonal_approach (void) |
Generates a velocity reference from a diagonal approach path. More... | |
Variables | |
Butterworth2LowPass | target_pos_filt [3] |
Butterworth2LowPass | target_vel_filt [3] |
Butterworth2LowPass | target_heading_filt |
struct Amt | amt |
struct AmtTelem | amt_telem |
bool | approach_moving_target_enabled = false |
Definition in file approach_moving_target.c.
struct AmtTelem |
Definition at line 93 of file approach_moving_target.c.
Data Fields | ||
---|---|---|
struct FloatVect3 | des_pos | |
struct FloatVect3 | des_vel |
#define APPROACH_MOVING_TARGET_CUTOFF_FREQ_FILTERS_HZ 0.5 |
Definition at line 37 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_DISTANCE 60.0 |
Definition at line 47 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_ERR_SLOWDOWN_GAIN 0.25 |
Definition at line 57 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_POS_GAIN 0.3 |
Definition at line 61 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_RELVEL_GAIN 1.0 |
Definition at line 69 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_SLOPE 35.0 |
Definition at line 42 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_SPEED -1.0 |
Definition at line 52 of file approach_moving_target.c.
#define APPROACH_MOVING_TARGET_SPEED_GAIN 1.0 |
Definition at line 65 of file approach_moving_target.c.
#define DEBUG_AMT TRUE |
Definition at line 76 of file approach_moving_target.c.
void approach_moving_target_enable | ( | uint8_t | wp_id | ) |
Definition at line 161 of file approach_moving_target.c.
References amt, Amt::enabled_time, get_sys_time_msec(), and Amt::wp_id.
void approach_moving_target_init | ( | void | ) |
Definition at line 119 of file approach_moving_target.c.
References amt, approach_moving_target_set_low_pass_freq(), Amt::cutoff_freq_filters_hz, DefaultPeriodic, register_periodic_telemetry(), and send_approach_moving_target().
void approach_moving_target_set_low_pass_freq | ( | float | filter_freq | ) |
Definition at line 127 of file approach_moving_target.c.
References amt, Amt::cutoff_freq_filters_hz, init_butterworth_2_low_pass(), target_heading_filt, target_pos_filt, and target_vel_filt.
Referenced by approach_moving_target_init().
void follow_diagonal_approach | ( | void | ) |
Generates a velocity reference from a diagonal approach path.
Definition at line 171 of file approach_moving_target.c.
struct FloatVect3 nav_get_speed_sp_from_diagonal | ( | struct EnuCoor_i | target, |
float | pos_gain, | ||
float | rope_heading | ||
) |
|
static |
Definition at line 106 of file approach_moving_target.c.
References amt, amt_telem, AmtTelem::des_pos, AmtTelem::des_vel, dev, Amt::distance, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by approach_moving_target_init().
void update_waypoint | ( | uint8_t | wp_id, |
struct FloatVect3 * | target_ned | ||
) |
Definition at line 142 of file approach_moving_target.c.
References DefaultChannel, DefaultDevice, ENU_OF_TO_NED, waypoint_set_enu(), waypoints, point::x, and point::y.
struct Amt amt |
Definition at line 74 of file approach_moving_target.c.
Referenced by approach_moving_target_enable(), approach_moving_target_init(), approach_moving_target_set_low_pass_freq(), and send_approach_moving_target().
struct AmtTelem amt_telem |
Definition at line 74 of file approach_moving_target.c.
Referenced by send_approach_moving_target().
bool approach_moving_target_enabled = false |
Definition at line 99 of file approach_moving_target.c.
Butterworth2LowPass target_heading_filt |
Definition at line 74 of file approach_moving_target.c.
Referenced by approach_moving_target_set_low_pass_freq().
Butterworth2LowPass target_pos_filt[3] |
Definition at line 72 of file approach_moving_target.c.
Referenced by approach_moving_target_set_low_pass_freq().
Butterworth2LowPass target_vel_filt[3] |
Definition at line 73 of file approach_moving_target.c.
Referenced by approach_moving_target_set_low_pass_freq().