Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#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 "autopilot.h"
#include "subsystems/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) |
static void | send_circle_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) |
void | gvf_parametric_control_3D (float kx, float ky, float kz, float f1, float f2, float f3, float f1d, float f2d, float f3d, float f1dd, float f2dd, float f3dd) |
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_3D_ellipse_XYZ (float xo, float yo, float r, float zl, float zh, float alpha) |
3D TRAJECTORIES More... | |
bool | gvf_parametric_3D_ellipse_wp (uint8_t wp, float r, float zl, float zh, float alpha) |
bool | gvf_parametric_3D_ellipse_wp_delta (uint8_t wp, float r, float alt_center, float delta, float alpha) |
bool | gvf_parametric_3D_lissajous_XYZ (float xo, float yo, float zo, float cx, float cy, float cz, float wx, float wy, float wz, float dx, float dy, float dz, float alpha) |
bool | gvf_parametric_3D_lissajous_wp_center (uint8_t wp, float zo, float cx, float cy, float cz, float wx, float wy, float wz, float dx, float dy, float dz, float alpha) |
Variables | |
uint32_t | gvf_parametric_t0 = 0 |
gvf_parametric_con | gvf_parametric_control |
gvf_parametric_tra | gvf_parametric_trajectory |
Guiding vector field algorithm for 2D and 3D complex trajectories.
Definition in file gvf_parametric.cpp.
bool gvf_parametric_2D_trefoil_wp | ( | uint8_t | wp, |
float | w1, | ||
float | w2, | ||
float | ratio, | ||
float | r, | ||
float | alpha | ||
) |
Definition at line 343 of file gvf_parametric.cpp.
References alpha, gvf_parametric_2D_trefoil_XY(), waypoints, EnuCoor_f::x, and EnuCoor_f::y.
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 323 of file gvf_parametric.cpp.
References alpha, gvf_parametric_2d_trefoil_info(), gvf_parametric_2d_trefoil_par, gvf_parametric_control_2D(), 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().
bool gvf_parametric_3D_ellipse_wp | ( | uint8_t | wp, |
float | r, | ||
float | zl, | ||
float | zh, | ||
float | alpha | ||
) |
Definition at line 385 of file gvf_parametric.cpp.
References alpha, gvf_parametric_3D_ellipse_XYZ(), waypoints, EnuCoor_f::x, and EnuCoor_f::y.
bool gvf_parametric_3D_ellipse_wp_delta | ( | uint8_t | wp, |
float | r, | ||
float | alt_center, | ||
float | delta, | ||
float | alpha | ||
) |
Definition at line 391 of file gvf_parametric.cpp.
References alpha, gvf_parametric_3D_ellipse_XYZ(), waypoints, EnuCoor_f::x, and EnuCoor_f::y.
bool gvf_parametric_3D_ellipse_XYZ | ( | float | xo, |
float | yo, | ||
float | r, | ||
float | zl, | ||
float | zh, | ||
float | alpha | ||
) |
3D TRAJECTORIES
Definition at line 352 of file gvf_parametric.cpp.
References alpha, ELLIPSE_3D, gvf_parametric_3d_ellipse_info(), gvf_parametric_3d_ellipse_par, gvf_parametric_control_3D(), gvf_parametric_trajectory, horizontal_mode, HORIZONTAL_MODE_CIRCLE, gvf_par_3d_ell_par::kx, gvf_par_3d_ell_par::ky, gvf_par_3d_ell_par::kz, gvf_parametric_tra::p_parametric, and gvf_parametric_tra::type.
Referenced by gvf_parametric_3D_ellipse_wp(), and gvf_parametric_3D_ellipse_wp_delta().
bool gvf_parametric_3D_lissajous_wp_center | ( | uint8_t | wp, |
float | zo, | ||
float | cx, | ||
float | cy, | ||
float | cz, | ||
float | wx, | ||
float | wy, | ||
float | wz, | ||
float | dx, | ||
float | dy, | ||
float | dz, | ||
float | alpha | ||
) |
Definition at line 435 of file gvf_parametric.cpp.
References alpha, gvf_parametric_3D_lissajous_XYZ(), waypoints, EnuCoor_f::x, and EnuCoor_f::y.
bool gvf_parametric_3D_lissajous_XYZ | ( | float | xo, |
float | yo, | ||
float | zo, | ||
float | cx, | ||
float | cy, | ||
float | cz, | ||
float | wx, | ||
float | wy, | ||
float | wz, | ||
float | dx, | ||
float | dy, | ||
float | dz, | ||
float | alpha | ||
) |
Definition at line 402 of file gvf_parametric.cpp.
References alpha, gvf_parametric_3d_lissajous_info(), gvf_parametric_3d_lissajous_par, gvf_parametric_control_3D(), gvf_parametric_trajectory, gvf_par_3d_lis_par::kx, gvf_par_3d_lis_par::ky, gvf_par_3d_lis_par::kz, LISSAJOUS_3D, gvf_parametric_tra::p_parametric, and gvf_parametric_tra::type.
Referenced by gvf_parametric_3D_lissajous_wp_center().
void gvf_parametric_control_2D | ( | float | kx, |
float | ky, | ||
float | f1, | ||
float | f2, | ||
float | f1d, | ||
float | f2d, | ||
float | f1dd, | ||
float | f2dd | ||
) |
Definition at line 130 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, course, gvf_parametric_con::delta_T, get_sys_time_msec(), gvf_parametric_control, gvf_parametric_low_level_control_2D(), gvf_parametric_t0, gvf_parametric_trajectory, h(), I, J, gvf_parametric_con::k_psi, gvf_parametric_con::L, gvf_parametric_tra::phi_errors, gvf_parametric_con::s, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), stateGetSpeedEnu_f(), gvf_parametric_con::w, mesonh.mesonh_atmosphere::X, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by gvf_parametric_2D_trefoil_XY().
void gvf_parametric_control_3D | ( | float | kx, |
float | ky, | ||
float | kz, | ||
float | f1, | ||
float | f2, | ||
float | f3, | ||
float | f1d, | ||
float | f2d, | ||
float | f3d, | ||
float | f1dd, | ||
float | f2dd, | ||
float | f3dd | ||
) |
Definition at line 219 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, course, gvf_parametric_con::delta_T, E, get_sys_time_msec(), gvf_parametric_control, gvf_parametric_low_level_control_3D(), gvf_parametric_t0, gvf_parametric_trajectory, h(), I, J, gvf_parametric_con::k_psi, gvf_parametric_con::L, gvf_parametric_tra::phi_errors, gvf_parametric_con::s, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), stateGetSpeedEnu_f(), gvf_parametric_con::w, mesonh.mesonh_atmosphere::X, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Referenced by gvf_parametric_3D_ellipse_XYZ(), and gvf_parametric_3D_lissajous_XYZ().
void gvf_parametric_init | ( | void | ) |
Definition at line 107 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_circle_parametric(), send_gvf_parametric(), and gvf_parametric_con::w.
void gvf_parametric_set_direction | ( | int8_t | s | ) |
Definition at line 125 of file gvf_parametric.cpp.
References gvf_parametric_control, s, and gvf_parametric_con::s.
|
static |
Definition at line 89 of file gvf_parametric.cpp.
References dev, ELLIPSE_3D, get_sys_time_msec(), gvf_parametric_t0, gvf_parametric_trajectory, gvf_parametric_tra::p_parametric, and gvf_parametric_tra::type.
Referenced by gvf_parametric_init().
|
static |
Definition at line 51 of file gvf_parametric.cpp.
References gvf_parametric_con::beta, dev, ELLIPSE_3D, get_sys_time_msec(), gvf_parametric_control, gvf_parametric_t0, gvf_parametric_trajectory, LISSAJOUS_3D, gvf_parametric_tra::p_parametric, gvf_parametric_tra::phi_errors, gvf_parametric_con::s, TREFOIL_2D, gvf_parametric_tra::type, and gvf_parametric_con::w.
Referenced by gvf_parametric_init().
gvf_parametric_con gvf_parametric_control |
Definition at line 44 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2d_trefoil_info(), gvf_parametric_3d_ellipse_info(), gvf_parametric_3d_lissajous_info(), gvf_parametric_control_2D(), gvf_parametric_control_3D(), gvf_parametric_init(), gvf_parametric_low_level_control_2D(), gvf_parametric_low_level_control_3D(), gvf_parametric_set_direction(), and send_gvf_parametric().
uint32_t gvf_parametric_t0 = 0 |
Definition at line 43 of file gvf_parametric.cpp.
Referenced by gvf_parametric_control_2D(), gvf_parametric_control_3D(), send_circle_parametric(), and send_gvf_parametric().
gvf_parametric_tra gvf_parametric_trajectory |
Definition at line 47 of file gvf_parametric.cpp.
Referenced by gvf_parametric_2d_trefoil_info(), gvf_parametric_2D_trefoil_XY(), gvf_parametric_3d_ellipse_info(), gvf_parametric_3D_ellipse_XYZ(), gvf_parametric_3d_lissajous_info(), gvf_parametric_3D_lissajous_XYZ(), gvf_parametric_control_2D(), gvf_parametric_control_3D(), send_circle_parametric(), and send_gvf_parametric().