GPS URANUS 625R

                                      The NMEA 0183 Protocol

                                                           

Decode of selected position sentences

The most important NMEA sentences include the GGA which provides the current Fix data, the RMC which provides the minimum gps sentences information, and the GSA which provides the Satellite status data.
GGA - essential fix data which provide 3D location and accuracy data.
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

Where:
     GGA          Global Positioning System Fix Data
     123519       Fix taken at 12:35:19 UTC
     4807.038,N   Latitude 48 deg 07.038' N
     01131.000,E  Longitude 11 deg 31.000' E
     1            Fix quality: 0 = invalid
                               1 = GPS fix (SPS)
                               2 = DGPS fix
                               3 = PPS fix
			       4 = Real Time Kinematic
			       5 = Float RTK
                               6 = estimated (dead reckoning) (2.3 feature)
			       7 = Manual input mode
			       8 = Simulation mode
     08           Number of satellites being tracked
     0.9          Horizontal dilution of position
     545.4,M      Altitude, Meters, above mean sea level
     46.9,M       Height of geoid (mean sea level) above WGS84
                      ellipsoid
     (empty field) time in seconds since last DGPS update
     (empty field) DGPS station ID number
     *47          the checksum data, always begins with *
If the height of geoid is missing then the altitude should be suspect. Some non-standard implementations report altitude with respect to the ellipsoid rather than geoid altitude. Some units do not report negative altitudes at all. This is the only sentence that reports altitude.


GSA - GPS DOP and active satellites. This sentence provides details on the nature of the fix. It includes the numbers of the satellites being used in the current solution and the DOP. DOP (dilution of precision) is an indication of the effect of satellite geometry on the accuracy of the fix. It is a unitless number where smaller is better. For 3D fixes using 4 satellites a 1.0 would be considered to be a perfect number, however for overdetermined solutions it is possible to see numbers below 1.0.
There are differences in the way the PRN's are presented which can effect the ability of some programs to display this data. For example, in the example shown below there are 5 satellites in the solution and the null fields are scattered indicating that the almanac would show satellites in the null positions that are not being used as part of this solution. Other receivers might output all of the satellites used at the beginning of the sentence with the null field all stacked up at the end. This difference accounts for some satellite display programs not always being able to display the satellites being tracked. Some units may show all satellites that have ephemeris data without regard to their use as part of the solution but this is non-standard.
$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39

Where:
     GSA      Satellite status
     A        Auto selection of 2D or 3D fix (M = manual) 
     3        3D fix - values include: 1 = no fix
                                       2 = 2D fix
                                       3 = 3D fix
     04,05... PRNs of satellites used for fix (space for 12) 
     2.5      PDOP (dilution of precision) 
     1.3      Horizontal dilution of precision (HDOP) 
     2.1      Vertical dilution of precision (VDOP)
     *39      the checksum data, always begins with *
GSV - Satellites in View shows data about the satellites that the unit might be able to find based on its viewing mask and almanac data. It also shows current ability to track this data. Note that one GSV sentence only can provide data for up to 4 satellites and thus there may need to be 3 sentences for the full information. It is reasonable for the GSV sentence to contain more satellites than GGA might indicate since GSV may include satellites that are not used as part of the solution. It is not a requirment that the GSV sentences all appear in sequence. To avoid overloading the data bandwidth some receivers may place the various sentences in totally different samples since each sentence identifies which one it is.
The field called SNR (Signal to Noise Ratio) in the NMEA standard is often referred to as signal strength. SNR is an indirect but more useful value that raw signal strength. It can range from 0 to 99 and has units of dB according to the NMEA standard, but the various manufacturers send different ranges of numbers with different starting numbers so the values themselves cannot necessarily be used to evaluate different units. The range of working values in a given gps will usually show a difference of about 25 to 35 between the lowest and highest values, however 0 is a special case and may be shown on satellites that are in view but not being tracked.
$GPGSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75

Where:
      GSV          Satellites in view
      2            Number of sentences for full data
      1            sentence 1 of 2
      08           Number of satellites in view

      01           Satellite PRN number
      40           Elevation, degrees
      083          Azimuth, degrees
      46           SNR - higher is better
           for up to 4 satellites per sentence
      *75          the checksum data, always begins with *

RMC - NMEA has its own version of essential gps pvt (position, velocity, time) data. It is called RMC, The Recommended Minimum, which will look similar to:
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

