⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 g7to.h

📁 这是经典的卫星编程应用程序
💻 H
📖 第 1 页 / 共 4 页
字号:

// 7.5.6. D105_Wpt_Type
typedef struct
{
	Semicircle_Type posn;	// position
	Symbol_Type smbl;		// symbol id
	char wpt_ident[1]; 		// null-terminated string -- length isn't
	                        //   really specified, I added 1 for a place
							//   holder for the decode of D105 waypoints
} D105_Wpt_Type;

// 7.5.7. D106_Wpt_Type
//  Example products: StreetPilot (route waypoints).
typedef struct
{
	byte class;				// class
	byte subclass[13];		// subclass
	Semicircle_Type posn;	// position
	Symbol_Type smbl;		// symbol id
	char wpt_ident[1];  	// null-terminated string -- length isn't
	                        //   really specified, I added 10 for a place
							//   holder for the decode of D106 waypoints
/* char lnk_ident[]; null-terminated string */
} D106_Wpt_Type;
// The enumerated values for the "class" member of the D106_Wpt_Type
//   are as follows:
//	Zero:     indicates a user waypoint ("subclass" is ignored).
//	Non-zero: indicates a non-user waypoint ("subclass" must be valid).
//
//  For non-user waypoints (such as a city in the GPS map database), the
//	GPS will provide a non-zero value in the "class" member, and the
//	"subclass" member will contain valid data to further identify
//	the non-user waypoint.  If the Host wishes to transfer this
//	waypoint back to the GPS (as part of a route), the Host must
//	leave the "class" and "subclass" members unmodified.
//
//	For user waypoints, the Host must ensure that the "class" member
//	is zero, but the "subclass" member will be ignored and should be
//	set to zero.
//	
//	The "lnk_ident" member provides a string that indicates the name
//	of the path from this waypoint to the next waypoint in the
//	route.
//	
//	For example, "HIGHWAY 101" might be placed in "lnk_ident" to
//	show that the path from this waypoint to the next waypoint is
//	along Highway 101.  The "lnk_ident" string may be empty (i.e.,
//	no characters other than the null terminator), which indicates
//	that no particular path is specified.
//

typedef struct
{
	char 			ident[6];	// identifier
	Semicircle_Type posn;		// position
	longword 		unused;		// should be set to zero
	char 			cmnt[40];	// comment
	byte 			smbl;		// symbol id
	byte 			dspl;		// display option
	float 			dst;		// proximity distance (meters)
	byte 			color;		// waypoint color
} D107_Wpt_Type;
//  The enumerated values for the "smbl" member of the D107_Wpt_Type are the
//  same as the the "smbl" member of the D103_Wpt_Type.
//
//  The enumerated values for the "dspl" member of the D107_Wpt_Type are
//  shown below are the same as the the "dspl" member of the D103_Wpt_Type.
//  
//  The enumerated values for the "color" member of the D107_Wpt_Type are
//  shown below:
//  
//enum
//{
//	clr_default = 0,	// Default waypoint color
//	clr_red = 1,		// Red
//	clr_green = 2,		// Green
//	clr_blue = 3		// Blue
//};

// D108_Wpt_Type
//  Example products: eMap
typedef struct 														// size
{
	byte			wpt_class; 		// class (see below) 				1
	byte			color; 			// color (see below) 				1 
	byte			dspl; 			// display options (see below) 		1
	byte			attr; 			// attributes (see below) 			1
	Symbol_Type		smbl; 			// waypoint symbol 					2
	byte			subclass[18]; 	// subclass 						18
	Semicircle_Type	posn; 			// 32 bit semicircle 				8
	float 			alt; 			// altitude in meters 				4
	float 			dpth; 			// depth in meters 					4
	float 			dist; 			// proximity distance in meters		4
	char 			state[2]; 		// state 							2
	char 			cc[2]; 			// country code 					2
	char 			ident[51]; 		//	variable length string 			1-51
// char 			comment[]; 			waypoint user comment 			1-51
// char 			facility[]; 		facility name 					1-31
// char 			city[]; 			city name 						1-25
// char 			addr[]; 			address number 					1-51
// char 			cross_road[]; 		intersecting road label 		1-51
} D108_Wpt_Type;

