66 #include "generated/flight_plan.h"
67 #include "generated/airframe.h"
72 #ifdef Takeoff_Distance
73 #warning "Takeoff_Distance depreciated, please use BUNGEE_TAKEOFF_DISTANCE instead"
74 #define BUNGEE_TAKEOFF_DISTANCE Takeoff_Distance
77 #warning "Takeoff_Height depreciated, please use BUNGEE_TAKEOFF_HEIGHT instead"
78 #define BUNGEE_TAKEOFF_HEIGHT Takeoff_Height
81 #warning "Takeoff_Speed depreciated, please use BUNGEE_TAKEOFF_AIRSPEED instead (beware that USE_AIRSPEED flag is needed)"
82 #define BUNGEE_TAKEOFF_AIRSPEED Takeoff_Speed
84 #ifdef Takeoff_MinSpeed
85 #warning "Takeoff_MinSpeed depreciated, please use BUNGEE_TAKEOFF_MIN_SPEED instead"
86 #define BUNGEE_TAKEOFF_MIN_SPEED Takeoff_MinSpeed
90 #ifndef BUNGEE_TAKEOFF_DISTANCE
91 #define BUNGEE_TAKEOFF_DISTANCE 10.0
93 #ifndef BUNGEE_TAKEOFF_HEIGHT
94 #define BUNGEE_TAKEOFF_HEIGHT 30.0
97 #ifndef BUNGEE_TAKEOFF_AIRSPEED
98 #define BUNGEE_TAKEOFF_AIRSPEED 15.0
101 #ifdef BUNGEE_TAKEOFF_AIRSPEED
102 #warning "BUNGEE_TAKEOFF_AIRSPEED is defined but not USE_AIRSPEED. Airspeed limit will not be used"
105 #ifndef BUNGEE_TAKEOFF_MIN_SPEED
106 #define BUNGEE_TAKEOFF_MIN_SPEED 5.0
108 #ifndef BUNGEE_TAKEOFF_THROTTLE
109 #define BUNGEE_TAKEOFF_THROTTLE 1.0
111 #ifndef BUNGEE_TAKEOFF_PITCH
112 #ifdef AGR_CLIMB_PITCH
113 #define BUNGEE_TAKEOFF_PITCH AGR_CLIMB_PITCH
115 #define BUNGEE_TAKEOFF_PITCH RadOfDeg(15.)
struct pprz_autopilot autopilot
Global autopilot structure.
void autopilot_set_kill_throttle(bool kill)
set kill throttle
Core autopilot interface common to all firmwares.
bool launch
request launch
static void float_vect2_normalize(struct FloatVect2 *v)
normalize 2D vector in place
#define VECT2_SMUL(_vo, _vi, _s)
#define VECT2_DIFF(_c, _a, _b)
#define VECT2_SUM(_c, _a, _b)
#define VECT2_DOT_PRODUCT(_v1, _v2)
#define VECT3_ASSIGN(_a, _x, _y, _z)
#define VECT2_ASSIGN(_a, _x, _y)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
static float stateGetAirspeed_f(void)
Get airspeed (float).
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
void nav_route_xy(float last_wp_x, float last_wp_y, float wp_x, float wp_y)
Computes the carrot position along the desired segment.
Fixedwing Navigation library.
#define NavVerticalThrottleMode(_throttle)
Set the vertical mode to fixed throttle with the specified setpoint.
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
static struct FloatVect2 throttle_point
bool nav_bungee_takeoff_run(void)
Bungee takeoff run function.
static void compute_points_from_bungee(void)
#define BUNGEE_TAKEOFF_THROTTLE
#define BUNGEE_TAKEOFF_PITCH
#define BUNGEE_TAKEOFF_DISTANCE
void nav_bungee_takeoff_setup(uint8_t bungee_wp)
Initialization function.
#define BUNGEE_TAKEOFF_MIN_SPEED
static struct FloatVect2 init_point
static struct FloatVect2 takeoff_dir
static enum TakeoffStatus CTakeoffStatus
static struct FloatVect3 bungee_point
#define BUNGEE_TAKEOFF_HEIGHT
Takeoff functions for bungee takeoff.
Paparazzi floating point algebra.
API to get/set the generic vehicle states.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.