QGeoPositionInfo¶
The
QGeoPositionInfo
class contains information gathered on a global position, direction and velocity at a particular point in time. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
attribute
(attribute)def
coordinate
()def
hasAttribute
(attribute)def
isValid
()def
removeAttribute
(attribute)def
setAttribute
(attribute, value)def
setCoordinate
(coordinate)def
setTimestamp
(timestamp)def
timestamp
()
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
- class PySide2.QtPositioning.QGeoPositionInfo¶
PySide2.QtPositioning.QGeoPositionInfo(coordinate, updateTime)
PySide2.QtPositioning.QGeoPositionInfo(other)
- param updateTime:
- param coordinate:
- param other:
Creates an invalid
QGeoPositionInfo
object.See also
Creates a
QGeoPositionInfo
for the givencoordinate
andtimestamp
.
- PySide2.QtPositioning.QGeoPositionInfo.Attribute¶
Defines the attributes for positional information.
Constant
Description
QGeoPositionInfo.Direction
The bearing measured in degrees clockwise from true north to the direction of travel.
QGeoPositionInfo.GroundSpeed
The ground speed, in meters/sec.
QGeoPositionInfo.VerticalSpeed
The vertical speed, in meters/sec.
QGeoPositionInfo.MagneticVariation
The 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.HorizontalAccuracy
The accuracy of the provided latitude-longitude value, in meters.
QGeoPositionInfo.VerticalAccuracy
The accuracy of the provided altitude value, in meters.
- PySide2.QtPositioning.QGeoPositionInfo.attribute(attribute)¶
- Parameters:
attribute – Attribute
- Return type:
float
Returns the value of the specified
attribute
as a qreal value.Returns NaN if the value has not been set.
The function
hasAttribute()
should be used to determine whether or not a value has been set for an attribute.See also
- PySide2.QtPositioning.QGeoPositionInfo.coordinate()¶
- Return type:
Returns the coordinate for this position.
Returns an invalid coordinate if no coordinate has been set.
See also
- PySide2.QtPositioning.QGeoPositionInfo.hasAttribute(attribute)¶
- Parameters:
attribute – Attribute
- Return type:
bool
Returns true if the specified
attribute
is present for thisQGeoPositionInfo
object.
- PySide2.QtPositioning.QGeoPositionInfo.isValid()¶
- Return type:
bool
Returns true if the
timestamp()
andcoordinate()
values are both valid.See also
isValid()
isValid()
- PySide2.QtPositioning.QGeoPositionInfo.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns true if any of this object’s values are not the same as those of
other
.
- PySide2.QtPositioning.QGeoPositionInfo.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns true if all of this object’s values are the same as those of
other
.
- PySide2.QtPositioning.QGeoPositionInfo.removeAttribute(attribute)¶
- Parameters:
attribute – Attribute
Removes the specified
attribute
and its value.
- PySide2.QtPositioning.QGeoPositionInfo.setAttribute(attribute, value)¶
- Parameters:
attribute – Attribute
value – float
Sets the value for
attribute
tovalue
.See also
- PySide2.QtPositioning.QGeoPositionInfo.setCoordinate(coordinate)¶
- Parameters:
coordinate –
PySide2.QtPositioning.QGeoCoordinate
Sets the coordinate for this position to
coordinate
.See also
- PySide2.QtPositioning.QGeoPositionInfo.setTimestamp(timestamp)¶
- Parameters:
timestamp –
PySide2.QtCore.QDateTime
Sets the date and time at which this position was reported to
timestamp
.The
timestamp
must be in UTC time.See also
- PySide2.QtPositioning.QGeoPositionInfo.timestamp()¶
- Return type:
Returns the date and time at which this position was reported, in UTC time.
Returns an invalid
QDateTime
if no date/time value has been set.See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.