Where:
     RMC          Recommended Minimum sentence C
     123519       Fix taken at 12:35:19 UTC
     A            Status A=active or V=Void.
     4807.038,N   Latitude 48 deg 07.038' N
     01131.000,E  Longitude 11 deg 31.000' E
     022.4        Speed over the ground in knots
     084.4        Track angle in degrees True
     230394       Date - 23rd of March 1994
     003.1,W      Magnetic Variation
     *6A          The checksum data, always begins with *
Note that, as of the 2.3 release of NMEA, there is a new field in the RMC sentence at the end just prior to the checksum. For more information on this field see here.




VTG - Velocity made good. The gps receiver may use the LC prefix instead of GP if it is emulating Loran output.
$GPVTG,054.7,T,034.4,M,005.5,N,010.2,K*48

where:
        VTG          Track made good and ground speed
        054.7,T      True track made good (degrees)
        034.4,M      Magnetic track made good
        005.5,N      Ground speed, knots
        010.2,K      Ground speed, Kilometers per hour
        *48          Checksum
Note that, as of the 2.3 release of NMEA, there is a new field in the VTG sentence at the end just prior to the checksum. For more information on this field see here.
Receivers that don't have a magnetic deviation (variation) table built in will null out the Magnetic track made good.




Ejemplo  URANUS 625R (ROM BASE)

9600 bps
8 bit
1 stop



$GPGSV,2,1,08,14,56,140,,19,56,273,42,03,44,324,36,06,39,346,26*70
$GPGSV,2,2,08,11,26,223,,32,24,261,32,18,04,112,,16,00,341,*7B
$GPRMC,182440.007,A,2340.2965,S,04632.7425,W,000.0,000.0,280611,,,A*6B
$GPVTG,000.0,T,,M,000.0,N,000.0,K,A*0D
$GPGGA,182441.007,2340.2965,S,04632.7426,W,1,04,9.4,664.3,M,-2.3,M,,0000*45        ****
$GPGSA,A,3,03,19,32,06,,,,,,,,,10.8,9.4,5.3*0C

***   182441.007    + 1 sec time

$GPGSV,2,1,08,14,56,140,,19,56,273,42,03,44,324,37,06,39,346,26*71
$GPGSV,2,2,08,11,26,223,,32,24,261,32,18,04,112,,16,00,341,*7B
$GPRMC,182441.007,A,2340.2965,S,04632.7426,W,000.0,000.0,280611,,,A*69
$GPVTG,000.0,T,,M,000.0,N,000.0,K,A*0D
$GPGGA,182442.007,2340.2965,S,04632.7427,W,1,04,9.4,664.4,M,-2.3,M,,0000*40       ****
$GPGSA,A,3,03,19,32,06,,,,,,,,,10.8,9.4,5.3*0C

*** 182442.007  <   + 1 sec time

$GPGSV,2,1,08,14,56,140,,19,56,273,42,03,44,324,36,06,39,346,26*70
$GPGSV,2,2,08,11,26,223,,32,24,261,31,18,04,112,,16,00,341,*78
$GPRMC,182442.007,A,2340.2965,S,04632.7427,W,000.0,000.0,280611,,,A*6B
$GPVTG,000.0,T,,M,000.0,N,000.0,K,A*0D
$GPGGA,182443.007,2340.2965,S,04632.7428,W,1,04,9.4,664.7,M,-2.3,M,,0000*4D   ***
$GPGSA,A,3,03,19,32,06,,,,,,,,,10.8,9.4,5.3*0C

*** 182443.007  <   + 1 sec time


                                                   c++

 int GPSC = 1;
  const char GPVTG[] = "$GPVTG";
  const char GPGGA[] = "$GPGGA";
  const char GPGSA[] = "$GPGSA";
  const char GPRMC[] = "$GPRMC";
  const char GPGSV[] = "$GPGSV";





