47 #include "generated/airframe.h"
54 #ifndef LAUNCHER_TAKEOFF_PITCH //> desired takeoff pitch [rad]
55 #define LAUNCHER_TAKEOFF_PITCH 0.23
58 #ifndef LAUNCHER_TAKEOFF_HEIGHT //> desired height AGL [m]
59 #define LAUNCHER_TAKEOFF_HEIGHT 80
62 #ifndef LAUNCHER_TAKEOFF_DISTANCE //> minimal distance from the takeoff point [m]
63 #define LAUNCHER_TAKEOFF_DISTANCE 30
66 #ifndef LAUNCHER_TAKEOFF_MIN_SPEED_LINE //> minimal takeoff ground speed [m/s] to switch into line following
67 #define LAUNCHER_TAKEOFF_MIN_SPEED_LINE 5
70 #ifndef LAUNCHER_TAKEOFF_MIN_SPEED_CIRCLE //> mininmal takeoff ground speed [m/s] to switch into circle climb
71 #define LAUNCHER_TAKEOFF_MIN_SPEED_CIRCLE 8
74 #ifndef LAUNCHER_TAKEOFF_CIRCLE_ALT //> desired circle AGL [m]
75 #define LAUNCHER_TAKEOFF_CIRCLE_ALT 200
78 #ifndef LAUNCHER_TAKEOFF_CIRCLE_RADIUS //> desired circle radius [m]
79 #define LAUNCHER_TAKEOFF_CIRCLE_RADIUS 200
82 #ifndef LAUNCHER_TAKEOFF_MAX_CIRCLE_DISTANCE //> max distance from the takeoff point [m] before the plane circles up
83 #define LAUNCHER_TAKEOFF_MAX_CIRCLE_DISTANCE 800
86 #ifndef LAUNCHER_TAKEOFF_HEIGHT_THRESHOLD //> height threshold [m] before switching modes
87 #define LAUNCHER_TAKEOFF_HEIGHT_THRESHOLD 10
130 float launch_dist = sqrtf(dist_x * dist_x + dist_y * dist_y);
131 if (launch_dist <= 0.01) {
170 float x_1 = dist_x / launch_dist;
171 float y_1 = dist_y / launch_dist;
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
#define LAUNCHER_TAKEOFF_MIN_SPEED_LINE
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
#define LAUNCHER_TAKEOFF_HEIGHT_THRESHOLD
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
#define LAUNCHER_TAKEOFF_HEIGHT
#define LAUNCHER_TAKEOFF_PITCH
#define LAUNCHER_TAKEOFF_DISTANCE
void nav_launcher_setup(void)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static enum Launch_Status CLaunch_Status
static float launch_pitch
Fixed wing horizontal control.
static float launch_line_y
static float launch_line_x
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command...
bool nav_launcher_run(void)
static float launch_circle_alt
#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.
Pneumatic launcher system See video of the system: https://www.youtube.com/watch?v=qc1uwH-8Dbw Launch...
#define LAUNCHER_TAKEOFF_MIN_SPEED_CIRCLE
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.
#define LAUNCHER_TAKEOFF_CIRCLE_ALT
Core autopilot interface common to all firmwares.
#define NavAttitude(_roll)
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
API to get/set the generic vehicle states.
#define LAUNCHER_TAKEOFF_MAX_CIRCLE_DISTANCE
static struct Point2D launch_circle
#define LAUNCHER_TAKEOFF_CIRCLE_RADIUS
Fixedwing Navigation library.