57 #include "generated/airframe.h"
79 #ifndef SKID_LANDING_AF_HEIGHT
80 #define SKID_LANDING_AF_HEIGHT 50
82 #ifndef SKID_LANDING_FINAL_HEIGHT
83 #define SKID_LANDING_FINAL_HEIGHT 5
85 #ifndef SKID_LANDING_FINAL_STAGE_TIME
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);
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){
void autopilot_set_kill_throttle(bool kill)
set kill throttle
bool autopilot_throttle_killed(void)
get kill status
Core autopilot interface common to all firmwares.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
Fixed wing horizontal control.
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).
#define V_CTL_MODE_LANDING
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.
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
Fixedwing Navigation library.
#define NavQdrCloseTo(x)
True if x (in degrees) is close to the current QDR (less than 10 degrees)
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
static uint8_t final_land_count
bool nav_skid_landing_run(void)
static enum LandingStatus skid_landing_status
static float final_land_altitude
void nav_skid_landing_setup(uint8_t afwp, uint8_t tdwp, float radius)
static uint8_t td_waypoint
#define SKID_LANDING_FINAL_HEIGHT
static uint8_t aw_waypoint
void nav_skid_landing_glide(uint8_t From_WP, uint8_t To_WP)
static float distance_equation(struct FloatVect2 p1, struct FloatVect2 p2)
static float land_circle_quadrant
static struct FloatVect2 land_circle
static float approach_quadrant
static float land_app_alt
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)
API to get/set the generic vehicle states.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.