Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
nav_takeoff_and_landing.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3  *
4  * This file is part of paparazzi
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
27 #ifndef NAV_TAKEOFF_AND_LANDING_H
28 #define NAV_TAKEOFF_AND_LANDING_H
29 
30 #include "std.h"
32 
38 };
39 
46 };
47 
50 struct nav_takeoff {
52  struct EnuCoor_f climb_pos;
53  struct EnuCoor_f start_pos;
55  bool timeout;
56 };
57 
60 struct nav_landing {
62  struct EnuCoor_f td_pos;
63  struct EnuCoor_f af_pos;
64  float radius;
67  bool timeout;
68 };
69 
73 extern float nav_takeoff_direction;
74 
77 extern void nav_takeoff_and_landing_init(void);
78 
81 extern void nav_takeoff_and_landing_periodic(void);
82 
91 extern bool nav_takeoff_from_wp(uint8_t wp_id);
92 
102 extern bool nav_takeoff_from_loc(float lat, float lon);
103 
111 extern bool nav_takeoff_from_here(void);
112 
123 extern bool nav_land_at_wp(uint8_t td_id, uint8_t af_id, float radius);
124 
135 extern bool nav_land_at_loc(float td_alt, float lat, float lon, float dir, float dist, float radius);
136 
147 extern bool nav_land_here(float td_alt, float radius);
148 
149 #endif // NAV_TAKEOFF_AND_LANDING_H
150 
bool nav_takeoff_from_wp(uint8_t wp_id)
Takeoff from a waypoint.
enum nav_takeoff_status status
current step
uint8_t td_id
touch down wp id
bool nav_land_at_loc(float td_alt, float lat, float lon, float dir, float dist, float radius)
Land at lat long location.
enum nav_landing_status status
current step
float nav_takeoff_direction
Takeoff direction in range [0-360] (deg) set to flight plan QFU by default.
bool nav_land_at_wp(uint8_t td_id, uint8_t af_id, float radius)
Land at waypoint location.
void nav_takeoff_and_landing_init(void)
Init function.
bool nav_takeoff_from_loc(float lat, float lon)
Takeoff from lat long location.
struct EnuCoor_f af_pos
start of descent point
@ NAV_LANDING_REACH_AF
@ NAV_LANDING_DESCENT
@ NAV_LANDING_FLARE
@ NAV_LANDING_INIT
@ NAV_LANDING_DONE
float radius
circle radius for fixedwing landing
bool timeout
true if status should be set to init
struct EnuCoor_f td_pos
touch down point
uint8_t af_id
start of descent wp id
bool timeout
true if status should be set to init
struct EnuCoor_f start_pos
start position
bool nav_takeoff_from_here(void)
Takeoff from current location.
uint8_t climb_id
climb waypoint id
struct EnuCoor_f climb_pos
climb point
void nav_takeoff_and_landing_periodic(void)
Periodic timeout check function.
@ NAV_TAKEOFF_DONE
@ NAV_TAKEOFF_INIT
@ NAV_TAKEOFF_CLIMB
@ NAV_TAKEOFF_START_MOTOR
bool nav_land_here(float td_alt, float radius)
Land at current location.
Structure for landing.
Structure for takeoff.
Paparazzi floating point math for geodetic calculations.
vector in East North Up coordinates Units: meters
static const float dir[]
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98