Select to view content in your preferred language

QML - Getting GPS data from COM port?

5791
4
Jump to solution
03-16-2016 12:21 PM
AmyWright_Webber
Regular Contributor

Hello,

I am working on a QML application that utilizes QtPositioning 5.3 to grab the location of the device to display and orient the map etc.  This is working great on the iPhone and iPad.  However, for the Windows all in one tablet (Motion) the GPS is set on a COM port.  As a result, I can't see any GPS info in my QML app when I build for the Windows device.   Now - I can see all the data I want using the Serial Port GPS C++ sample from the QTSample Application but am not doing well getting access to that same feed from within my QML application.

Has anyone successfully utilized the C++ serial Port GPS sample from within a QML application?  Suggestions for alternatives on how to listen to the COM port from QML are also welcome.   If I can grab the NMEA string then I can handle it from there.

Thanks!

Amy

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

It would be great if Amy Wright Webber‌ could chime in with her solution, but I think she tried the following code and it worked for her:

PositionSource {
    id: serialPortGPS
    name:"SerialPortNmea"
    preferredPositioningMethods: PositionSource.SatellitePositioningMethods
}

View solution in original post

4 Replies
LeeSorrell1
Emerging Contributor

Did you ever figure out a solution to this? I am struggling with the exact same problem currently.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

It would be great if Amy Wright Webber‌ could chime in with her solution, but I think she tried the following code and it worked for her:

PositionSource {
    id: serialPortGPS
    name:"SerialPortNmea"
    preferredPositioningMethods: PositionSource.SatellitePositioningMethods
}
LeeSorrell1
Emerging Contributor

This solution worked. I did not have

name:"SerialPortNmea"

 and this was causing it to not recognize the internal GPS as a supported method. 

0 Kudos
ZlatoslavMarchev2
Deactivated User

Hello,
I have a problem that is kind of similar to this one. I am developing a QML application which is using as a position source a GNSS antenna outside of the mobile device and I cannot use the nmea string that comes from the antenna on a COM port. The connection between my portable computer and the antenna is via cable. According to me, the problem is that I have GPS data on two COM ports - one from my computer`s GPS and one from the outside antenna. The application sees only the data from my computer`s GPS. Can you, please, tell me how to get the data that comes on the COM port which is connected to the cable?

Thanks,
Zlatoslav

0 Kudos