forked from GPSBabel/gpsbabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
garmin_tables.h
106 lines (82 loc) · 3.38 KB
/
garmin_tables.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
Garmin icon tables
Based on information provided by Ian Cowley, Sigurd Humerfelt,
and Garmin MapSource
Copyright (C) 2003-2014 Robert Lipe, [email protected]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef GARMIN_TABLES_H
#define GARMIN_TABLES_H
#include <cstdint> // for uint32_t
#include <QString> // for QString
#include "defs.h" // for grid_type
#define DEFAULT_ICON_DESCR "Waypoint"
#define DEFAULT_ICON_VALUE 18
struct icon_mapping_t {
int mpssymnum;
int pcxsymnum;
const char* icon;
};
enum garmin_formats_e {MAPSOURCE, PCX, GARMIN_SERIAL, GDB};
QString gt_find_desc_from_icon_number(int icon, garmin_formats_e garmin_format);
int gt_find_icon_number_from_desc(const QString& desc, garmin_formats_e garmin_format);
extern const icon_mapping_t garmin_icon_table[];
enum gt_waypt_classes_e {
gt_waypt_class_user_waypoint = 0,
gt_waypt_class_airport,
gt_waypt_class_intersection,
gt_waypt_class_ndb,
gt_waypt_class_vor,
gt_waypt_class_runway_threshold,
gt_waypt_class_airport_intersection,
gt_waypt_class_airport_ndb,
gt_waypt_class_map_point,
gt_waypt_class_map_area,
gt_waypt_class_map_intersection,
gt_waypt_class_map_address,
gt_waypt_class_map_line
};
extern const char* const gt_waypt_class_names[];
struct gt_country_code_t {
const char* cc;
const char* country;
};
extern const gt_country_code_t gt_country_codes[];
const char* gt_get_icao_country(const QString& cc);
const char* gt_get_icao_cc(const QString& country, const QString& shortname);
/* this order is used by most devices */
enum gt_display_modes_e {
gt_display_mode_symbol_and_name = 0,
gt_display_mode_symbol,
gt_display_mode_symbol_and_comment
};
extern const char* const gt_display_mode_names[];
#define GT_DISPLAY_MODE_MIN gt_display_mode_symbol_and_name
#define GT_DISPLAY_MODE_MAX gt_display_mode_symbol_and_comment
enum gt_gdb_display_modes_e {
gt_gdb_display_mode_symbol = 0,
gt_gdb_display_mode_symbol_and_name,
gt_gdb_display_mode_symbol_and_comment
};
unsigned char gt_convert_category(const char* name, int* category);
unsigned char gt_switch_display_mode_value(unsigned char display_mode, int protoid, char device);
grid_type gt_lookup_grid_type(const char* grid_name, const QString& module);
const char* gt_get_mps_grid_longname(grid_type grid, const char* module);
int gt_lookup_datum_index(const char* datum_str, const QString& module);
const char* gt_get_mps_datum_name(int datum_index);
uint32_t gt_color_value(unsigned int garmin_index);
uint32_t gt_color_value_by_name(const QString& name);
int gt_color_index_by_name(const QString& name);
int gt_color_index_by_rgb(int rgb);
const char* gt_color_name(unsigned int garmin_index);
#endif