NEW: Navigation message (EPHEMERIS and more) found in some Garmins

The navigation message can be found in the 0x36 records sent by some Garmins.
These records contains one word of the navigation message (30 bits=0.6sec at 50 bits/sec).
Ten of these 30-bit words form a subframe (6 sec), and 5 subframes compose a whole frame that takes 30 seconds.

More details of the navidation message can be found in the GPS-ICD-200 official document.

First of all, the 0x36 records are 9-byte long in my GPS12. In a previous report.txt about these async messages I wrote:

------------------------------------------------
1.4 Message ID: 0x36
------------------------------------------------

General description:
timing info + something else. These records are only sent once we
have computed a valid pseudorange for a satellite (see power-on
description below), and disappear if there is troubles (when
tracked_byte of record 0x38 becomes 0).

Name         c_50
Position     Bytes 1-4
Type         unsigned long
Description  50 Hz counter, STARTING from the beginning of the week,
             that is, c_50/50 corresponds to TOW. It gets incremented
             in 30 count intervals, so that the resolution is 0.6 sec.

Name         unknown
Position     bytes 5-8
Type         BYTE[4]
Description  seem to vary randomly.

Name         svid
Position     byte 9
Type         BYTE
Description  SVID (PRN-1)

-------------------------------------------------------

That something else it is just the nav message.
The 50 Hz counter c_50 is counting the number of bits sent from the beginning of the week.
Every 0.6 seconds gets incremented by the 30 bits (one word) sent during that time.

However, there were 32 (4x8) extra bits in the 0x36 record. The two extra bits are the last two parity bits of the previous word (they come handy to check the parity).

The order of the bits in those 4 bytes follows a LSByte first rule, so if you have:

BYTE 1: b1  b2  b3  b4  b5  b6  b7  b8
BYTE 2: b9  b10 b11 b12 b13 b14 b15 b16
BYTE 3: b17 b18 b19 b20 b21 b22 b23 b24
BYTE 4: b25 b26 b27 b28 b29 b30 b31 b32

then we've got:

b25, b26 : last parity bits of previous word (D29* D30*)
b27-32, b17-24, b9-b16, b1-b2 : data bits (D1-D24)
b3-b8 : parity bits (D25-D30)

Finally the data bits still have to be complemented with D30* according to the parity algorithm explained in the GPS signal specs.

There are two new options in gar2rnx (version 1.45 and above) dealing with this newly found data. The most useful is simply -nav that allows to create a Rinex ephemeris file from the binary data captured with async.

gar2rnx bin.g12 -nav

will dump a Rinex navigation file, corresponding to the session logged in bin.g12, to the standard output.

If we add the -f option, a properly named rinex navigation file will be created, tipically BRDCDDD1.YYN
A Rinex navigation file contains the ephemeris of those sats seen during a session, and should look like this:

------------------------------------------------------------------------------
     2.10           N: GPS NAV DATA                         RINEX VERSION / TYPE
GAR2RNX 1.47        Any GPS12 Owner     Wed Apr  3 02:11:42 PGM / RUN BY / DATE 
** gar2rnx (GARmin TO RiNeX) generates ephemeris files      COMMENT             
** from a GPS12 (and others) (Copyright Antonio Tabernero)  COMMENT             
** Generated from G12 data file: mio1.g12                   COMMENT             
** Options: -nav -f                                         COMMENT             
                                                            END OF HEADER       
 7 00  6 22 16  0  0.0 0.189867801964D-03-0.216004991671D-11 0.000000000000D+01
    0.450000000000D+02 0.116875000000D+02 0.483127267047D-08-0.977068720228D+00
    0.804662704468D-06 0.112362442305D-01 0.803545117378D-05 0.515356813622D+04
    0.403200000000D+06 0.223517417908D-07 0.380749972679D+00 0.290572643280D-06
    0.950557677834D+00 0.220218750000D+03-0.208868125695D+01-0.820034157714D-08
   -0.306798493674D-09 0.100000000000D+01 0.106700000000D+04 0.000000000000D+01
    0.200000000000D+01 0.000000000000D+01-0.186264514923D-08 0.450000000000D+02
    0.398382000000D+06 0.000000000000D+01 0.000000000000D+01 0.000000000000D+01
18 00  6 22 16  0  0.0 0.355904921889D-04 0.227373675443D-12 0.000000000000D+01
    0.200000000000D+02-0.775937500000D+02 0.471841082646D-08-0.103262712168D+01
   -0.409781932831D-05 0.750887219328D-02 0.712275505066D-05 0.515372955894D+04
    0.403200000000D+06-0.139698386192D-06-0.278472808964D+01-0.745058059692D-08
    0.951039210486D+00 0.237468750000D+03 0.188077257130D+01-0.829748848084D-08
   -0.102861427448D-09 0.100000000000D+01 0.106700000000D+04 0.000000000000D+01
    0.200000000000D+01 0.000000000000D+01-0.512227416039D-08 0.200000000000D+02
    0.398382000000D+06 0.000000000000D+01 0.000000000000D+01 0.000000000000D+01
