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.

112 lines
3.4KB

  1. /*
  2. holux.h
  3. Copyright (C) 2002 Jochen Becker, jb@bepo.com
  4. This program 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 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
  15. */
  16. /* header file for the holux gm-100 wpo format */
  17. #ifndef BYTE
  18. #define BYTE unsigned char
  19. #endif
  20. #ifndef WORD
  21. #define WORD unsigned short
  22. #endif
  23. #ifndef DWORD
  24. #define DWORD unsigned int
  25. #endif
  26. /* #define GM100_WPO_FILE_SIZE 25512 */ /* size of a holux gm-100 wpo file used by mapShow 1.4*/
  27. #define GM100_WPO_FILE_SIZE 25600 /* size of a holux gm-100 wpo file used by the GM-100*/
  28. #define ROUTESTART 23600 /* Offset for start of route */
  29. #define MAXWPT 500 /* max number of waypoint */
  30. #define MAXRTE 20 /* max number of routes */
  31. #define MAXWPTINRTE 30
  32. #define WPT_HDR_ID 0x5C38A631 /* waypoint header */
  33. #define RTE_HDR_ID 0xD87F59F0 /* route header */
  34. /* Offsets */
  35. #define OFFS_WPT 0x05E4 /* offet for waypoint table */
  36. typedef struct tagWPTHDR {
  37. DWORD id; /* WPT_HDR_ID */
  38. short num; /* Current wpt number */
  39. short next; /* next wpt number */
  40. short idx[MAXWPT]; /* saving wpt index here for each wpt, default was -1*/
  41. BYTE used[MAXWPT]; /* Have the match wpt been used (0xFF), Default was 0 */
  42. } WPTHDR;
  43. typedef struct tagPOINT {
  44. signed int iLongitude;
  45. signed int iLatitude;
  46. } POINT;
  47. typedef struct tagDATE {
  48. BYTE day;
  49. BYTE month;
  50. short year;
  51. } HX_DATE;
  52. typedef struct tagWPT {
  53. char name[8]; /* wpt name */
  54. char comment[12]; /* comment string */
  55. POINT pt; /* waypoint location */
  56. short vocidx; /* voice index, not used */
  57. short usecount; /* counter: times used by routes */
  58. HX_DATE date; /* date */
  59. unsigned time; /* time */
  60. char checked; /* Active or not */
  61. BYTE dummy[3]; /* fill bytes */
  62. } WPT;
  63. typedef struct tagRTEHDR {
  64. DWORD id; /* RTE_HDR_ID */
  65. short num; /* Current route number */
  66. short next; /* next route number */
  67. signed short idx[MAXRTE]; /* saving route index here for each route, default was -1 */
  68. BYTE used[MAXRTE]; /* Have the wpt been used (0xFF), Default was 0 */
  69. signed short rteno; /* Saving navigationroute number here */
  70. } RTEHDR;
  71. typedef struct tagRTE {
  72. char name[8]; /* route name */
  73. char comment[12]; /* comment string */
  74. short wptnum; /* the total waypoint number */
  75. short wptidx[MAXWPTINRTE]; /* the waypoint index in this route */
  76. short reserved;
  77. int date; /* date */
  78. int time; /* time */
  79. } RTE;