You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

garmin_tables.h 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. Garmin icon tables
  3. Based on information provided by Ian Cowley, Sigurd Humerfelt,
  4. and Garmin MapSource
  5. Copyright (C) 2003-2014 Robert Lipe, robertlipe+source@gpsbabel.org
  6. This program 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 of the License, or
  9. (at your option) any later version.
  10. This program 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.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
  17. */
  18. #ifndef GARMIN_TABLES_H
  19. #define GARMIN_TABLES_H
  20. #include "defs.h"
  21. #define DEFAULT_ICON_DESCR "Waypoint"
  22. #define DEFAULT_ICON_VALUE 18
  23. typedef struct icon_mapping {
  24. const int mpssymnum;
  25. const int pcxsymnum;
  26. const char* icon;
  27. } icon_mapping_t;
  28. typedef enum {MAPSOURCE, PCX, GARMIN_SERIAL, GDB} garmin_formats_e;
  29. const QString gt_find_desc_from_icon_number(const int icon, garmin_formats_e garmin_format);
  30. int gt_find_icon_number_from_desc(const QString& desc, garmin_formats_e garmin_format);
  31. extern icon_mapping_t garmin_icon_table[];
  32. typedef enum {
  33. gt_waypt_class_user_waypoint = 0,
  34. gt_waypt_class_airport,
  35. gt_waypt_class_intersection,
  36. gt_waypt_class_ndb,
  37. gt_waypt_class_vor,
  38. gt_waypt_class_runway_threshold,
  39. gt_waypt_class_airport_intersection,
  40. gt_waypt_class_airport_ndb,
  41. gt_waypt_class_map_point,
  42. gt_waypt_class_map_area,
  43. gt_waypt_class_map_intersection,
  44. gt_waypt_class_map_address,
  45. gt_waypt_class_map_line
  46. } gt_waypt_classes_e;
  47. extern const char* gt_waypt_class_names[];
  48. typedef struct gt_country_code_s {
  49. const char* cc;
  50. const char* country;
  51. } gt_country_code_t;
  52. extern gt_country_code_t gt_country_codes[];
  53. const char* gt_get_icao_country(const QString& cc);
  54. const char* gt_get_icao_cc(const QString& country, const QString& shortname);
  55. /* this order is used by most devices */
  56. typedef enum {
  57. gt_display_mode_symbol_and_name = 0,
  58. gt_display_mode_symbol,
  59. gt_display_mode_symbol_and_comment
  60. } gt_display_modes_e;
  61. extern const char* gt_display_mode_names[];
  62. #define GT_DISPLAY_MODE_MIN gt_display_mode_symbol_and_name
  63. #define GT_DISPLAY_MODE_MAX gt_display_mode_symbol_and_comment
  64. typedef enum {
  65. gt_gdb_display_mode_symbol = 0,
  66. gt_gdb_display_mode_symbol_and_name,
  67. gt_gdb_display_mode_symbol_and_comment
  68. } gt_gdb_display_modes_e;
  69. unsigned char gt_convert_category(const char* name, int* category);
  70. unsigned char gt_switch_display_mode_value(const unsigned char display_mode, const int protoid, const char device);
  71. grid_type gt_lookup_grid_type(const char* grid_name, const QString& module);
  72. const char* gt_get_mps_grid_longname(const grid_type grid, const char* module);
  73. int gt_lookup_datum_index(const char* datum_str, const QString& module);
  74. const char* gt_get_mps_datum_name(const int datum_index);
  75. uint32_t gt_color_value(const unsigned int garmin_index);
  76. uint32_t gt_color_value_by_name(const QString& name);
  77. int gt_color_index_by_name(const QString& name);
  78. int gt_color_index_by_rgb(const int rgb);
  79. const char* gt_color_name(const unsigned int garmin_index);
  80. #endif