union G_GSA
 {
struct  {
            char GSA [7];
            char modo[2];        // A  Auto selection of 2D or 3D fix (M = manual)
            char modoDS[2];      // 3D fix - values include: 1 = no fix  2 = 2D fix  3 = 3D fix
            char satelites1[3];   // PRNs of satellites used for fix (space for 12)
            char satelites2[3];      
            char satelites3[3];          
            char satelites4[3];        
            char satelites5[3];      
            char satelites6[3];
            char satelites7[3];
            char satelites8[3];
            char satelites9[3];
            char satelites10[3];
            char satelites11[3];
            char satelites12[3];
            char PDOP[4] ;                 // PDOP (dilution of precision)
            char HDOP[4];                  // Horizontal dilution of precision (HDOP)
            char VDOP[4];                  // Vertical dilution of precision (VDOP)
            char O[5];                     // the checksum data, always begins with *
             };
             struct
             {
             char GPS_GPGSAN[];
             };
};
union G_GSA GPS_GSA;

  void CARGA_GPGSA (void)
{

   GPS_GSA.GSA[0]  = 'A';

}
union G_VTG
{
struct  {
            char VTG [7];
            char True_track[6];        //  True track made good (degrees)
            char True_T[2];            //
            char Magnetic_track[6];    //  Magnetic track made good
            char Magnetic_M[2];        //
            char Ground_speed_k[6];    //   Ground speed, knots  
            char Ground_k[2];          //
            char Ground_speed_K[6];    //  Ground speed, Kilometers per hour
            char Ground_K[2];          //
            char checksum[3];          //  checksum
             };
       struct
             {
             char GPS_GPVTGN[];
             };
};
union G_VTG GPS_VTG;

union G_RMC
{
struct  {
            char RMC [7];
            char UTC[11];               //  Fix taken at 12:35:19 UTC
            char Status[2];               //   Status A=active or V=Void.
            char Latitude[10];          //   Latitude 48 deg 07.038'
            char N_S[2];                 //   N / S
            char Longitude[12];        //  Longitude 11 deg 31.000' E - W
            char W_E[2];                //  W / E
            char Speed_k [6];          //  Speed over the ground in knots
            char Track_angle[6];      //  Track angle in degrees True
            char DATE [7];              // 280611  Date - 26rd of 06  2011
            char Magnetic_V[6];       // Magnetic Variation
            char Magnetic_W[2];      //  "W" si hay datos
            char Magnetic_N[2];        /*  N novalid data ,
                                                               A modo outonomo ,
                                                              D diferencial ,
                                                              E estimado deat zone ,
                                                              M entrada manual
                                                              S modo simulado */
            char checksum[5];          //  checksum   7E
             };
                    struct
             {
             char GPS_GPRMCN[];
             };
};
union G_RMC GPS_RMC;

//$GPGGA,182442.007,2340.2965,S,04632.7427,W,1,04,9.4,664.4,M,-2.3,M,,0000*40
union  G_GGA
{
struct  {
            char GGA [7];              //
            char UTC [11];              //  Fix taken at 12:35:19 UTC
            char Latitude[10];          //  Latitude 48 deg 07.038' N
            char N_S[2];                 //  Number of satellites in view 0 ~ 12
            char Longitude[11];       // Longitude 11 deg 31.000' E
            char E_W [2];               // elevacion del satelite en grados de 00 ~ 90
            char Azimut[2];             /* Fix quality: 0 = invalid
                                                 1 = GPS fix (SPS)
                                                 2 = DGPS fix
                                                 3 = PPS fix
                         4 = Real Time Kinematic
                           5 = Float RTK
                                                6 = estimated (dead reckoning) (2.3 feature)
                          7 = Manual input mode
                        8 = Simulation mode */

            char SNR[3];                   // Number of satellites being tracked
            char orizontal_dil[4];        //  Horizontal dilution of position
            char Altitude[6];              //  Altitude, Meters, above mean sea level
            char Meters_a[2];           //  Meters,
            char ellipsoid[5];             //   Height of geoid (mean sea level) above WGS84
            char Meters_e[2];           //
            char DGPS_up[3];         //  time in seconds since last DGPS update
            char DGPS_ID[5];         //  DGPS station ID number
            char checksum[3];          //  checksum   *7E
           };
        struct
             {
             char GPS_GGGAN[];
             };
};
union G_GGA GPS_GGA;



                                                     EXTRACTO

 /* buffer1  =  UART BUFFER
     BUFFER1_COUNTER =  array index  */




                        if(strstr(buffer1[BUFFER1_COUNTER],GPVTG))        
                                 {
                                   char *o = buffer1[BUFFER1_COUNTER];
                                   char *d = GPS_VTG.VTG;
                                   do{
                                      if((*o) == ',')
                                      {
                                      (*++o);
                                      (*d) = 0x00;
                                      (*++d);
                                      }
                                      (*d) = (*o);
                                      (*++d);                              
                                     }while(*++o);
                                   
                                 }