Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-2076

No parsed QGeoPositionInfo from NmeaData due to wrong checksum

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 1.2.0
    • Location
    • Windows, QtCreator, Qt Mobility for Desktop, HTC Wildfire S with SchareGPS

    Description

      Captured NmeaData is analysed and checked for its checksum in "qlocationutils.cpp" QLocationUtils::hasValidNmeaChecksum.

      The checksum is represented by 2 Hexcharacters at the end of each datasentence.
      My GPS-device sends data like:

      $GPVTG,,T,,M,,N,,K,N*2C
      $GPRMC,,V,,,,,,,,,,N*53
      $GPGSA,A,1,,,,,,,,,,,,,,,*1E

      The problem is that on line 298 the computed checksum is represented in a string with

      s.sprintf("%02x", result);

      .
      That string is compared to the captured data, so its often something like "2c" == "2C" and the data is considered invalid.

      To support both ways (sending upper and lower), a change to following helps:

      if(islower(data[asteriskIndex+1]) || islower(data[asteriskIndex+2]))
              s.sprintf("%02x", result);
          else
              s.sprintf("%02X", result);
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            merlux Sebastian Krell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: