Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qml-position.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page location-positioning-qml.html
6
7
\title Positioning (QML)
8
\ingroup explanations-positioning
9
\brief The Location Positioning API enables location positioning by means of
10
GPS or an NMEA data source.
11
12
\section1 Location Positioning
13
14
Location data involves a precisely specified position on the Earth's
15
surface \unicode {0x2014} as provided by a latitude-longitude coordinate
16
\unicode {0x2014} along with associated data, such as:
17
18
\list
19
\li The date and time at which the position was reported
20
\li The velocity of the device that reported the position
21
\li The altitude of the reported position (height above sea level)
22
\li The bearing of the device in degrees, relative to true north
23
\endlist
24
25
For more information see
26
\l {http://en.wikipedia.org/wiki/Geographic_coordinate}{Geographic Coordinate}.
27
28
This data can be extracted through a variety of methods. One of the most
29
well known methods of positioning is GPS (Global Positioning System), a
30
publicly available system that uses radiowave signals received from
31
Earth-orbiting satellites to calculate the precise position and time of
32
the receiver. Another popular method is 'Cell Identifier Positioning', which uses
33
the cell identifier of the cell site that is currently serving the receiving
34
device to calculate its approximate location. These and other positioning
35
methods can all be used with the Location API; the only requirement for a
36
location data source within the API is that it provides a
37
latitude-longitude coordinate with a date/time value, with the option of
38
providing the other attributes listed above.
39
40
\section2 Coordinates
41
42
The \l coordinate is a basic unit of geographical information. The
43
\l coordinate type has attributes to hold the \c latitude,
44
\c longitude and \c altitude. The \l {QtPositioning::}{Location} contains this
45
\l coordinate in addition to a physical address and a bounding box.
46
\b {See also}: \l {Place::location}{retrieving a location}
47
48
\section2 Positions
49
50
In addition to the \l coordinate type, which holds the three-dimensional
51
position of an object, \l Position provides \l {Position::speed}{speed} and a
52
\l {Position::timestamp}{timestamp} to compute future positions.
53
\l Position validates sensible values for these properties, which are
54
exposed as the following properties:
55
\list
56
\li \l {Position::latitudeValid}{latitudeValid}
57
\li \l {Position::longitudeValid}{longitudeValid}
58
\li \l {Position::altitudeValid}{altitudeValid}
59
\li \l {Position::speedValid}{speedValid}
60
\li \l {Position::horizontalAccuracyValid}{horizontalAccuracyValid}
61
\li \l {Position::verticalAccuracyValid}{verticalAccuracyValid}
62
\endlist
63
64
\section2 PositionSource Type
65
66
We have a \l Position type, a \l {coordinate} type but where does the data come
67
from? Also it is a good idea to be able to indicate alternative sources.
68
Perhaps instead of directly picking up GPS satellites it might be desirable to
69
do some testing using a datafile.
70
71
The \l PositionSource type provides the developer with control, within the
72
limits allowed by the platform, of the source of the geographical data.
73
\l PositionSource supports multiple plugins, including an
74
\l {Qt Positioning NMEA plugin}{NMEA} plugin.
75
76
\l {http://en.wikipedia.org/wiki/NMEA}{NMEA} is a common text-based
77
protocol for specifying navigational data. The \l PositionSource
78
\l {Qt Positioning NMEA plugin}{NMEA} plugin supports multiple data sources,
79
including raw file or TCP socket. The source will emit updates according to the
80
time stamp of each NMEA sentence to produce a "replay" of the recorded data.
81
82
See the \l {Qt Positioning NMEA plugin}{plugin description} for usage examples.
83
84
\section2 Satellite Info Example
85
86
The \l {Satellite Info} example uses the \l PositionSource
87
and \l SatelliteSource QML types to get the satellite information relevant to
88
the current location.
89
90
*/
qtpositioning
src
positioning
doc
src
qml-position.qdoc
Generated on Mon Mar 10 2025 01:10:56 for Qt by
1.13.2