almance.h

来自「GPS的一些功能实现以及详细的源代码」· C头文件 代码 · 共 50 行

H
50
字号
#include <stdio.h>

/* structures */
typedef struct                   /* Header & structure for binary gpb files */
						   /* (202 bytes) */
{
				 /* variables used by software */
     char fname[40];             /* file name */
     FILE *f;                    /* file pointer */
     short vbufsize;             /* size of file buffer (internal) */
     void *vbuf;                 /* pointer to vbuf (allocated in open) */
}    almance_bin_file_type;

typedef struct          /* standard ephemerus type for ALL programs */
{
    short    prn;
    short    health;                     /* Satellite health */
    float    e;                          /*  eccentricity */
    long     toa;                        /*  ref time (sec) */
    double i0;                           /*  inclination angle at ref time
					     semi-circles*pi */
    double omegadot;                     /*  rate of right ascension*/
    double roota;                        /*  sqr root a ( metres 1/2 ) */
    double omega0;                       /*  longitude  of asccending node
					     semi-circles*pi = rads */
    double omega;                        /*  argument of perigee
					     semi-circles*pi */
    double m0;                           /*  mean anomoly at ref time
					     semi-circles*pi = rads */
    double af0,                          /*  clock correction(sec) */
	   af1;                          /*  clock correction(sec/sec) */
    short  wna;				 /*  almance week number */
    short  wn;				 /*  GPS week number */
    long   tow;                          /*  sec of GPS week */
    unsigned   checksum;
} almance_type;



/* prototypes */
almance_bin_file_type *open_bin_file( char *fname, unsigned vbufsize );
int read_bin_almance( almance_bin_file_type *h, almance_type *b );
void close_bin_file( almance_bin_file_type *h );
void GetElev(double SatX0,double SatY0,double SatZ0,double ObsB,double ObsL,double ObsH,
	       double *r,double *elev,double *azi);
void GetSatPos(almance_type *Text,double t,double *SatX,double *SatY,double *SatZ);
int  GetGPSTime(int year,int month,int day,
		   int hour,int minute,double second,double *gpstime);

⌨️ 快捷键说明

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