32 #include "generated/airframe.h"
46 #define GVF_SIN_ALPHA 0
83 float cosa = cosf(alpha);
84 float sina = sinf(alpha);
87 float xs = (px - a) * sina - (py - b) * cosa;
88 float ys = -(px - a) * cosa - (py - b) * sina;
91 float ang = (w * xs + off);
92 float cosang = cosf(ang);
93 float sinang = sinf(ang);
95 *phi = ys - A * sinang;
98 grad->
nx = -cosa - A * w * sina * cosang;
99 grad->
ny = -sina + A * w * cosa * cosang;
102 hess->
H11 = A * w * w * sina * sina * sinang;
103 hess->
H12 = -A * w * w * sina * cosa * sinang;
104 hess->
H21 = -A * w * w * cosa * sina * sinang;
105 hess->
H22 = A * w * w * cosa * cosa * sinang;
Guidance algorithm based on vector fields 2D sinusoidal trajectory.
vector in East North Up coordinates Units: meters
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
void gvf_sin_info(float *phi, struct gvf_grad *grad, struct gvf_Hess *hess)