Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QWhereaboutsUpdate Class Reference
[QtLocationModule]

The QWhereaboutsUpdate class contains the global position and other related information received at a particular point in time. More...

    #include <QWhereaboutsUpdate>

Public Types

Public Functions

Static Public Members


Detailed Description

The QWhereaboutsUpdate class contains the global position and other related information received at a particular point in time.

A QWhereaboutsUpdate object has, at a minimum, a coordinate value and a timestamp. It may also have course and speed measurements and estimates of the accuracy of the provided data.

Use dataValidityFlags() to determine whether values have been set for a particular data type.

See also QWhereabouts and QWhereaboutsCoordinate.


Member Type Documentation

enum QWhereaboutsUpdate::DataType
flags QWhereaboutsUpdate::DataTypes

Defines the types of data that may be included in an update.

ConstantValueDescription
QWhereaboutsUpdate::GroundSpeed0x2The speed over ground.
QWhereaboutsUpdate::VerticalSpeed0x4The vertical speed.
QWhereaboutsUpdate::Course0x8The course/track made good (i.e. bearing to true north).
QWhereaboutsUpdate::HorizontalAccuracy0x10The horizontal accuracy.
QWhereaboutsUpdate::VerticalAccuracy0x20The vertical accuracy
QWhereaboutsUpdate::GroundSpeedAccuracy0x40Accuracy of the speed over ground value.
QWhereaboutsUpdate::VerticalSpeedAccuracy0x80Accuracy over the vertical speed value.
QWhereaboutsUpdate::CourseAccuracy0x100Accuracy of the course/track made good value.
QWhereaboutsUpdate::UpdateTimeAccuracy0x200Accuracy of the update time value.

The DataTypes type is a typedef for QFlags<DataType>. It stores an OR combination of DataType values.

See also dataValidityFlags().

enum QWhereaboutsUpdate::PositionFixStatus

Defines the available position fix statuses for a position update. A global position cannot be accurately determined until a position fix is acquired.

ConstantValueDescription
QWhereaboutsUpdate::FixStatusUnknown0The position fix status cannot be determined from the position update.
QWhereaboutsUpdate::FixNotAcquired1No position fix has been acquired at the time of the update.
QWhereaboutsUpdate::FixAcquired2A position fix has been acquired at the time of the update.


Member Function Documentation

QWhereaboutsUpdate::QWhereaboutsUpdate ()

Constructs a null update.

QWhereaboutsUpdate::QWhereaboutsUpdate ( const QWhereaboutsCoordinate & coordinate, const QDateTime & dateTime )

Constructs an update with the given coordinate and dateTime.

QWhereaboutsUpdate::QWhereaboutsUpdate ( const QWhereaboutsUpdate & other )

Constructs an update from the contents of other.

QWhereaboutsUpdate::~QWhereaboutsUpdate ()

Destroys an update.

void QWhereaboutsUpdate::clear ()

Clears all attribute values for this update.

QWhereaboutsCoordinate QWhereaboutsUpdate::coordinate () const

Returns the coordinate for this update.

See also setCoordinate().

qreal QWhereaboutsUpdate::course () const

Returns the course (i.e. bearing to true north, in degrees).

Use dataValidityFlags() to check whether this value has been set.

See also setCourse().

qreal QWhereaboutsUpdate::courseAccuracy () const

Returns the estimated accuracy of the course() value (in degrees).

Use dataValidityFlags() to check whether this value has been set.

See also setCourseAccuracy().

DataTypes QWhereaboutsUpdate::dataValidityFlags () const

Returns a set of flags that indicate whether data has been set for a particular update attribute.

QWhereaboutsUpdate QWhereaboutsUpdate::fromNmea ( const QByteArray & nmea, PositionFixStatus * fixStatus = 0 )   [static]

Returns the parsed form of the NMEA data in nmea and sets fixStatus according to the parsed data. Returns a null update if nmea could not be parsed, or if it has an invalid checksum.

This function is able to parse GGA, GLL, RMC, VTG and ZDA sentences.

Some points to note:

qreal QWhereaboutsUpdate::groundSpeed () const

Returns the speed over ground, in meters/sec.

Use dataValidityFlags() to check whether this value has been set.

See also setGroundSpeed().

qreal QWhereaboutsUpdate::groundSpeedAccuracy () const

