QGeoPositionInfo Class

The QGeoPositionInfo class contains information gathered on a global position, direction and velocity at a particular point in time. More...

Header: #include <QGeoPositionInfo>
qmake: QT += positioning
Since: Qt 5.2

This class was introduced in Qt 5.2.

Public Types

enum Attribute { Direction, GroundSpeed, VerticalSpeed, MagneticVariation, HorizontalAccuracy, VerticalAccuracy }

Detailed Description

A QGeoPositionInfo contains, at a minimum, a geographical coordinate and a timestamp. It may also have heading and speed measurements as well as estimates of the accuracy of the provided data.

See also QGeoPositionInfoSource.

Member Type Documentation

enum QGeoPositionInfo::Attribute

Defines the attributes for positional information.

ConstantValueDescription
QGeoPositionInfo::Direction0The bearing measured in degrees clockwise from true north to the direction of travel.
QGeoPositionInfo::GroundSpeed1The ground speed, in meters/sec.
QGeoPositionInfo::VerticalSpeed2The vertical speed, in meters/sec.
QGeoPositionInfo::MagneticVariation3The angle between the horizontal component of the magnetic field and true north, in degrees. Also known as magnetic declination. A positive value indicates a clockwise direction from true north and a negative value indicates a counter-clockwise direction.
QGeoPositionInfo::HorizontalAccuracy4The accuracy of the provided latitude-longitude value, in meters.
QGeoPositionInfo::VerticalAccuracy5The accuracy of the provided altitude value, in meters.