/* @(#) client_bc_mesg_rtg.h 1.3 12/12/01 */ #ifndef _client_bc_mesg_rtg_ #define _client_bc_mesg_rtg_ /* defined by gpsudp.h */ #ifndef EPHEMERIS_DATA_SIZE #define EPHEMERIS_DATA_SIZE 136 /* 136 bytes */ #endif #define gps_strt (-630763200.0) /* seconds past J2000 on 06-Jan-1980 00:00:00.000 gps time is counted from here*/ #define jdref (2451545.0) /* J2000.0 (January 1, 2000, 12 hours) */ #define sec_per_day (86400.0) #define PORTNUMBER_BC_MESG 8301 /*------------------------------------------------------------------- */ /* EPHEMERIS_DATA_T: ephemeris data */ /*------------------------------------------------------------------- */ typedef struct { long tow; /* seconds of GPS week 0, 1, 2, 3 */ float tgd; /* Group delay (sec) 4, 5, 6, 7 */ long aodc; /* Clock data issue 8, 9,10,11 */ long toc; /* (sec) 12,13,14,15 */ float af2; /* Clock (sec/sec**2) 16,17,18,19 */ float af1; /* Clock (sec/sec) 20,21,22,23 */ float af0; /* Clock (sec) 24,25,26,27 */ long aode; /* Orbit Data issue 28,29,30,31 */ double m0; /* Mean anomaly at ref time (semi-circle) 32,...39 */ double e; /* Eccentricity 40,...47 */ double roota; /* square root of semi-major axis (meters**.5) 48,...55 */ float deltan; /* Mean anomaly correction (semi-circle/sec) 56,...59 */ long toe; /* ref time for orbit (sec) 60,...63 */ float cic; /* harmonic correction term (radians) 64,...67 */ float crc; /* harmonic correction term (meters) 68,...73 */ float cis; /* harmonic correction term (radians) 72,...75 */ float crs; /* harmonic correction term (meters) 76,...79 */ float cuc; /* harmonic correction term (radians) 80,...83 */ float cus; /* harmonic correction term (radians) 84,...87 */ double omega0; /* Lon of Ascending node (semi-circle) 88,...95 */ double omega; /* Argument of Perigee (semi-circle) 96,...103 */ double i0; /* inclination angle at ref time (semi-circle)104,...111 */ float omegadot; /* Rate of right Asc. (semi-circle per sec) 112,...115 */ float idot; /* Rate of inclination (semi-circle per sec) 116,...119 */ short accuracy; /* (coded) 120, 121 */ short health; /* (coded) 122, 123 */ short fit; /* Curve fit interval (coded) 124, 125 */ char prn; /* SV PRN number,rjm note,from 1 to 31 only 126 */ char res; /* Reserved byte,rjm note,last bit indicates primary 127 */ short wn; /* GPS week number 128, 129 */ short Dummy1; /* Dummy 130, 131 */ short Dummy2; /* Dummy 132, 133 */ unsigned short checksum; /* Checksum 134, 135 */ } EPHEMERIS_DATA_T; /* --136 bytes-- */ #endif