//enum
//{
//	USER_WPT =      0x00, // User waypoint
//	AVTN_APT_WPT =  0x40, // Aviation Airport waypoint
//	AVTN_INT_WPT =  0x41, // Aviation Intersection waypoint
//	AVTN_NDB_WPT =  0x42, // Aviation NDB waypoint
//	AVTN_VOR_WPT =  0x43, // Aviation VOR waypoint
//	AVTN_ARWY_WPT = 0x44, // Aviation Airport Runway waypoint
//	AVTN_AINT_WPT = 0x45, // Aviation Airport Intersection
//	AVTN_ANDB_WPT = 0x46, // Aviation Airport NDB waypoint
//	MAP_PNT_WPT =   0x80, // Map Point waypoint
//	MAP_AREA_WPT =  0x81, // Map Area waypoint
//	MAP_INT_WPT =   0x82, // Map Intersection waypoint
//	MAP_ADRS_WPT =  0x83, // Map Address waypoint
//	MAP_LABEL_WPT = 0x84, // Map Label Waypoint
//	MAP_LINE_WPT =  0x85, // Map Line Waypoint
//};

//The "color" member can be one of the following values:
//enum {	Black, 
//		Dark_Red, 
//		Dark_Green, 
//		Dark_Yellow,
//		Dark_Blue, 
//		Dark_Magenta, 
//		Dark_Cyan, 
//		Light_Gray,
//		Dark_Gray, 
//		Red, 
//		Green, 
//		Yellow,
//		Blue, 
//		Magenta, 
//		Cyan, 
//		White,
//		Default_Color = 0xFF
//};

// The enumerated values for the "dspl" member of the D108_Wpt_Type are the
//     same as the the "dspl" member of the D103_Wpt_Type.

// The "attr" member should be set to a value of 0x60.

// The "subclass" member of the D108_Wpt_Type is used for map waypoints
//   only, and should be set to 0x0000 0x00000000 0xFFFFFFFF 0xFFFFFFFF
//   0xFFFFFFFF for other classes of waypoints.

// The "alt" and "dpth" members may or may not be supported on a given
//    unit.  A value of 1.0e25 in either of these fields indicates that this
//    parameter is not supported or is unknown for this waypoint.



//7.5.8. D150_Wpt_Type
//  Example products: GPS 150, GPS 155, GNC 250 and GNC 300.
typedef struct
{
	char ident[6];			// identifier
	char cc[2];				// country code
	byte class;				// class
	Semicircle_Type posn;	// position
	INT alt;				// altitude (meters)
	char city[24];			// city
	char state[2];			// state
	char name[30];			// facility name
	char cmnt[40];			// comment
} D150_Wpt_Type;
//	The enumerated values for the "class" member of the D150_Wpt_Type 
//     are shown below:
//enum
//{
//	apt_wpt_class = 0, /* airport waypoint class */
//	int_wpt_class = 1, /* intersection waypoint class */
//	ndb_wpt_class = 2, /* NDB waypoint class */
//	vor_wpt_class = 3, /* VOR waypoint class */
//	usr_wpt_class = 4, /* user defined waypoint class */
//	rwy_wpt_class = 5, /* airport runway threshold waypoint class */
//	aint_wpt_class = 6 /* airport intersection waypoint class */
//};
//	The "city," "state," "name," and "cc"members are invalid when the
//   "class" member is equal to usr_wpt_class. The "alt" member is valid
//   only when the "class" member is equal to apt_wpt_class.

//7.5.9. D151_Wpt_Type
// Example products: GPS 55 AVD, GPS 89.
typedef struct
{
	char ident[6];			// identifier
	Semicircle_Type posn;	// position */
	longword unused;		// should be set to zero */
	char cmnt[40];			// comment */
	float dst;				// proximity distance (meters) */
	char name[30];			// facility name */
	char city[24];			// city */
	char state[2];			// state */
	INT alt;				// altitude (meters) */
	char cc[2];				// country code */
	char unused2;			// should be set to zero */
	byte class;				// class */
} D151_Wpt_Type;
//  The enumerated values for the "class" member of the D151_Wpt_Type
//    are shown below:
//enum
//{
//	apt_wpt_class = 0, /* airport waypoint class */
//	vor_wpt_class = 1, /* VOR waypoint class */
//	usr_wpt_class = 2 /* user defined waypoint class */
//};
// 	The "city," "state," "name," and "cc"members are invalid when
//  the "class" member is equal to usr_wpt_class.  The "alt" member is valid
//  only when the "class" member is equal to apt_wpt_class.

