Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nav_geofence.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 216 The Paparazzi Team
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, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
34#ifdef GEOFENCE_DATALINK_LOST_TIME
36/*
37 * from the airfame config file:
38 * go to HOME mode if datalink lost for GEOFENCE_DATALINK_LOST_TIME
39 */
40static inline bool datalink_lost(void)
41{
43}
44#else // dont trigger this exception
45static inline bool datalink_lost(void)
46{
47 return false;
48}
49#endif /* GEOFENCE_DATALINK_LOST_TIME */
50
51
52#if defined GEOFENCE_MAX_ALTITUDE || defined GEOFENCE_MAX_HEIGHT// user defined geofence_max_altitude (or AGL) in the flight plan
53static inline bool higher_than_max_altitude(void)
54{
55 bool above_max_alt = false;
56#ifdef GEOFENCE_MAX_ALTITUDE
58#endif /* GEOFENCE_MAX_ALTITUDE */
59
60#ifdef GEOFENCE_MAX_HEIGHT
62#endif /* GEOFENCE_MAX_HEIGHT */
63 return above_max_alt;
64}
65#else // we dont have max altitude specified, so the condition is never true
66static inline bool higher_than_max_altitude(void)
67{
68 return false;
69}
70#endif /* GEOFENCE_MAX_ALTITUDE */
uint16_t foo
Definition main_demo5.c:58
#define GetPosAlt()
Get current altitude above MSL.
Definition nav.h:233
#define GetAltRef()
Get current altitude reference for local coordinates.
Definition nav.h:242
static bool higher_than_max_altitude(void)
static bool datalink_lost(void)