Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60814

Error in reading NMEA time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.9.1
    • 5.8.0, 5.9.0 Beta 1, 5.9.0 Beta 2, 5.9.0 Beta 3
    • Positioning
    • None

      Function

      bool QLocationUtils::getNmeaTime(const QByteArray &bytes, QTime *time)
      

      from qlocationutils.cpp reads msecs in wrong way:

      bool hasMsecs = false;
      int midLen = qMin(3, bytes.size() - dotIndex - 1);
      int msecs = bytes.mid(dotIndex + 1, midLen).toUInt(&hasMsecs);
          if (hasMsecs)
              tempTime = tempTime.addMSecs(msecs);
      

      cause it can leads to wrong reading for number-strings with less than 3 digit for ms.
      For example, time 182549.20 or 182549.2 will have 20 msecs or 2 msec accordingly, not the 200msec as should!

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

            lukegluke Oleg
            lukegluke Oleg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes