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

NMEA - add support for satellite system distinguishing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.0 Beta4
    • 6.1
    • Positioning
    • None
    • 13
    • 58b7f95e9ca3ca84e004a26d77ecbe90ea874ea2 (qt/qtlocation/dev)
    • Qt6_Foundation_Sprint 28

    Description

      QNmeaSatelliteInfoSource parses NMEA data but does not distinguish between satellite systems. This results in incorrect reporting of satellites in view and satellites in use if the device supports multiple systems.

      The normal pattern for InView/InUse detection is the following:

      1. Parse InView - save to list.
      2. Parse InUse (gets only IDs) - use the IDs to extract full info from InView list.

      Now when we have multiple systems the following happens:

      1. Parse InView GPS - save to list.
      2. Prase InView GLONASS - save to list, overriding InView GPS.
      3. Parse InUse GPS -> the IDs can't be found.

      To fix this issue we do not need to override the list at step 2, but have separate lists for each satellite system. And join all the lists when notifying about data changes.

      The satellites can be distinguished by the first letters of the NMEA sentence:

      • $GP*** is used for GPS
      • $GL*** - for GLONASS
      • $GN*** - for a combination of multiple satellite systems

      List of talker ids: https://gpsd.gitlab.io/gpsd/NMEA.html#_talker_ids

      One problem here is that GSA messages (satellites in use) come as $GNGSA in this case. Each message holds IDs of one satellite system. So if we have GPS and GLONASS working, we will receive 2 consecutive messages.

      The trick is to distinguish, which one represents which system. Specially if some of them have no fix (the list of IDs is empty). The System ID field was added only in NMEA 4.11, which is not supported by many devices.

      One possible solution is to use the satellite id range to determine the satellite system: https://gpsd.gitlab.io/gpsd/NMEA.html#_satellite_ids

      The enum for satellite systems already exists. See QGeoSatelliteInfo::SatelliteSystem. We should probably consider extending it to contain more satellite systems (even untested ones).

      Now when we move the QNmeaSatelliteInfoSource into the library and implement virtual methods for nmea parsing, this fix needs to be done before feature freeze for Qt 6.2, as it's a potential BC breaking change (need to add more parameters to the parsing methods)

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-91074
          # Subject Branch Project Status CR V

          Activity

            People

              ivan.solovev Ivan Solovev
              ivan.solovev Ivan Solovev
              Maurice Kalinowski Maurice Kalinowski
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes