Understanding the location fix

When the positionUpdated() signal is emitted, location fix information is returned to your app, including a global position, direction, and velocity at a particular point in time.

Each location fix is represented by an instance of the QGeoPositionInfo class. The QGeoPositionInfo class contains a QGeoCoordinate that includes the latitude, longitude, and altitude of the location fix.

The QGeoPositionInfo class also contains an QGeoPositionInfo::attribute enumeration that contains the speed, direction, and accuracy of the location fix.

This image shows location information from the Location diagnostics sample app.

The following information can be extracted from the QGeoPositionInfo:

The geographical position of the device on the surface of the Earth. This information is provided as latitude, longitude, and optionally, altitude.

The heading or bearing to true north from the direction of travel, in degrees.

The speed of a device that's moving horizontally, in meters per second.

The speed of a device that's moving vertically, in meters per second.

The angle between the horizontal component of the magnetic field and true north, in degrees. If this value is positive, the device is pointed clockwise away from true north. If this value is negative, the device is pointing counter-clockwise away from true north.

The accuracy of the provided latitude and longitude values, in meters.

Tthe accuracy of the provided altitude value, in meters.

The time that the location fix was found, in Coordinated Universal Time (UTC) format.

Not all pieces of information are always available. Depending on the provider, you might not get the ground speed or other properties.

The attributes of the QGeoPositionInfo class will satisfy most application needs. You can also retrieve additional properties, including the exact method that was used to find the location fix. This is useful if you specified the default positioning method that uses all positioning methods to get a location in your app and you need to know which method was actually used. Other properties that you can retrieve are:

method

The exact method that was used to compute the location fix.

hdop

The horizontal dilution of precision (for computing the horizontal accuracy).

vdop

The vertical dilution of precision.

pdop

The positional (3-D) dilution of precision.

ttff

The time taken to find the first fix. The first fix always takes the longest when using GPS.

gpsWeek

GPS week.

gpsToW

GPS time of week.

For more information about parsing the QGeoPositionInfo, see the LocationDiagnostics sample app on the Sample apps page.

Last modified: 2013-03-21