|
Paparazzi UAS v7.1_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. | |
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, and get_sys_time_msec().
| 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(), 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, 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.
References amt, amt_telem, FLOAT_ANGLE_NORMALIZE, float_vect3_bound_in_3d(), get_sys_time_msec(), nav, NAVIGATION_FREQUENCY, stateGetAirspeed_f(), stateGetPositionNed_f(), target_get_pos(), target_get_vel(), target_heading_filt, target_pos_filt, target_vel_filt, update_butterworth_2_low_pass(), update_waypoint(), VECT3_COPY, VECT3_DIFF, VECT3_NORM2, VECT3_SMUL, VECT3_SUM, VEL_SP_FCR_ID, FloatVect3::x, NedCoor_f::x, FloatVect3::y, NedCoor_f::y, FloatVect3::z, and NedCoor_f::z.
| struct FloatVect3 nav_get_speed_sp_from_diagonal | ( | struct EnuCoor_i | target, |
| float | pos_gain, | ||
| float | rope_heading ) |
References nav_get_speed_sp_from_diagonal(), and target.
Referenced by nav_get_speed_sp_from_diagonal().
|
static |
Definition at line 106 of file approach_moving_target.c.
References amt, amt_telem, and dev.
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(), and waypoints.
Referenced by follow_diagonal_approach().
| struct Amt amt |
Definition at line 79 of file approach_moving_target.c.
Referenced by amt22_get_position(), amt22_get_turns(), amt22_init(), amt22_periodic(), amt22_read(), amt22_thd(), approach_moving_target_enable(), approach_moving_target_init(), approach_moving_target_set_low_pass_freq(), follow_diagonal_approach(), and send_approach_moving_target().
| struct AmtTelem amt_telem |
Definition at line 98 of file approach_moving_target.c.
Referenced by follow_diagonal_approach(), and 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(), and follow_diagonal_approach().
| Butterworth2LowPass target_pos_filt[3] |
Definition at line 72 of file approach_moving_target.c.
Referenced by approach_moving_target_set_low_pass_freq(), and follow_diagonal_approach().
| Butterworth2LowPass target_vel_filt[3] |
Definition at line 73 of file approach_moving_target.c.
Referenced by approach_moving_target_set_low_pass_freq(), and follow_diagonal_approach().