Changeset 6786 in ntrip for trunk/BNC/src/bncutils.cpp


Ignore:
Timestamp:
Apr 20, 2015, 4:09:51 PM (9 years ago)
Author:
stuerze
Message:

consider GPGGA and GNGGA in manual nmea mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncutils.cpp

    r6537 r6786  
    146146QByteArray ggaString(const QByteArray& latitude,
    147147                     const QByteArray& longitude,
    148                      const QByteArray& height) {
     148                     const QByteArray& height,
     149                     const QString& ggaType) {
    149150
    150151  double lat = strtod(latitude,NULL);
    151152  double lon = strtod(longitude,NULL);
    152153  double hei = strtod(height,NULL);
     154  QString sentences = "GPGGA,";
     155  if (ggaType.contains("GNGGA")) {
     156    sentences = "GNGGA,";
     157  }
    153158
    154159  const char* flagN="N";
     
    169174  ss=(double)ttime.second()+0.001*ttime.msec();
    170175  QString gga;
    171   gga += "GPGGA,";
     176  gga += sentences;
    172177  gga += QString("%1%2%3,").arg((int)hh, 2, 10, QLatin1Char('0')).arg((int)mm, 2, 10, QLatin1Char('0')).arg((int)ss, 2, 10, QLatin1Char('0'));
    173178  gga += QString("%1%2,").arg((int)lat_deg,2, 10, QLatin1Char('0')).arg(lat_min, 7, 'f', 4, QLatin1Char('0'));
Note: See TracChangeset for help on using the changeset viewer.