AT32F435 SD card support (#14018)
[betaflight.git] / src / main / flight / gps_rescue_multirotor.h
blobdfb2087b83ad8df458220ded4d1403044db10f22
1 /*
2 * This file is part of Betaflight.
4 * Betaflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Betaflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Betaflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #ifndef USE_WING
22 #include <stdbool.h>
24 #include "common/axis.h"
26 #include "pg/gps_rescue.h"
28 #define TASK_GPS_RESCUE_RATE_HZ 100 // in sync with altitude task rate
30 #ifdef USE_MAG
31 #define GPS_RESCUE_USE_MAG true
32 #else
33 #define GPS_RESCUE_USE_MAG false
34 #endif
36 typedef enum {
37 RESCUE_SANITY_OFF = 0,
38 RESCUE_SANITY_ON,
39 RESCUE_SANITY_FS_ONLY,
40 RESCUE_SANITY_COUNT
41 } gpsRescueSanity_e;
43 typedef enum {
44 GPS_RESCUE_ALT_MODE_MAX = 0,
45 GPS_RESCUE_ALT_MODE_FIXED,
46 GPS_RESCUE_ALT_MODE_CURRENT,
47 GPS_RESCUE_ALT_MODE_COUNT
48 } gpsRescueAltitudeMode_e;
50 extern float gpsRescueAngle[RP_AXIS_COUNT]; // NOTE: ANGLES ARE IN CENTIDEGREES
52 void gpsRescueInit(void);
53 void gpsRescueUpdate(void);
54 float gpsRescueGetYawRate(void);
55 bool gpsRescueIsConfigured(void);
56 bool gpsRescueIsAvailable(void);
57 bool gpsRescueIsDisabled(void);
58 bool gpsRescueDisableMag(void);
59 float gpsRescueGetImuYawCogGain(void);
61 #endif // !USE_WING