Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
10GPS or an NMEA data source.
11
12\section1 Location Positioning
13
14Location data involves a precisely specified position on the Earth's
15surface \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
25For more information see
26\l {http://en.wikipedia.org/wiki/Geographic_coordinate}{Geographic Coordinate}.
27
28This data can be extracted through a variety of methods. One of the most
29well known methods of positioning is GPS (Global Positioning System), a
30publicly available system that uses radiowave signals received from
31Earth-orbiting satellites to calculate the precise position and time of
32the receiver. Another popular method is 'Cell Identifier Positioning', which uses
33the cell identifier of the cell site that is currently serving the receiving
34device to calculate its approximate location. These and other positioning
35methods can all be used with the Location API; the only requirement for a
36location data source within the API is that it provides a
37latitude-longitude coordinate with a date/time value, with the option of
38providing the other attributes listed above.
39
40\section2 Coordinates
41
42The \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
50In addition to the \l coordinate type, which holds the three-dimensional
51position 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
54exposed 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
66We have a \l Position type, a \l {coordinate} type but where does the data come
67from? Also it is a good idea to be able to indicate alternative sources.
68Perhaps instead of directly picking up GPS satellites it might be desirable to
69do some testing using a datafile.
70
71The \l PositionSource type provides the developer with control, within the
72limits 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
77protocol for specifying navigational data. The \l PositionSource
78\l {Qt Positioning NMEA plugin}{NMEA} plugin supports multiple data sources,
79including raw file or TCP socket. The source will emit updates according to the
80time stamp of each NMEA sentence to produce a "replay" of the recorded data.
81
82See the \l {Qt Positioning NMEA plugin}{plugin description} for usage examples.
83
84\section2 Satellite Info Example
85
86The \l {Satellite Info} example uses the \l PositionSource
87and \l SatelliteSource QML types to get the satellite information relevant to
88the current location.
89
90*/