//7.5.10. D152_Wpt_Type
//  Example products: GPS 90, GPS 95 AVD, GPS 95 XL and GPSCOM 190.
typedef struct
{
	char ident[6];			// identifier
	Semicircle_Type posn;	// position
	longword unused;		// should be set to zero
	char cmnt[40];			// comment
	float dst;				// proximity distance (meters)
	char name[30];			// facility name
	char city[24];			// city
	char state[2];			// state
	INT alt;				// altitude (meters)
	char cc[2];				// country code
	char unused2;			// should be set to zero
	byte class;				// class
} D152_Wpt_Type;
//	The enumerated values for the "class" member of the D152_Wpt_Type
//    are shown below:
//enum
//{
//	apt_wpt_class = 0, /* airport waypoint class */
//	int_wpt_class = 1, /* intersection waypoint class */
//	ndb_wpt_class = 2, /* NDB waypoint class */
//	vor_wpt_class = 3, /* VOR waypoint class */
//	usr_wpt_class = 4 /* user defined waypoint class */
//};
// The "city," "state," "name," and "cc"members are invalid when the
// "class" member is equal to usr_wpt_class.  The "alt" member is valid
// only when the "class" member is equal to apt_wpt_class.

//7.5.11. D154_Wpt_Type
//Example products: GPSMAP 195.
typedef struct
{
	char ident[6];			// identifier 
	Semicircle_Type posn;	// position 
	longword unused;		// should be set to zero 
	char cmnt[40];			// comment 
	float dst;				// proximity distance (meters) 
	char name[30];			// facility name 
	char city[24];			// city 
	char state[2];			// state 
	INT alt;				// altitude (meters) 
	char cc[2];				// country code 
	char unused2;			// should be set to zero 
	byte class;				// class 
	Symbol_Type smbl;		// symbol id
} D154_Wpt_Type;
// The enumerated values for the "class" member of the D154_Wpt_Type are
// shown below:
//enum
//{
//	apt_wpt_class = 0, /* airport waypoint class */
//	int_wpt_class = 1, /* intersection waypoint class */
//	ndb_wpt_class = 2, /* NDB waypoint class */
//	vor_wpt_class = 3, /* VOR waypoint class */
//	usr_wpt_class = 4, /* user defined waypoint class */
//	rwy_wpt_class = 5, /* airport runway threshold waypoint class */
//	aint_wpt_class = 6, /* airport intersection waypoint class */
//	andb_wpt_class = 7, /* airport NDB waypoint class */
//	sym_wpt_class = 8 /* user defined symbol-only waypoint class */
//};
// The "city," "state," "name," and "cc"members are invalid when the
// "class" member is equal to usr_wpt_class or sym_wpt_class.  The "alt"
// member is valid only when the "class" member is equal to apt_wpt_class.

//7.5.12. D155_Wpt_Type
// Example products: GPS III Pilot.
typedef struct
{
	char ident[6];			// identifier 
	Semicircle_Type posn;	// position 
	longword unused;		// should be set to zero 
	char cmnt[40];			// comment 
	float dst;				// proximity distance (meters) 
	char name[30];			// facility name 
	char city[24];			// city 
	char state[2];			// state 
	INT alt;				// altitude (meters) 
	char cc[2];				// country code 
	char unused2;			// should be set to zero 
	byte class;				// class 
	Symbol_Type smbl;		// symbol id 
	byte dspl;				// display option 
} D155_Wpt_Type;
// The enumerated values for the "dspl" member of the D155_Wpt_Type are
// shown below:
//enum
//{
//	dspl_smbl_only = 1, /* Display symbol by itself */
//	dspl_smbl_name = 3, /* Display symbol with waypoint name */
//	dspl_smbl_cmnt = 5, /* Display symbol with comment */
//};
// The enumerated values for the "class" member of the D155_Wpt_Type are
// shown below:
//enum
//{
//	apt_wpt_class = 0, /* airport waypoint class */
//	int_wpt_class = 1, /* intersection waypoint class */
//	ndb_wpt_class = 2, /* NDB waypoint class */
//	vor_wpt_class = 3, /* VOR waypoint class */
//	usr_wpt_class = 4 /* user defined waypoint class */
//};
// The "city," "state," "name," and "cc"members are invalid when the
// "class" member is equal to usr_wpt_class.  The "alt" member is valid
// only when the "class" member is equal to apt_wpt_class.