19 00  6 22 15 59 44.0 0.213040038943D-03 0.109139364213D-10 0.000000000000D+01
    0.115000000000D+03-0.112812500000D+02 0.507092551012D-08 0.285225046775D+01
   -0.560656189919D-06 0.593586359173D-02 0.935792922974D-05 0.515366947556D+04
    0.403184000000D+06-0.204890966415D-07-0.176824750055D+01-0.856816768646D-07
    0.927339443136D+00 0.181656250000D+03-0.261839193264D+01-0.813783897366D-08
    0.289654922433D-09 0.100000000000D+01 0.106700000000D+04 0.000000000000D+01
    0.200000000000D+01 0.000000000000D+01-0.325962901115D-08 0.115000000000D+03
    0.398382000000D+06 0.000000000000D+01 0.000000000000D+01 0.000000000000D+01
16 00  6 22 16  0  0.0-0.748299062252D-04-0.156887836056D-10 0.000000000000D+01
    0.165000000000D+03-0.971875000000D+01 0.436018161907D-08 0.153347116574D+01
   -0.439584255219D-06 0.508628296666D-02 0.361539423466D-05 0.515361321259D+04
    0.403200000000D+06-0.745058059692D-08 0.255019395409D+01 0.160187482834D-06
    0.977469284753D+00 0.317906250000D+03 0.435412883940D+00-0.821248494010D-08
   -0.482162941165D-10 0.100000000000D+01 0.106700000000D+04 0.000000000000D+01
    0.200000000000D+01 0.000000000000D+01-0.931322574615D-09 0.165000000000D+03
    0.398382000000D+06 0.000000000000D+01 0.000000000000D+01 0.000000000000D+01
20 00  6 22 16  0  0.0 0.868132337928D-04 0.251247911365D-10 0.000000000000D+01
    0.280000000000D+02-0.253125000000D+01 0.474269755239D-08 0.321952246352D+00
   -0.203028321266D-06 0.239349796902D-02 0.330992043018D-05 0.515382611275D+04
    0.403200000000D+06-0.428408384323D-07 0.250116179696D+01 0.111758708954D-07
    0.958358834784D+00 0.313031250000D+03 0.220753708229D+01-0.837963475971D-08
    0.314298806093D-10 0.100000000000D+01 0.106700000000D+04 0.000000000000D+01
    0.570000000000D+01 0.000000000000D+01-0.651925802231D-08 0.280000000000D+02
    0.398382000000D+06 0.000000000000D+01 0.000000000000D+01 0.000000000000D+01
 1 00  6 22 16  0  0.0 0.133352819830D-03 0.147792889038D-11 0.000000000000D+01
    0.270000000000D+02-0.845625000000D+02 0.436446751188D-08 0.309266921468D+01
   -0.443682074547D-05 0.508121901657D-02 0.733695924282D-05 0.515371197128D+04
    0.403200000000D+06 0.335276126862D-07-0.271555080301D+01-0.260770320892D-07
    0.961137185393D+00 0.237250000000D+03-0.171065350418D+01-0.789675750308D-08
   -0.117504894551D-09 0.100000000000D+01 0.106700000000D+04 0.000000000000D+01
    0.400000000000D+01 0.000000000000D+01-0.325962901115D-08 0.539000000000D+03
    0.398400000000D+06 0.000000000000D+01 0.000000000000D+01 0.000000000000D+01

With the -nav option we don't need to download the ephemeris from the net for our future postprocessing. It would be also possible to carry out real-time DGPS (if we have a link with the other station). We could also generate differential corrections, converting a Garmin into a cheap reference station, and send them to our rover, etc.

The other major option added to gar2rnx is -monitor. This option followed by a prn number will monitor the navigation message coming from a particular satellite, check the parity of the received words, group them in a subframe and identify the subframe type and page, indicating the contents of the data.

gar2rnx bin.g12 -monitor 29

-----------------------------------------------------------------
   ** Tracking navigation message from PRN 29 **
-----------------------------------------------------------------
Subframe HOW  Words in SF  Parity/Subframe ID/page      Contents
-----------------------------------------------------------------
 HOW 587988  [  OOOOOOOO]  ERROR: 2 missing words
 HOW 587994  [OOOOOOOOOO]  Subframe 5, page 25    Sat 1-24 health data
 HOW 588000  [OOOOOOOOOO]  Subframe 1             Ephemeris data
 HOW 588006  [OOOOOOOOOO]  Subframe 2             Ephemeris data
 HOW 588012  [OOOOOOOOOO]  Subframe 3             Ephemeris data
 HOW 588018  [OOOOOOOOOO]  Subframe 4, page  1*   Reserved
 HOW 588024  [OOOOOOOOOX]  BAD PARITY
 HOW 588030  [XOOOOOOOOO]  BAD PARITY
 HOW 588036  [OOOOOOOOOO]  Subframe 2             Ephemeris data
 HOW 588042  [OOOOOOOOOO]  Subframe 3             Ephemeris data
 HOW 588048  [OOOOOOOOXX]  BAD PARITY
 HOW 588054  [OOOOOOOOOO]  Subframe 5, page  2    Almanac (sat 2)
 HOW 588060  [OOOOOOOOOO]  Subframe 1             Ephemeris data
 HOW 588066  [XXOOOOOOOO]  BAD PARITY
 HOW 588072  [OOOOOOOOOO]  Subframe 3             Ephemeris data      
 ...

