Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QPositioning horizontal accuracy missing



  • I use the QPositioning library to parse the incoming NMEA sentences from our serial GPS receiver. The coordinates are returned correctly but the horizontal accuracy is not returned. The horizontal accuracy attribute should be present int the QGeoPositionInfo object according to the function:

    info.hasAttribute(QGeoPositionInfo::Attribute::HorizontalAccuracy)
    

    But reading the attribute returns a nan.

    The serial port is read using the serialnmea plugin connected to a handling funtion using:

    m_pPositionSource = QGeoPositionInfoSource::createSource("serialnmea", params, this);
    connect(m_pPositionSource, &QGeoPositionInfoSource::positionUpdated, this, &CGPS::HandleGPSRead);
    m_pPositionSource->startUpdates();
    

    The inputted nmea data is as follows:

    $GPRMC,135910.00,A,<lat>,N,<long>,E,0.062,,161220,,,A*76
    $GPVTG,,T,,M,0.062,N,0.116,K,A*21
    $GPGGA,135910.00,<lat>,N,<long>,E,1,08,1.08,7.5,M,46.1,M,,*58
    $GPGSA,A,3,13,28,15,14,30,05,24,08,,,,,1.66,1.08,1.26*0E
    $GPGSV,4,1,13,05,21,194,40,08,06,018,31,10,00,336,,13,81,131,47*79
    $GPGSV,4,2,13,14,52,075,46,15,59,288,46,17,08,124,,18,06,284,*7F
    $GPGSV,4,3,13,20,22,313,,23,22,317,,24,25,259,26,28,57,088,42*7E
    $GPGSV,4,4,13,30,27,074,42*48
    $GPGLL,<lat>,N,<long>,E,135910.00,A,A*6D
    

    If both the GPGGA and GPGSA messages contain the Horizontal Dilution of Precision (HDOP) describing the accuracy of the GPS location. However as described above the QPositioning library doesn't output the horizontal accuracy.

    My questions are:

    • What NMEA messages are used in determining the horizontal accuracy?
    • How can I get the horizontal accuracy out of the library?

    I use QT 5.15.1 and running on Debian 10.3


Log in to reply