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

📄 g7to.h

📁 这是经典的卫星编程应用程序
💻 H
📖 第 1 页 / 共 4 页
字号:
	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;

//7.5.21. D501_Almanac_Type
// Example products: GPS 12, GPS 12 XL, GPS 48, GPS II Plus and GPS III.
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 bits 17:24 (coded) 
} D501_Almanac_Type;

typedef char svid_type;
//7.5.22. D550_Almanac_Type
// Example products: GPS 150, GPS 155, GNC 250 and GNC 300.
typedef struct
{
	svid_type 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;
// The "svid" member identifies a satellite in the GPS constellation as
// follows:  PRN-01 through PRN-32 are indicated by "svid" equal to 0
// through 31, respectively.

//7.5.23. D551_Almanac_Type
// Example products: GPS 150 XL, GPS 155 XL, GNC 250 XL and GNC 300 XL.
typedef struct
{
	svid_type 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;
// The "svid" member identifies a satellite in the GPS constellation as
// follows:  PRN-01 through PRN-32 are indicated by "svid" equal to 0
// through 31, respectively.

//7.5.24. D600_Date_Time_Type
// Example products: all products unless otherwise noted.
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;
// The D600_Date_Time_Type contains the UTC date and UTC time.

//7.5.25. D700_Position_Type
// Example products: all products unless otherwise noted.
typedef Radian_Type D700_Position_Type;

//7.5.26. D800_Pvt_Data_Type
// Example products: all products unless otherwise noted.
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;
//=========================================
//=== End of typedefs from Garmin Beta doc
//=========================================

//=========================================
//
// functions
//
//=========================================
void 	push_route(void);
void 	push_icon(void);
void 	push_track(void);
void 	push_waypoint(void);
void 	push_proximity(void);
void 	push_record(char *in, INT convert);
void	Catcher(unsigned dd);
void	Usage(INT i);
void	Usageh0(void);
void	UsagehD(void);
void	UsagehI(void);
void	UsagehO(void);
void	byebye(INT rt);
void	calc_sa_items(void);
INT		checksum(unsigned char *m,INT l);
void	chk_cmdline(void);
void	set_sign(void);
void	set_ns(void);
void	clear_route_dupes(void);
void	clean_proximity(void);
void 	count_tracks(void);
void 	count_routes(void);
INT		comment_len(void);
void	convert_g64(unsigned char *in);
INT		convert_from_GPS(INT ict);
INT		convert_to_12xl(INT ict);
INT		convert_from_12xl(INT ict);
void	datumconv(double la, double lo);
long	date2days(short mm, short dd, short yy);
void	days2date(long days, short *mm, short *dd, short *yy);
void	datetime2record(char *d);
void	decode_COM(char *b);
INT		decode_month(char *s);
void	decode_route_start(unsigned char *ix);
void	DegToUTM(double lat, double lon, char *zone, double *x, double *y);
INT		determine_input(char *fname_in);
double	distance(double a,double b,double c,double d);
void	doAlmanac(void);
void	doD100(D100_Wpt_Type *a);
void 	doD105(D105_Wpt_Type *a);
void 	doD106(D106_Wpt_Type *a);
void 	doD150(D150_Wpt_Type *a);
void	doDisplay(void);
void	doEOFRec(void);
void	doProtocolArray(void);
void	doPVT(void);
void	doGPSPos(void);
void	doID(void);
void	domagmaxmin(char *in);
void	doRouteName(void);
void	doSAlmanac500(void);
void	doSRouteHdr(void);
void	doSTrack(void);
void	doSWaypoint(INT Prox);
void	doTime(void);
void	doSTime(void);
void	doTrack(void);
void	doGPSVolts(void);
void	doWaypoint(INT typ);
void	doProxWaypoint(void);
void	do_command(unsigned char *b);
void	do_input(INT i);
void	do_pushed_route(void);
void	do_sa3_merge(void);
void	doasystat(void);
INT		dow( INT day, INT mon, INT year );
long	dt2secs(short offset);
void	fill_icon(int i,unsigned char * j, INT convert);
void	fill_record_from_text(unsigned char *ix,INT convert);
void	fill_track(int ele,INT convert);
void	fill_waypoint_from_push(int i,int j, int convert);
void	fixname(INT j,unsigned char *name);
double	fm_diskLL(unsigned long l);
INT 	from_sa3object(BYTE val);
void	getAlmanac(void);
void	getGarminDisplay(void);
void	getGarminMessage(INT e);
void	getGPSPosition(void);
void	getGPSVolts(void);
void	getGPSTime(void);
void	getGPSrecords(void);
void	getGPSstart(unsigned char *m, INT c, char *msg);
void	getID(void);
void	GetLowrDisplay(void);
void	getRoute(void);
char	*getstrings(char *source, char *separators, INT a );
void	getTrack(void);
void	getProtocolArray(void);
void	getProxWaypoints(void);
void	getPVT(void);
void	getWaypoints(void);
INT		get_model(void);
INT		getopt(INT argc, char **argv, char *opts);
INT		htoi(char *s);
void	initialize(void);
INT		instr(char *src,char *pat);
void	light_sleep(char onoff);
char *  ltrim(char *s);
void	main(INT argc, char **argv);
void	make_bin(char *i,INT r);
double	mhr(char * tt);
void	msdelay(unsigned INT milliseconds);
void	navSRouteS(void);
void	navSWaypoint(void);
char *  null_newline(char *s);
void	open_COM(INT rcvr);
void	openit(char *b);
void	read_OZI_evt(void);
void	read_OZI_trk(void);
void	read_OZI_rte(void);
void	read_OZI_owp(void);
void	read_OZI_plt(void);
void	read_OZI_wpt(void);
void	read_FUGAWI_trk(void);
void	read_FUGAWI_wpt(void);
void	read_GPL(void);
INT		open_output(char *mode);
void	oomem(char *s);
void	out_sa3_m(void);
void	out_sa3_s(void);
void	out_sa3_t(void);
void	output_CSV(void);
void	output_IGC_trk(void);
void	output_OZI_evt(void);
void	output_OZI_trk(void);
void	output_OZI_plt(void);
void	output_OZI_wpt(void);
void	output_OZI_owp(void);
void	output_OZI_rte(void);
void	output_FUGAWI_trk(void);
void	output_FUGAWI_wpt(void);
void	output_g45(void);
void	output_g64(void);
void	output_GPL(void);
void	output_nav(void);
void	output_sa3(void);
void	output_sa3hdr(void);
void	output_sa4(void);
void	output_sa4_route0(void);
void	output_text(void);
void	outsa4_cir(void);
void	outsa4_trk(void);
void	output_UTM(void);
void	output_wpt2trk(void);
void	outsa4_area(void);
void	out_sa_route(INT i,INT j);
void	parseGPS(void);
void	poweroff(void);
void	printArray(void);
void	light_on(void);
void	light_off(void);
void	prhex(unsigned char *message,INT c);
void	print_csv_i(void);
void	print_csv_w(void);
void	print_csv_t(void);
void	print_datums(void);
void	print_g64_t(void);
void	print_g64_w(void);
void	print_icons(void);
void	print_routes(void);
void	print_text_w(void);
void 	print_waypoints(INT i,INT j);
void 	print_tracks(void);
void	print_protocols(void);
void	process_g45_in(void);
void	push_files(char *b);
void 	push_icon(void);
void 	push_proximity(void);
void 	push_record(char *in,INT convert);
void 	push_route(void);
void 	push_route_point(INT r, INT p);
void 	push_track(void);
void 	push_waypoint(void);
void	readMapNote(FILE *in);
void	readMapLine(FILE *in);
void	readMapArea(FILE *in);
void	readMapCircle(FILE *in);
void	readMapSymbol(FILE *in);
void	readMapText(FILE *in);
void	read_nav_route(void);
void	read_sa3(FILE *in);
INT		read_sa3_header(FILE *in, char* fname_in);
void	read_text(void);
char *  rtrim(char *s);
void	sa3out(unsigned char *s);
void	sa3out_w(void);
void	sa4out(unsigned char *s);
void	sa4out_t(void);
void	sa4out_th(INT i);
char *  secs2dt(long secs, short offset);
void	SendGarminMessage(BYTE *message, short bytes,char *m);
void	send_g45_routes(void);
void	send_num_points(int num, char *a);
void	set_align(char *arg);
void	set_circle_parms(void);
void	set_color(char *arg);
void	set_contrast(void);
void	set_datetime(void);
void 	set_datum(char *from, char * to);
void	set_params(void);
void	set_record_icon(void);
void	set_symbol_parms(void);
void	set_size(char *arg);
void	set_line_parms(INT lt);
void	setProtocolParams(void);
void	settime_record(time_t dot);
void	sortit(char **a, int *items);
void	stopPVT(void);
void	strip_chars(char *s);
void	strip_tr_0(char *s);
char	*strtok3(char *source, char *separators );
unsigned long to_diskLL(double l);
BYTE	to_sa3object(INT val);
char *  toDMlat(double a);
char *  toDMlon(double a);
char *  trim(char *s);
double  toDegrees(long a);
long	toSemiCircles(double b);
int		wpt_in_route(char *wpt, int rt);
void	UTMtoDeg(short zone, short southernHemisphere, double x, double y, double *lat, double *lon);
//
// Lowr.c routines
//
void	DoLowrWPT(void);
BYTE	SetLowrChkSum(BYTE * a, INT len);
BYTE	ChkLowrChkSum(BYTE * s, INT l);
void	SendLowrMessage(INT command, BYTE *message, INT bytes, char *msgtype);
void	GetLowrMessage(INT exit_on_error);
double	round(double n, int dig);
long 	atDegtoMM(double d);
double	LatMMtoDeg(long m);
long	LongDegtoMM(double d);
double	LongMMtoDeg(long m);
void	LowrParse(void);
void	OutputLowr(void);
void	GetLowrTrack(INT i);
void	GetLowrTrackMem(INT i);
void	GetLowrWpts(void);
void	GetLowrRts(void);
void	GetLowrIcons(void);
void	GetLowrID(void);
void	GetLowrGPSDisplay(void);
long	LatDegtoMM(double d);
INT		convert_to_Lowr(INT i);
INT		convert_from_Lowr(INT i);
void	DoLowrPlotTrailOrigin(void);

#define PROCX
#define DISABLE			0
#define ENABLE			1
#define ChkFree(a)		if((a)!=NULL)free(a)
#if __BORLANDC__
#define MAXWAYP 	 751
#else
#define MAXWAYP 	 65500
#endif
#define MAXROUTES 	  99
#define MAXPOINTS 	  99
#define MAXICON   	1001
#define MAXPROX 	  10
#define NORMAL_WP 	   0
#define NORMAL_WP_1    1
#define PROX_WP 	   6
#define ROUTE_1_WP	   8
#define ROUTE_WP	   9
#define NOFILE		-2  // file not found
#define UNKNOWN		 0  // Unknown file type
#define TEXT_IO		 1	// text/gd7
#define GARMIN		 2	// GPS i/o
#define SA3			 3	// Street Atlas 3
#define ALMANAC_D	 4	// Almanac data
#define NAVROUTE 	 5	// Navigate route
#define SA4          6	// Street Atlas 4
#define SA5          7	// Street Atlas 5
#define SA_GPL		 8  // Street Atlas GPL files
#define SA6          9	// Street Atlas 6
#define FUGAWI_WPT	10	// Fugawi waypoint file
#define FUGAWI_TRK	11	// Fugawi track file
#define OZI_EVT		12	// OziExplorer events (Icons)
#define LOWRANCE	15	// GPS i/o
#define OZI_PLT		16	// OziExplorer track file
#define OZI_WPT		17	// OziExplorer waypoint file
#define OZI_RTE		18	// OziExplorer route file
#define NONE		 0
#define SA_SYMBOL	 1
#define SA_TRACK	 2
#define SA_CIRCLE	 3

#define TRACKS		 1
#define WAYPOINTS	 2
#define ROUTES		 3
#define ID			 4
#define TIME		 5
#define POSITION	 6
#define ALMANAC		 7
#define PROXIMITY	 8
#define VOLTAGES 	 9
#define PVT			12
#define PPROTOCOLS	14
#define GERROR		99
#define LOWRERROR	99

#define TRACK1 		1
#define TRACK2 		2
#define LWRWPTS 	3
#define LWRRTS 		4
#define LWRICONS	5
#define LWRID		6
#define START		2447892L	// Julian date for 00:00 12/31/1989

⌨️ 快捷键说明

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