Various fixes around Companion trainer mode (#7116)
[opentx.git] / radio / src / gps.h
blob22ba6c209ec926a35e7d6d8ee6b3438b5b34159a
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * cleanflight - https://github.com/cleanflight
6 * th9x - http://code.google.com/p/th9x
7 * er9x - http://code.google.com/p/er9x
8 * gruvin9x - http://code.google.com/p/gruvin9x
10 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
22 #ifndef _GPS_H_
23 #define _GPS_H_
25 #include <inttypes.h>
27 struct gpsdata_t
29 int32_t longitude; // degrees * 1.000.000
30 int32_t latitude; // degrees * 1.000.000
31 uint8_t fix;
32 uint8_t numSat;
33 uint32_t packetCount;
34 uint32_t errorCount;
35 uint16_t altitude; // altitude in 0.1m
36 uint16_t speed; // speed in 0.1m/s
37 uint16_t groundCourse; // degrees * 10
38 uint16_t hdop;
41 extern gpsdata_t gpsData;
42 void gpsWakeup();
44 void gpsSendFrame(const char * frame);
46 #endif // _GPS_H_