cswingle

Bluetooth GPS PositionSource

Discussion created by cswingle on Feb 14, 2019
Latest reply on Feb 14, 2019 by cswingle

I'm trying to get GPS position information on a Windows 10 laptop using a Bluetooth GPS. I'm using the following QML:

MapView {
    id: mapView
    anchors.fill: parent
    // set focus to enable keyboard navigation
    focus: true

    Map {
        BasemapTopographic {}
    }

    locationDisplay {
        positionSource: PositionSource {
            id: positionSource
            name: "SerialPortNmea"
            preferredPositioningMethods: PositionSource.SatellitePositioningMethods

            updateInterval: 1000  // 1 second
            active: true

            onPositionChanged: {
                var coord = positionSource.position.coordinate;
                console.log("Coordinate:", coord.longitude, coord.latitude);
            }
        }
        // compass: Compass {
        //     id: compass
        // }
    }
}

 

After pairing the GPS with the laptop, when I run the program in Qt Creator I see the following Application Output:

 

class QGeoPositionInfoSource *__cdecl PositionInfoSourceFactory::positionInfoSource(class QObject *) QDeclarativePositionSource(0x17768f05b20)
portName "COM4"
description "Standard Serial over Bluetooth link"
manufacturer "Microsoft"
systemLocation "\\\\.\\COM4"
portName "COM5"
description "Standard Serial over Bluetooth link"
manufacturer "Microsoft"
systemLocation "\\\\.\\COM5"
QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once QUrl("https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=json")
void __cdecl SerialPortNmeaPositionInfoSource::startUpdates(void) false "" "The system cannot find the path specified."
int __cdecl main(int,char *[]) QQuickApplicationWindow_QML_99(0x177687fcfc0)
void __cdecl SerialPortNmeaPositionInfoSource::startUpdates(void) false "" "The system cannot find the path specified."

 

It seems as though the COM ports are showing up (when the GPS wasn't paired those messages weren't appearing in the log), but I'm not sure what path it cannot find, nor how to give it a path so it can use the NMEA stream from the GPS.

 

Can someone help me set up my app to get locations from this device?

 

I'm using Qt 5.12.1, Visual Studio 2017, ArcGIS Runtime for Windows (x86_64) Version 100.4

Outcomes