📄 datatypes.h
字号:
/*************************************************************************** datastypes.h - product specific data types ------------------- begin : So Mär 21 17:50:31 CET 2004 copyright : (C) 2004 by Dennis Real email : dev-null@users.sourceforge.net ***************************************************************************//*************************************************************************** * * * 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. * * * ***************************************************************************/#ifndef DATATYPES_H#define DATATYPES_H#include "def.h"/* WAYPOINTS */typedef struct { char ident[6]; /* identifier */ Semicircle_Type posn; /* position */ longword unused; /* should be set to zero */ char cmnt[40]; /* comment */} D100_Wpt_Type;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) */ BYTE smbl; /* symbol id */} D101_Wpt_Type;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) */ Symbol_Type smbl; /* symbol id */} D102_Wpt_Type;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 */} D103_Wpt_Type;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) */ Symbol_Type smbl; /* symbol id */ BYTE dspl; /* display option */} D104_Wpt_Type;typedef struct{ Semicircle_Type posn; /* position */ Symbol_Type smbl; /* symbol id */ /* char wpt_ident[]; null-terminated string */} D105_Wpt_Type;typedef struct{ BYTE wpt_class; /* class */ BYTE subclass[13]; /* subclass */ Semicircle_Type posn; /* position */ Symbol_Type smbl; /* symbol id */ /* char wpt_ident[]; null-terminated string */ /* char lnk_ident[]; null-terminated string */} D106_Wpt_Type;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;typedef struct { 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[]; 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; typedef struct{ BYTE dtyp; /* data packet type (0x01 for D109)1 */ BYTE wpt_class; /* class 1 */ BYTE dspl_color; /* display & color (see below) 1 */ BYTE attr; /* attributes (0x70 for D109) 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 */ longword ete; /* outbound link ete in seconds 4 */ /* char ident[]; 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 */} D109_Wpt_Type; typedef struct{ char ident[6]; /* identifier */ char cc[2]; /* country code */ BYTE wpt_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;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 wpt_class; /* class */} D151_Wpt_Type;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 wpt_class; /* class */} D152_Wpt_Type;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 wpt_class; /* class */ Symbol_Type smbl; /* symbol id */} D154_Wpt_Type;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 wpt_class; /* class */ Symbol_Type smbl; /* symbol id */ BYTE dspl; /* display option */ } D155_Wpt_Type;/* ROUTES */typedef struct { BYTE nmbr; /* route number */ char cmnt[20]; /* comment */} D201_Rte_Hdr_Type;typedef struct{ /* char rte_ident[]; null-terminated string */} D202_Rte_Hdr_Type;typedef struct{ word class; /* link class; see below */ BYTE subclass[18]; /* sublcass */ /* char ident[]; variable length string */} D210_Rte_Link_Type;/* TRACKS */typedef struct{ Semicircle_Type posn; /* position */ longword time; /* time */ boolean new_trk; /* new track segment? */} D300_Trk_Point_Type;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;typedef struct{ boolean dspl; /* display on the map? */ BYTE color; /* color (same as D108) */ /* char trk_ident[]; null-terminated string */} D310_Trk_Hdr_Type;/* ALMANAC */typedef struct{ int wn; /* week number (weeks) */ float toa; /* almanac data reference time (s) */ float af0; /* clock correction coefficient (s) */ float af1; /* clock correction coefficient (s/s) */ float e; /* eccentricity (-) */ float sqrta; /* square root of semi-major axis (a) (m**1/2) */ float m0; /* mean anomaly at reference time (r) */ float w; /* argument of perigee (r) */ float omg0; /* right ascension (r) */ float odot; /* rate of right ascension (r/s) */ float i; /* inclination angle (r) */} D500_Almanac_Type;typedef struct{ int wn; /* week number (weeks) */ float toa; /* almanac data reference time (s) */ float af0; /* clock correction coefficient (s) */ float af1; /* clock correction coefficient (s/s) */ float e; /* eccentricity (-) */ float sqrta; /* square root of semi-major axis (a) (m**1/2) */ float m0; /* mean anomaly at reference time (r) */ float w; /* argument of perigee (r) */ float omg0; /* right ascension (r) */ float odot; /* rate of right ascension (r/s) */ float i; /* inclination angle (r) */ BYTE hlth; /* almanac health */} D501_Almanac_Type;typedef struct { char svid; /* satellite id */ int wn; /* week number (weeks) */ float toa; /* almanac data reference time (s) */ float af0; /* clock correction coefficient (s) */ float af1; /* clock correction coefficient (s/s) */ float e; /* eccentricity (-) */ float sqrta; /* square root of semi-major axis (a) (m**1/2) */ float m0; /* mean anomaly at reference time (r) */ float w; /* argument of perigee (r) */ float omg0; /* right ascension (r) */ float odot; /* rate of right ascension (r/s) */ float i; /* inclination angle (r) */} D550_Almanac_Type;typedef struct { char svid; /* satellite id */ int wn; /* week number (weeks) */ float toa; /* almanac data reference time (s) */ float af0; /* clock correction coefficient (s) */ float af1; /* clock correction coefficient (s/s) */ float e; /* eccentricity (-) */ float sqrta; /* square root of semi-major axis (a) (m**1/2) */ float m0; /* mean anomaly at reference time (r) */ float w; /* argument of perigee (r) */ float omg0; /* right ascension (r) */ float odot; /* rate of right ascension (r/s) */ float i; /* inclination angle (r) */ BYTE hlth; /* almanac health bits 17:24 (coded) */} D551_Almanac_Type;typedef struct{ int wn; /* week number (weeks) */ float toa; /* almanac data reference time (s) */ float af0; /* clock correction coefficient (s) */ float af1; /* clock correction coefficient (s/s) */ float e; /* eccentricity (-) */ float sqrta; /* square root of semi-major axis (a) (m**1/2) */ float m0; /* mean anomaly at reference time (r) */ float w; /* argument of perigee (r) */ float omg0; /* right ascension (r) */ float odot; /* rate of right ascension (r/s) */ float i; /* inclination angle (r) */ BYTE hlth; /* almanac health */} Almanac_Type;/* Date & Time */typedef struct{ BYTE month; /* month (1-12) */ BYTE day; /* day (1-31) */ word year; /* year (1990 means 1990) */ int hour; /* hour (0-23) */ BYTE minute; /* minute (0-59) */ BYTE second; /* second (0-59) */} D600_Date_Time_Type;/* Position */typedef Radian_Type D700_Position_Type;/* PVT */typedef struct { float alt; /* altitude above WGS 84 ellipsoid (meters) */ float epe; /* estimated position error, 2 sigma (meters) */ float eph; /* epe, but horizontal only (meters) */ float epv; /* epe, but vertical only (meters) */ int fix; /* type of position fix */ double tow; /* time of week (seconds) */ Radian_Type posn; /* latitude and longitude (radians) */ float east; /* velocity east (meters/second) */ float north; /* velocity north (meters/second) */ float up; /* velocity up (meters/second) */ float msl_hght; /* height of WGS 84 ellipsoid above MSL (meters) */ int leap_scnds; /* difference between GPS and UTC (seconds) */ long wn_days; /* week number days */} D800_Pvt_Data_Type;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -