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.)
#define BUNGEE_TAKEOFF_HEIGHT
static struct FloatVect3 bungee_point
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
#define BUNGEE_TAKEOFF_PITCH
#define VECT2_SUM(_c, _a, _b)
#define VECT3_ASSIGN(_a, _x, _y, _z)
static void float_vect2_normalize(struct FloatVect2 *v)
normalize 2D vector in place
static void compute_points_from_bungee(void)
static float stateGetAirspeed_f(void)
Get airspeed (float).
bool_t nav_bungee_takeoff_run(void)
Bungee takeoff run function.
#define VECT2_DIFF(_c, _a, _b)
#define VECT2_ASSIGN(_a, _x, _y)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
Takeoff functions for bungee takeoff.
#define BUNGEE_TAKEOFF_THROTTLE
Paparazzi floating point algebra.
static struct FloatVect2 takeoff_dir
#define BUNGEE_TAKEOFF_MIN_SPEED
static enum TakeoffStatus CTakeoffStatus
#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.
#define VECT2_SMUL(_vo, _vi, _s)
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.
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
API to get/set the generic vehicle states.
#define BUNGEE_TAKEOFF_DISTANCE
bool_t nav_bungee_takeoff_setup(uint8_t bungee_wp)
Initialization function.
#define VECT2_DOT_PRODUCT(_v1, _v2)
Fixedwing Navigation library.
static struct FloatVect2 init_point
static struct FloatVect2 throttle_point
Fixedwing autopilot modes.