// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
\page location-positioning-qml.html

\title Positioning (QML)

\brief The Location Positioning API enables location positioning by means of
GPS or an NMEA data source.

\section1 Location Positioning

Location data involves a precisely specified position on the Earth's
surface \unicode {0x2014} as provided by a latitude-longitude coordinate
\unicode {0x2014} along with associated data, such as:

    \list
    \li The date and time at which the position was reported
    \li The velocity of the device that reported the position
    \li The altitude of the reported position (height above sea level)
    \li The bearing of the device in degrees, relative to true north
    \endlist

For more information see
\l {http://en.wikipedia.org/wiki/Geographic_coordinate}{Geographic Coordinate}.

This data can be extracted through a variety of methods. One of the most
well known methods of positioning is GPS (Global Positioning System), a
publicly available system that uses radiowave signals received from
Earth-orbiting satellites to calculate the precise position and time of
the receiver. Another popular method is 'Cell Identifier Positioning', which uses
the cell identifier of the cell site that is currently serving the receiving
device to calculate its approximate location. These and other positioning
methods can all be used with the Location API; the only requirement for a
location data source within the API is that it provides a
latitude-longitude coordinate with a date/time value, with the option of
providing the other attributes listed above.

\section2 Coordinates

The \l {coordinate} is a basic unit of geographical information. The
\l {coordinate} type has attributes to hold the \c {latitude},
\c longitude and \c altitude.

\section2 Positions

The three dimensional position of an object such as a mobile device can be specified by giving
the latitude, longitude and altitude.  That is the values held in the
\l {coordinate} type.  Additionally for computation of future
positions we would like to know if the object is moving, what \l [QML] {Position::}{speed} it is
doing and what is the \l {Position::timestamp}{timestamp} of the last position data.  Position
therefore includes values for the \l {Position::coordinate}{coordinate},
\l {Position::speed}{speed} and a \l {Position::timestamp}{timestamp}.  \l Position also takes
responsibility for validation of sensible values for these properties.  These are exposed as
the \l {Position::latitudeValid}{latitudeValid}, \l {Position::longitudeValid}{longitudeValid},
\l {Position::altitudeValid}{altitudeValid}, \l {Position::speedValid}{speedValid},
\l {Position::horizontalAccuracyValid}{horizontalAccuracyValid}, and
\l {Position::verticalAccuracyValid}{verticalAccuracyValid} properties.


\section2 PositionSource Type

We have a \l Position type, a \l {coordinate} type but where does the data come
from? Also it is a good idea to be able to indicate alternative sources.
Perhaps instead of directly picking up GPS satellites it might be desirable to
do some testing using a datafile.

The \l PositionSource type provides the developer with control, within the
limits allowed by the platform, of the source of the geographical data.
\l PositionSource supports multiple plugins, including an
\l {Qt Positioning NMEA plugin}{NMEA} plugin.

\l {http://en.wikipedia.org/wiki/NMEA}{NMEA} is a common text-based
protocol for specifying navigational data. The \l PositionSource
\l {Qt Positioning NMEA plugin}{NMEA} plugin supports multiple data sources,
including raw file or TCP socket. The source will emit updates according to the
time stamp of each NMEA sentence to produce a "replay" of the recorded data.

See the \l {Qt Positioning NMEA plugin}{plugin description} for usage examples.

\section2 SatelliteInfo Example

The \l {satelliteinfo}{SatelliteInfo Example} uses the \l PositionSource
and \l SatelliteSource QML types to get the satellite information relevant to
the current location.

*/