The HOW correspond to the time (seconds within the week) when the first word of the subframe was transmitted. The symbol O indicates a word received that passed the parity check. A parity failure is indicated by X. Missing words are shown as blanks. Only those subframes with all their words are interpreted.

If, (in addition to -monitor) we use the -V option, gar2rnx will interprete and present the information received in the different subframes. Sure enough, only those fields documented in the unclassified documents will be shown.

-----------------------------------------------------------------
   ** Tracking navigation message from PRN  1 **
-----------------------------------------------------------------
Subframe HOW  Words in SF  Parity/Subframe ID/page      Contents
-----------------------------------------------------------------
 HOW 398358  [      OOOO]  ERROR: 6 missing words
----------------------------------------------------------------------
 HOW 398364  [OOOOOOOOOO]  Subframe 5, page  4    Almanac (sat 4)

 Subframe 5: Page  4 (Almanac data for sat 4)
             Almanac Reference Time (toa) 503808 sec. Health 00000000
             Semimajor axis: 26561.09 km.  Eccentricity: 0.00518084
             Right Ascension (W): 84.41 deg. Rate (Wdot): -5.7''/hour
             Inclination angle (i0) : 55.94 deg.
             Argument of Perigee (w): -31.48 deg.
             Mean Anomaly (m0): -95.60 deg.
             Clock error:  136.4 usec.  Clock drift:  4.09 usec/day.
----------------------------------------------------------------------
----------------------------------------------------------------------
 HOW 398370  [OOOOOOOOOO]  Subframe 1             Ephemeris data
 
PRN 01: Issue Of Data Clock (IODC) 0539 -> IODE  27. Week GPS 1067.
        P code ON in L2. NAV data on L2: ON
        Healthy satellite
        User Range Accuracy: 4.0 mt.  Alert flag 0. Anti-spoof: ON
        Group Delay Differential (tgd): -0.00326 microsec (usec)
        Time of Clock (toc) 403200.0 sec. Clock error:  133.4 usec
        Clock drift:  0.13 usec/day. Rate of drift: 0.00 sec/sec^2
----------------------------------------------------------------------
 HOW 398376  [OOOOOOOOOO]  Subframe 2             Ephemeris data
 
PRN 01: Issue Of Data Ephemeris (IODE) 27
        Reference Time for Ephemeris (TOE): 403200 sec
        Semi-major axis: 26560.75 km.   Orbit eccentricity: 0.00508122
        Mean Anomaly (m0): 177.2 deg.   Mean Motion: 30.08 deg/hour
        Cus:  7.3370e-06 rad.  Cuc: -4.4368e-06 rad.  Crs: -84.56 mt.
        Curve Fit Interval: 4 hours.  AODO 27000 sec
----------------------------------------------------------------------
 HOW 398382  [OOOOOOOOOO]  Subframe 3             Ephemeris data
 
PRN 01: Issue of Data Ephemeris (IODE) 27 .
        Inclination angle (i0) : 55.07 deg. Rate (idot): -0.09 ''/hour
        Right Ascension (W)    : -155.6 deg. Rate (Wdot): -5.86 ''/hour
        Argument of Perigee (w): -98.01 deg.
        Cis: -2.6077e-08 rad.  Cic:  3.3528e-08 rad.  Crc: 237.2 mt.
----------------------------------------------------------------------  
----------------------------------------------------------------------
 HOW 398388  [OOOOOOOOOO]  Subframe 4, page --    Dummy sat(no data)
 
 Subframe 4: Dummy sat. No data
----------------------------------------------------------------------
 HOW 398394  [OOOOOOOOOO]  Subframe 5, page  5    Almanac (sat 5)
 
 Subframe 5: Page  5 (Almanac data for sat 5)
             Almanac Reference Time (toa) 503808 sec. Health 00000000
             Semimajor axis: 26559.79 km.  Eccentricity: 0.00202608
             Right Ascension (W): -39.70 deg. Rate (Wdot): -6.1''/hour
             Inclination angle (i0) : 53.68 deg.
             Argument of Perigee (w): 9.71 deg.
             Mean Anomaly (m0): -98.48 deg.
             Clock error:  254.6 usec.  Clock drift:  0.00 usec/day.
----------------------------------------------------------------------

Finally, using the -sf and -page options we can choose which subframe/page are shown.

gar2rnx bin.g12 -monitor 13 -V -sf 4 -page 18

will monitor the nav data stream coming from satellite with prn 13 and within those subframes with ID 4 will decode only those corresponding to page 18 (IONO and UTC parameters).

The capability to parse the navigation message is included in gar2rnx in versions 1.45 and above. Async doesnt need any changes to log the nav data (it was there all this time).



ATG, ant@fi.upm.es
Ultima Modificación: Mon Apr 8 12:18:34 CEST 2002