//=====================================================================
typedef struct
{
	double lat; // latitude in radians
	double lon; // longitude in radians
} Radian_Type;

//7.5.13. D200_Rte_Hdr_Type
// Example products: GPS 55 and GPS 55 AVD.
typedef byte D200_Rte_Hdr_Type; // route number

//7.5.14. D201_Rte_Hdr_Type
// Example products: all products unless otherwise noted.
typedef struct
{
	byte nmbr; 			// route number
	char cmnt[20]; 		// comment
} D201_Rte_Hdr_Type;

//7.5.15. D202_Rte_Hdr_Type
// Example products: StreetPilot.
typedef struct
{
	char rte_ident[1];
/* char rte_ident[]; null-terminated string */
} D202_Rte_Hdr_Type;

//7.5.16. D300_Trk_Point_Type
// Example products: all products unless otherwise noted.
typedef struct
{
	Semicircle_Type posn;	// position
	longword time;			// time
	boolean new_trk;		// new track segment?
} D300_Trk_Point_Type;
//The "time" member provides a timestamp for the track log point.  This
// time is expressed as the number of seconds since 12:00 AM on January 1st,
// 1990.  When true, the "new_trk" member indicates that the track log
// point marks the beginning of a new track log segment.
typedef struct
{
    Semicircle_Type posn;   // position
    longword time;          // time */
    float alt;              // altitude in meters
    float dpth;             // depth in meters
    boolean new_trk;        // new track segment?
} D301_Trk_Point_Type;
//
// The "time" member provides a timestamp for the track log point.  This
// time is expressed as the number of seconds since UTC 12:00 AM on
// December 31 st , 1989.
//
// The `alt' and `dpth' members may or may not be supported on a given
// unit.  A value of 1.0e25 in either of these fields indicates that this
// parameter is not supported or is unknown for this track point.
//
// When true, the "new_trk" member indicates that the track log point marks
// the beginning of a new track log segment.
//

typedef struct
{
    boolean dspl;           // display on the map?
    byte color;             // color (same as D108)
    char trk_ident[51];     // beginning of a string of *up to* 51 chars including the end NULL, but
                            //  the structure length is sizeof(boolean)+sizeof(byte)+strlen(trk_ident)+1
/* char trk_ident[];        // null-terminated string */
} D310_Trk_Hdr_Type;
// The ` trk_ident' member has a maximum length of 51 characters
//  including the terminating NULL.


//7.5.17. D400_Prx_Wpt_Type
// Example products: GPS 55, GPS 55 AVD, GPS 75 and GPS 95 AVD.
typedef struct
{
	D100_Wpt_Type wpt;	// waypoint
	float dst;			// proximity distance (meters)
} D400_Prx_Wpt_Type;

//7.5.18. D403_Prx_Wpt_Type
// Example products: GPS 12, GPS 12 XL and GPS 48.
typedef struct
{
	D103_Wpt_Type wpt;	// waypoint
	float dst;			// proximity distance (meters) 
} D403_Prx_Wpt_Type;

//7.5.19. D450_Prx_Wpt_Type
// Example products: GPS 150, GPS 155, GNC 250 and GNC 300.
typedef struct
{
	INT idx;			// proximity index
	D150_Wpt_Type wpt;	// waypoint
	float dst;			// proximity distance (meters)
} D450_Prx_Wpt_Type;

//7.5.20. D500_Almanac_Type
// Example products: GPS 38, GPS 40, GPS 45, GPS 55, GPS 75, GPS 95 and GPS II.
typedef struct
{
	INT wn;				// week number (weeks) 
	float toa;			// almanac data reference time (s) 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -