Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Guiding vector field algorithm for 2D and 3D complex trajectories. More...
#include <iostream>
#include <Eigen/Dense>
#include "gvf_parametric.h"
#include "gvf_parametric_low_level_control.h"
#include "./trajectories/gvf_parametric_3d_ellipse.h"
#include "./trajectories/gvf_parametric_3d_lissajous.h"
#include "./trajectories/gvf_parametric_2d_trefoil.h"
#include "./trajectories/gvf_parametric_2d_bezier_splines.h"
#include "../gvf_common.h"
#include "autopilot.h"
#include "modules/datalink/telemetry.h"
Go to the source code of this file.
Functions | |
static void | send_gvf_parametric (struct transport_tx *trans, struct link_device *dev) |
void | gvf_parametric_init (void) |
void | gvf_parametric_set_direction (int8_t s) |
void | gvf_parametric_control_2D (float kx, float ky, float f1, float f2, float f1d, float f2d, float f1dd, float f2dd) |
bool | gvf_parametric_2D_trefoil_XY (float xo, float yo, float w1, float w2, float ratio, float r, float alpha) |
2D TRAJECTORIES More... | |
bool | gvf_parametric_2D_trefoil_wp (uint8_t wp, float w1, float w2, float ratio, float r, float alpha) |
bool | gvf_parametric_2D_bezier_XY (void) |
bool | gvf_parametric_2D_bezier_wp (uint8_t first_wp) |
Guiding vector field algorithm for 2D and 3D complex trajectories.
Definition in file gvf_parametric.cpp.
bool gvf_parametric_2D_bezier_wp | ( | uint8_t | first_wp | ) |
Definition at line 382 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, create_bezier_spline(), gvf_bezier_2D, GVF_PARAMETRIC_2D_BEZIER_N_SEG, gvf_parametric_2d_bezier_par, gvf_parametric_2D_bezier_XY(), gvf_parametric_control, gvf_parametric_plen, gvf_parametric_plen_wps, gvf_parametric_splines_ctr, gvf_parametric_trajectory, gvf_par_2d_bezier_par::kx, gvf_par_2d_bezier_par::ky, gvf_parametric_tra::p_parametric, gvf_parametric_con::w, WaypointX, WaypointY, EnuCoor_f::x, and EnuCoor_f::y.
bool gvf_parametric_2D_bezier_XY | ( | void | ) |
Definition at line 369 of file gvf_parametric.cpp.
References BEZIER_2D, gvf_bezier_2D, gvf_parametric_2d_bezier_par, gvf_parametric_2d_bezier_splines_info(), gvf_parametric_control_2D(), gvf_parametric_trajectory, gvf_par_2d_bezier_par::kx, gvf_par_2d_bezier_par::ky, and gvf_parametric_tra::type.
Referenced by gvf_parametric_2D_bezier_wp().
bool gvf_parametric_2D_trefoil_wp | ( | uint8_t | wp, |
float | w1, | ||
float | w2, | ||
float | ratio, | ||
float | r, | ||
float | alpha | ||
) |
Definition at line 360 of file gvf_parametric.cpp.
References alpha, gvf_parametric_2D_trefoil_XY(), gvf_parametric_plen_wps, gvf_parametric_trajectory, gvf_parametric_tra::p_parametric, WaypointX, and WaypointY.
bool gvf_parametric_2D_trefoil_XY | ( | float | xo, |
float | yo, | ||
float | w1, | ||
float | w2, | ||
float | ratio, | ||
float | r, | ||
float | alpha | ||
) |
2D TRAJECTORIES
Definition at line 338 of file gvf_parametric.cpp.
References alpha, gvf_parametric_2d_trefoil_info(), gvf_parametric_2d_trefoil_par, gvf_parametric_control_2D(), gvf_parametric_plen, gvf_parametric_plen_wps, gvf_parametric_trajectory, gvf_par_2d_tre_par::kx, gvf_par_2d_tre_par::ky, gvf_parametric_tra::p_parametric, TREFOIL_2D, and gvf_parametric_tra::type.
Referenced by gvf_parametric_2D_trefoil_wp().
void gvf_parametric_control_2D | ( | float | kx, |
float | ky, | ||
float | f1, | ||
float | f2, | ||
float | f1d, | ||
float | f2d, | ||
float | f1dd, | ||
float | f2dd | ||
) |
Definition at line 125 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, course, gvf_parametric_con::delta_T, desired_x, desired_y, get_sys_time_msec(), ground_speed, gvf_c_info, gvf_c_omega, gvf_parametric_control, gvf_parametric_elen, gvf_parametric_low_level_control_2D(), gvf_parametric_t0, gvf_parametric_trajectory, h(), I, J, gvf_parametric_con::k_psi, gvf_common_params::kappa, gvf_parametric_con::L, gvf_common_omega::omega, gvf_common_params::ori_err, gvf_parametric_tra::phi_errors, gvf_parametric_con::s, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), stateGetSpeedEnu_f(), gvf_parametric_con::w, EnuCoor_f::x, mesonh.mesonh_atmosphere::X, and EnuCoor_f::y.
Referenced by gvf_parametric_2D_bezier_XY(), and gvf_parametric_2D_trefoil_XY().
void gvf_parametric_init | ( | void | ) |
Definition at line 100 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, DefaultPeriodic, gvf_parametric_con::delta_T, gvf_parametric_control, GVF_PARAMETRIC_CONTROL_BETA, GVF_PARAMETRIC_CONTROL_KCLIMB, GVF_PARAMETRIC_CONTROL_KPSI, GVF_PARAMETRIC_CONTROL_KROLL, GVF_PARAMETRIC_CONTROL_L, gvf_parametric_con::k_climb, gvf_parametric_con::k_psi, gvf_parametric_con::k_roll, gvf_parametric_con::L, register_periodic_telemetry(), gvf_parametric_con::s, send_gvf_parametric(), and gvf_parametric_con::w.
void gvf_parametric_set_direction | ( | int8_t | s | ) |
Definition at line 120 of file gvf_parametric.cpp.
References gvf_parametric_control, gvf_parametric_con::s, and s.
|
static |
Definition at line 64 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, dev, get_sys_time_msec(), gvf_parametric_control, gvf_parametric_elen, gvf_parametric_plen, gvf_parametric_splines_ctr, gvf_parametric_t0, gvf_parametric_trajectory, gvf_parametric_tra::p_parametric, gvf_parametric_tra::phi_errors, gvf_parametric_con::s, gvf_parametric_tra::type, and gvf_parametric_con::w.
Referenced by gvf_parametric_init().
bezier_t gvf_bezier_2D[GVF_PARAMETRIC_2D_BEZIER_N_SEG] |
Definition at line 60 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2D_bezier_wp(), and gvf_parametric_2D_bezier_XY().
gvf_parametric_con gvf_parametric_control |
Definition at line 47 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2d_bezier_splines_info(), gvf_parametric_2D_bezier_wp(), gvf_parametric_2d_trefoil_info(), gvf_parametric_3d_ellipse_info(), gvf_parametric_3d_lissajous_info(), gvf_parametric_control_2D(), gvf_parametric_init(), gvf_parametric_low_level_control_2D(), gvf_parametric_low_level_control_3D(), gvf_parametric_set_direction(), and send_gvf_parametric().
int gvf_parametric_elen = 3 |
Definition at line 57 of file gvf_parametric.cpp.
Referenced by gvf_parametric_control_2D(), and send_gvf_parametric().
int gvf_parametric_plen = 1 |
Definition at line 53 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2D_bezier_wp(), gvf_parametric_2D_trefoil_XY(), and send_gvf_parametric().
int gvf_parametric_plen_wps = 0 |
Definition at line 54 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2D_bezier_wp(), gvf_parametric_2D_trefoil_wp(), and gvf_parametric_2D_trefoil_XY().
uint32_t gvf_parametric_splines_ctr = 0 |
Definition at line 46 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2D_bezier_wp(), and send_gvf_parametric().
uint32_t gvf_parametric_t0 = 0 |
Definition at line 45 of file gvf_parametric.cpp.
Referenced by gvf_parametric_control_2D(), and send_gvf_parametric().
gvf_parametric_tra gvf_parametric_trajectory |
Definition at line 50 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2D_bezier_wp(), gvf_parametric_2D_bezier_XY(), gvf_parametric_2d_trefoil_info(), gvf_parametric_2D_trefoil_wp(), gvf_parametric_2D_trefoil_XY(), gvf_parametric_3d_ellipse_info(), gvf_parametric_3d_lissajous_info(), gvf_parametric_control_2D(), and send_gvf_parametric().