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

No parsed QGeoPositionInfo from NmeaData due to wrong checksum

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: Location
    • Labels:
    • Environment:
      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes