57 #include "generated/airframe.h"
79 #ifndef SKID_LANDING_AF_HEIGHT //> AF height [m]
80 #define SKID_LANDING_AF_HEIGHT 50
82 #ifndef SKID_LANDING_FINAL_HEIGHT //> final height [m]
83 #define SKID_LANDING_FINAL_HEIGHT 5
85 #ifndef SKID_LANDING_FINAL_STAGE_TIME //> final stage time [s]
86 #define SKID_LANDING_FINAL_STAGE_TIME 5
91 return sqrtf((p1.
x-p2.
x)*(p1.
x-p2.
x)+(p1.
y-p2.
y)*(p1.
y-p2.
y));
108 float d = sqrtf(x_0 * x_0 + y_0 * y_0);
118 if (land_radius > 0) {
166 < v_ctl_landing_alt_throttle_kill) {
189 float diff_alt =
waypoints[To_WP].
a - start_alt;
200 float alt = start_alt + (here_dist/end_dist) * diff_alt;
202 if (end_dist < end_here_dist){
Landing on skidpads See video of the landing: https://www.youtube.com/watch?v=aYrB7s3oeX4 Standard la...
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
bool autopilot_throttle_killed(void)
get kill status
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
void nav_skid_landing_setup(uint8_t afwp, uint8_t tdwp, float radius)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
#define NavQdrCloseTo(x)
True if x (in degrees) is close to the current QDR (less than 10 degrees)
static float approach_quadrant
Fixed wing horizontal control.
static float distance_equation(struct FloatVect2 p1, struct FloatVect2 p2)
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command...
void autopilot_set_kill_throttle(bool kill)
set kill throttle
static uint8_t final_land_count
bool nav_skid_landing_run(void)
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
static struct FloatVect2 land_circle
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.
Core autopilot interface common to all firmwares.
static float land_circle_quadrant
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
API to get/set the generic vehicle states.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
static uint8_t aw_waypoint
#define SKID_LANDING_FINAL_HEIGHT
void nav_skid_landing_glide(uint8_t From_WP, uint8_t To_WP)
static float final_land_altitude
static enum LandingStatus skid_landing_status
Fixedwing Navigation library.
static float land_app_alt
#define V_CTL_MODE_LANDING
static uint8_t td_waypoint