2 * This file is part of u360gts, aka amv-open360tracker 32bits:
3 * https://github.com/raul-ortega/amv-open360tracker-32bits
5 * u360gts is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * u360gts is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with u360gts. If not, see <http://www.gnu.org/licenses/>.
26 #include "config/runtime_config.h"
28 #define TELEMETRY_LATLON_DIVIDER_F 1000000.0f
29 #define TELEMETRY_LATLON_DIVIDER_I 1000000
31 extern bool mfdTestMode
;
34 extern bool settingHome
;
36 extern int32_t telemetry_lat
;
37 extern int32_t telemetry_lon
;
38 extern int16_t telemetry_alt
;
39 extern int16_t telemetry_sats
;
40 extern int32_t telemetry_time
;
41 extern int32_t telemetry_date
;
42 extern int16_t telemetry_age
;
43 extern float telemetry_course
;
44 extern float telemetry_speed
;
45 extern float telemetry_declination
;
46 extern float telemetry_hdop
;
47 extern float telemetry_pitch
;
48 extern float telemetry_roll
;
49 extern float telemetry_yaw
;
50 extern uint8_t telemetry_failed_cs
;
51 extern uint8_t telemetry_provider
;
52 extern uint8_t telemetry_fixtype
;
53 extern int32_t telemetry_home_lat
;
54 extern int32_t telemetry_home_lon
;
55 extern int16_t telemetry_home_alt
;
57 enum telemetryProviders
{
58 TELEMETRY_PROVIDER_NONE
= 0,
59 TELEMETRY_PROVIDER_DIY_GPS
,
60 TELEMETRY_PROVIDER_INAV
,
61 TELEMETRY_PROVIDER_APM10
64 int16_t getTargetAlt(int16_t home_alt
);
65 void encodeTargetData(uint8_t c
);
66 int32_t getTargetLat();
67 int32_t getTargetLon();
69 uint16_t getDistance();
70 uint16_t getAzimuth();
71 void disableProtocolDetection(void);
72 void setTelemetryHome(int32_t lat
, int32_t lon
, int16_t alt
);