 |
Paparazzi UAS
v6.1.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
33 #include "generated/flight_plan.h"
35 #ifndef NAV_SPIRAL_3D_DIST_DIFF
36 #define NAV_SPIRAL_3D_DIST_DIFF 10.f // horizontal distance difference before starting
39 #ifndef NAV_SPIRAL_3D_ALT_DIFF
40 #define NAV_SPIRAL_3D_ALT_DIFF 10.f // vertical distance difference before starting
43 #ifndef NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS
44 #define NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS 50.f
76 float r_start = params[4];
77 float r_stop = params[5];
106 float vz = params[0];
130 float vx,
float vy,
float vz)
137 if (deltaZ * vz < 0.
f &&
138 fabsf(deltaZ) > 1.
f &&
160 if (fabsf(deltaR) < 1.
f) {
163 }
else if (fabsf(deltaZ) < 1.
f && fabsf(vz) > 0.1
f) {
168 float sign = deltaR < 0.f ? -1.f : 1.0;
171 }
else if (fabsf(vz) < 0.1
f) {
192 float dist_diff, alt_diff;
193 float pre_climb = 0.f;
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
#define NAV_SPIRAL_3D_ALT_DIFF
struct FloatVect3 pos_incr
#define NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
static const float nav_dt
void nav_spiral_3D_setup(float center_x, float center_y, float alt_start, float alt_stop, float radius_start, float radius_stop, float vx, float vy, float vz)
Initialize spiral 3D based on:
#define VECT3_ADD(_a, _b)
void nav_spiral_3D_init(void)
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
#define VECT2_DIFF(_c, _a, _b)
struct FloatVect2 pos_diff
static float float_vect2_norm(struct FloatVect2 *v)
static float sign(float x)
sign function
#define FLOAT_VECT3_ZERO(_v)
enum Spiral3DStatus status
#define NAVIGATION_FREQUENCY
Default fixedwing navigation frequency.
struct NavSpiral3D nav_spiral_3D
vector in East North Up coordinates Units: meters
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
@ MissionUpdate
param update
bool mission_register(mission_custom_cb cb, char *type)
Register a new navigation or action callback function.
#define NAV_SPIRAL_3D_DIST_DIFF
#define VECT3_ASSIGN(_a, _x, _y, _z)
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
bool nav_spiral_3D_run(void)
Run spiral 3D navigation.