[Interest] [ Android ] Can Qt Positioning API access and output NEMA GPS Strings?
Reinhardt Behm
rbehm at hushmail.com
Tue Jul 28 17:05:40 CEST 2015
On Tuesday 28 July 2015 13:22:04 Edward Sutton wrote:
> Thank you Alex,
>
> On Jul 28, 2015, at 3:05 AM, Blasche Alexander
<alexander.blasche at theqtcompany.com<mailto:alexander.blasche at theqtcompany.com>>
wrote:
> >I want to output NMEA strings that look like this:
> >$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
> >Maybe QNmeaPositionInfoSource has some way to output the raw source strings
> >that it reads?
> Well, the class' purpose is to process an incoming NMEA string. If I just
> want to output the raw strings then we wouldn't have to wrap the QIODevice
> providing the NMEA strings. We would directly print the content from the
> QIODevice ....
>
> If you want to convert the output from a regular QGeoPositionInfoSource to
> NMEA then you would have to write the conversion code yourself. There is no
> support for it in Qt. It shouldn't be too difficult though as
> QNmeaPositionInfoSource provides a template for the reverse already.
>
> --
> Alex
>
>
> I need to create the NMEA string from the QGeoPositionInfoSource properties
> for 3 message types; GPGGA, GNGNS, and GLGNS.
>
>
> My concern is many NMEA fields are not exposed. For example for GPGGA
> number of satellites, HDOP, DGPS reference station, etc. I suppose I could
> fake missing field values and see how the device works. For example time,
> lat, lon, and fake the remainder to nominal fields.
>
> The alternative may be to make something similar to QtPositioning.java that
> uses
> GpsStatus.NmeaListener<http://developer.android.com/reference/android/locat
> ion/GpsStatus.NmeaListener.html> instead of GpsStatus.Listener. That
> appears to be much harder but would be a better solution in the long run.
>
> I think I will try faking missing fields first. For this application I am
> not sure if our device even cares which satellite system the data is coming
> from GPS or GLONASS. The Android device may be connected to one or the
> other but I could always fake the output as GPGGA.
>
> Thanks Alex,
>
> -Ed
> $GPGGA
>
> Global Positioning System Fix Data
>
> Name Example Data Description
> Sentence Identifier $GPGGA Global Positioning System Fix Data
> Time 170834 17:08:34 Z
> Latitude 4124.8963, N 41d 24.8963' N or 41d 24' 54" N
> Longitude 08151.6838, W 81d 51.6838' W or 81d 51' 41" W
> Fix Quality:
> - 0 = Invalid
> - 1 = GPS fix
> - 2 = DGPS fix 1 Data is from a GPS fix
> Number of Satellites 05 5 Satellites are in view
> Horizontal Dilution of Precision (HDOP) 1.5 Relative accuracy of
> horizontal position Altitude 280.2, M 280.2 meters above mean
> sea level
> Height of geoid above WGS84 ellipsoid -34.0, M -34.0 meters
> Time since last DGPS update blank No last update
> DGPS reference station id blank No station id
> Checksum *75 Used by program to check for transmission errors
>
The usual method is that these fields are empty (just ",,"). Even standard
GPS receivers send empty fields before they have a valid fix.
--
Best Regards
Reinhardt Behm
More information about the Interest
mailing list