Returns the estimated accuracy of the groundSpeed() value (in meters/sec).

Use dataValidityFlags() to check whether this value has been set.

See also setGroundSpeedAccuracy().

qreal QWhereaboutsUpdate::horizontalAccuracy () const

Returns the estimated horizontal accuracy (in meters).

Use dataValidityFlags() to check whether this value has been set.

See also setHorizontalAccuracy().

bool QWhereaboutsUpdate::isNull () const

Returns true if no attributes are set for this update.

void QWhereaboutsUpdate::setCoordinate ( const QWhereaboutsCoordinate & coordinate )

Sets the coordinate for this update to coordinate.

See also coordinate().

void QWhereaboutsUpdate::setCourse ( qreal course )

Sets the course (i.e. bearing to true north, in degrees) to course.

See also course().

void QWhereaboutsUpdate::setCourseAccuracy ( qreal accuracy )

Sets the estimated accuracy of the course() value (in degrees) to accuracy.

See also courseAccuracy().

void QWhereaboutsUpdate::setGroundSpeed ( qreal speed )

Sets the speed over ground (in meters/sec) to speed.

See also groundSpeed().

void QWhereaboutsUpdate::setGroundSpeedAccuracy ( qreal accuracy )

Sets the estimated accuracy of the groundSpeed() value (in meters/sec) to accuracy.

See also groundSpeedAccuracy().

void QWhereaboutsUpdate::setHorizontalAccuracy ( qreal accuracy )

Sets the estimated horizontal accuracy (in meters) to accuracy.

See also horizontalAccuracy().

void QWhereaboutsUpdate::setUpdateDate ( const QDate & date )

Sets the date on which this update was received to date.

See also updateDate().

void QWhereaboutsUpdate::setUpdateDateTime ( const QDateTime & dateTime ) const

Sets the date and time at which this update was received to dateTime.

See also updateDateTime() and updateDate().

void QWhereaboutsUpdate::setUpdateTime ( const QTime & time )

Sets the time at which this update was received to time, which should be in UTC time.

See also updateTime().

void QWhereaboutsUpdate::setUpdateTimeAccuracy ( qreal accuracy )

Sets the estimated accuracy of the updateTime() value (in seconds) to accuracy.

See also updateTimeAccuracy().

void QWhereaboutsUpdate::setVerticalAccuracy ( qreal accuracy )

Sets the estimated vertical accuracy (in meters) to accuracy.

See also verticalAccuracy().

void QWhereaboutsUpdate::setVerticalSpeed ( qreal speed )

Sets the vertical speed (in meters/sec) to speed.

See also verticalSpeed().

void QWhereaboutsUpdate::setVerticalSpeedAccuracy ( qreal accuracy )

Sets the estimated accuracy of the verticalSpeed() value (in meters/sec) to accuracy.

See also verticalSpeedAccuracy().

QDate QWhereaboutsUpdate::updateDate () const

Returns the date on which this update was received.

See also setUpdateDate().

QDateTime QWhereaboutsUpdate::updateDateTime () const

Returns the date and time at which this update was received.

Returns an invalid value if the updateDate() or updateTime() is not valid.

See also setUpdateDateTime() and setUpdateDate().

QTime QWhereaboutsUpdate::updateTime () const

Returns the time at which this update was received.

See also setUpdateTime().

qreal QWhereaboutsUpdate::updateTimeAccuracy () const

Returns the estimated accuracy of the updateTime() value (in seconds).

Use dataValidityFlags() to check whether this value has been set.

See also setUpdateTimeAccuracy().

qreal QWhereaboutsUpdate::verticalAccuracy () const

Returns the estimated vertical accuracy (in meters).

Use dataValidityFlags() to check whether this value has been set.

See also setVerticalAccuracy().

qreal QWhereaboutsUpdate::verticalSpeed () const

Returns the vertical speed, in meters/sec.

Use dataValidityFlags() to check whether this value has been set.

See also setVerticalSpeed().

qreal QWhereaboutsUpdate::verticalSpeedAccuracy () const

Returns the estimated accuracy of the verticalSpeed() value (in meters/sec).

Use dataValidityFlags() to check whether this value has been set.

See also setVerticalSpeedAccuracy().

QWhereaboutsUpdate & QWhereaboutsUpdate::operator= ( const QWhereaboutsUpdate & other )

Assigns other to this update and returns a reference to this update.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3