[ Short extract from the Garmin GPS 35 LP manual - the original manual is in PDF format available from the Garmin web site: http://www.garmin.com ] Appendix C Phase Output Data Binary Format Two records are transmitted once per second by the GPS 35LP. One record contains primarily post-process information such as position and velocity information. The second record contains receiver measurement information. The records are sent at a default baud rate of 9600 baud, 8 bits, no parity. Records begin with a delimiter byte (10 hex). The second byte identifies the record type (28 hex for a position record, 29 hex for a receiver measurement). The third byte indicates the size of the data. The fourth byte is the first byte of data. The data is then followed by a chksum byte, a delimiter byte (10 hex), and an end-of-transmission character (03 hex). Note - If RTCM-104 differential data is sent to the GPS 35LP the board will reset the Phase Output Data baud rate to the same baud rate used for RTCM-104 data. If the differential inputs are used on the GPS 35LP then the RTCM-104 data must be sent to the GPS 35LP at 9600 baud(preferred) or 4800 baud. RTCM-104, baud rates less than 4800 baud are not supported by the GPS 35LP since it would limit bus bandwidth past the point where a once per second phase output data rate could be maintained. Position Record - 0x10 (dle is first byte) - 0x28 (position record identifier) - 0x36 (size of data) - cpo_pvt_type (see description below) - one byte chksum (the addition of bytes between the delimiters should equal 0) - 0x10 (dle) - 0x03 (etx is last byte) typedef struct { float alt; float epe; float eph; float epv; int fix; double gps_tow; double lat; double lon; float lon_vel; float lat_vel; float alt_vel; } cpo_pvt_type; alt ellipsoid altitude (mt) epe est pos error (mt) eph pos err, horizontal (mt) epv pos err, vertical (mt) fix 0 = no fix; 1 = no fix; 2 = 2D; 3 = 3D; 4 = 2D differential; 5 = 3D differential; 6 and greater - not defined gps_tow gps time of week (sec) lat Latitude (rad) lon Longitude (rad) lon_vel Longitude velocity (mt/sec) lat_vel Latitude velocity (mt/sec) alt_vel Altitude velocity (mt/sec) Receiver Measurement Record - 0x10 (dle is first byte) - 0x29 (receiver record identifier) - 0xE2 (size of data) - cpo_rcv_type (see below) - one byte chksum (the addition of bytes between the delimiters should equal 0) - 0x10 (dle) - 0x03 (etx) typedef struct { unsigned long cycles; double pr; unsigned int phase; char slp_dtct; unsigned char snr_dbhz; char svid; char valid; } cpo_rcv_sv_type; typedef struct { double rcvr_tow; int rcvr_wn; cpo_rcv_sv_type sv[12]; } cpo_rcv_type; rcvr_tow Receiver time of week (sec) rcvr_wn Receiver week number cycles Number of accumulated cycles pr pseudo range (mt) phase to convert to (0 -359.999) multiply by 360.0 and divide by 2048.0 slp_dtct 0 = no cycle slip detected; non 0 = cycle slip detected snr_dbhz Signal strength svid Satellite number (0 - 31) Note - add 1 to offset to current svid numbers valid 0 = information not valid; non 0 = information valid dle and etx bytes: Software written to receive the two records should filter dle and etx bytes as described below: typedef enum { dat, dle, etx } rx_state_type; char in_que[256]; int in_que_ptr = 0; rx_state_type rx_state = dat; void add_to_que( char data ) { #define dle_byte 0x10 #define etx_byte 0x03 if (rx_state == dat) { if (data == dle_byte) { rx_state = dle; } else { in_que[ in_que_ptr++ ] = data; } } else if (rx_state == dle) { if (data == etx_byte) { rx_state = etx; } else { rx_state = dat; in_que[ in_que_ptr++ ] = data; } } else if (rx_state == etx) { if (data == dle_byte) { rx_state = dle; } } if (in_que_ptr > 255) { in_que_ptr = 0; } } [ This from a few pages later - these are the outputs of some DOS programs supplied with the dev kit] File Formats ALMANAC.DAT Example almanac entry: **** Week 794 almanac for PRN-01 ************ ID: 01 Health: 000 Eccentricity: 3.414630890E-003 Time of Applicability(s): 380928.0000 Orbital Inclination(rad): 9.549833536E-001 Rate of Right Ascen(r/s): -7.771752131E-009 SQRT(A) (m^1/2): 5153.589843 Right Ascen at TOA(rad): 8.032501489E-002 Argument of Perigee(rad): -1.308424592E+000 Mean Anom(rad): 2.045822620E+000 Af0(s): 9.536743164E-007 Af1(s/s): 8.367351256E-011 week: 794 Almanac information for satellites with a bad health status will not be included in this file when downloaded from the GPS25 sensor and should not be included when uploading to the GPS25 sensor. EPHEMERS.DAT Example ephemeris entry: **** Week 794. Ephemeris for PRN-18 ********** Ref Time of Clk Parms(s): 233504.000000 Ref Time of Eph Parms(s): 233504.000000 Clk Cor, Group Dly(s): -8.280389E-006 Clk Correction af1(s/s): -3.410605E-013 Clk Correction af2(s/s/s): 0.000000E+000 User Range Accuracy(m): 33.299999 Eccentricity(-): 5.913425E-003 SQRT(A) (m**1/2): 5.153628E+003 Mean Motion Cor(r/s): 4.710911E-009 Mean Anomaly(r): 6.033204E-001 Argument of Perigee(r): 1.418009E+000 Right Ascension(r): 3.520111E-002 Inclination Angle(r): 9.434418E-001 Rate of Right Asc(r/s): -8.210699E-009 Rate of Inc Angle(r/s): 4.503759E-010 Lat Cor, Sine(r): 1.212582E-005 Lat Cor, Cosine(r): 2.004206E-006 Inc Cor, Sine(r): -1.490116E-008 Inc Cor, Cosine(r): -9.872019E-008 Radius Cor, Sine(m): 38.375000 Radius Cor, Cosine(m): 132.937500 Issue of Data : 184 Ephemeris Record - 0x10 (dle is first byte) - 0x2A (ephemeris record identifier) - 0x94 (size of data) - eph_type (see description below) - one byte chksum (the addition of bytes between the delimiters should equal 0) - 0x10 (dle) - 0x03 (etx) typedef struct /* ephemeris record */ { char svid; /* Satellite number (0 - 31) */ int wn; /* week number (weeks) */ float toc; /* reference time of clock parameters (s) */ float toe; /* reference time of ephemeris parameters (s) */ float af0; /* clock correction coefcnt - group delay (s) */ float af1; /* clock correction coefficient (s/s) */ float af2; /* clock correction coefficient (s/s/s) */ float ura; /* user range accuracy (m) */ double e; /* eccentricity (-) */ double sqrta; /* square root of semi-major axis (a) (m**1/2) */ double dn; /* mean motion correction (r/s) */ double m0; /* mean anomaly at reference time (r) */ double w; /* argument of perigee (r) */ double omg0; /* right ascension (r) */ double i0; /* inclination angle at reference time (r) */ float odot; /* rate of right ascension (r/s) */ float idot; /* rate of inclination angle (r/s) */ float cus; /* argument of latitude correction, sine (r) */ float cuc; /* argument of latitude correction, cosine (r) */ float cis; /* inclination correction, sine (r) */ float cic; /* inclination correction, cosine (r) */ float crs; /* radius correction, sine (m) */ float crc; /* radius correction, cosine (m) */ byte iod; /* issue of data */ } eph_type; To initiate an ephemeris download for all tracked satellites send the following bytes in sequence: 0x10, 0x0D, 0x04, 0x02, 0x0C, 0x0, 0x0, 0xE1, 0x10, 0x03 GPS25PM.DAT Example data file entry: TIM time_of_week week_number RCV svid snr (T)rack/(C)ycle_slip phase pseudo_range cycles PVT time lat lon alt lat_vel lon_vel alt_vel epe eph epv TIM 235537.99855650 794 RCV 18 50 T 120.2 19964528.44 2068193 RCV 29 50 T 133.2 20364313.25 1950557 RCV 28 45 T 176.5 21135153.13 2069992 RCV 19 47 T 145.2 21190271.83 2182643 RCV 31 45 T 75.8 21240354.20 2216421 RCV 22 42 T 195.1 22849183.41 1855826 RCV 27 36 T 155.2 24234175.55 2230462 RCV 14 39 T 202.3 25147694.34 1845263 PVT 235537.99999842 38.9499588 94.7463684 211.7 -0.19 -0.31 0.13 28 16 23 TIM 235538.99853500 794 RCV 18 50 T 38.8 19958107.10 2101947 RCV 29 50 T 132.4 20358247.54 1982431 RCV 28 45 T 189.5 21128713.01 2103829 RCV 19 47 T 284.6 21183470.16 2218374 RCV 31 45 T 19.0 21233441.89 2252746 RCV 22 42 T 263.0 22843381.08 1886300 RCV 27 36 T 311.7 24227194.88 2267146 RCV 14 39 T 308.3 25141899.86 1875708 PVT 235538.99999827 38.9499550 94.7463684 212.6 -0.19 -0.30 0.14 28 16 23 TIM 235539.99851349 794 RCV 18 50 T 76.6 19951681.26 2135704 RCV 29 50 T 284.4 20352180.11 2014308 RCV 28 45 T 320.8 21122272.68 2137669 RCV 19 47 T 8.3 21176671.33 2254110 RCV 31 45 T 170.2 21226528.82 2289074 RCV 22 42 T 315.9 22837584.50 1916778 RCV 27 36 T 132.4 24220207.85 2303835 RCV 14 39 T 127.4 25136106.23 1906158 PVT 235539.99999812 38.9499512 94.7463684 213.5 -0.19 -0.30 0.13 28 16 23 TIM 235540.99849199 794 RCV 18 50 T 174.9 19945258.21 2169465 RCV 29 50 T 177.7 20346113.87 2046190 RCV 28 45 T 159.6 21115834.07 2171514 RCV 19 47 T 324.7 21169868.61 2289849 RCV 31 45 T 111.8 21219615.05 2325407 RCV 22 42 T 261.7 22831782.87 1947261 RCV 27 36 T 259.1 24213226.41 2340528 RCV 14 39 T 318.7 25130310.86 1936612 PVT 235540.99999797 38.9499474 94.7463760 214.4 -0.19 -0.30 0.14 28 16 23 TIM 235541.99847244 794 RCV 18 50 T 325.5 19938831.69 2203229 RCV 29 50 T 152.1 20340045.44 2078075 RCV 28 45 T 52.4 21109392.21 2205362 RCV 19 47 T 125.3 21163068.15 2325593 RCV 31 45 T 159.4 21212700.30 2361743 RCV 22 43 T 117.1 22825981.54 1977748 RCV 27 36 T 352.1 24206248.88 2377225 RCV 14 39 T 141.3 25124515.72 1967071 PVT 235541.99999977 38.9499474 94.7463760 215.4 -0.19 -0.30 0.13 28 16 23