Enroute Flight Navigation
A navigation app for VFR pilots
|
Central Position Provider. More...
#include <PositionProvider.h>
Public Member Functions | |
PositionProvider (QObject *parent=nullptr) | |
Standard constructor. | |
~PositionProvider () override=default | |
Standard destructor. | |
QGeoCoordinate | approximateLastValidCoordinate () const |
Getter function for the property with the same name. | |
QBindable< QGeoCoordinate > | bindableApproximateLastValidCoordinate () const |
Getter function for the property with the same name. | |
QBindable< QGeoCoordinate > | bindableLastValidCoordinate () |
Getter function for the property with the same name. | |
QBindable< Units::Angle > | bindableLastValidTT () |
Getter function for the property with the same name. | |
Positioning::PositionInfo | positionInfo () const |
Getter method for property with the same name. | |
QBindable< Positioning::PositionInfo > | bindablePositionInfo () const |
Getter method for property with the same name. | |
Units::Distance | pressureAltitude () const |
Getter method for property with the same name. | |
QBindable< Units::Distance > | bindablePressureAltitude () const |
Getter method for property with the same name. | |
bool | receivingPositionInfo () const |
Getter method for property with the same name. | |
QBindable< bool > | bindableReceivingPositionInfo () |
Getter method for property with the same name. | |
QString | statusString () const |
Getter method for property with the same name. | |
QBindable< QString > | bindableStatusString () const |
Getter method for property with the same name. | |
Q_INVOKABLE void | startUpdates () |
startUpdates |
Static Public Member Functions | |
static QGeoCoordinate | lastValidCoordinate () |
Getter function for the property with the same name. | |
static Units::Angle | lastValidTT () |
Getter function for the property with the same name. |
Properties | |
QGeoCoordinate | approximateLastValidCoordinate |
Approximate last valid coordinate. | |
QGeoCoordinate | lastValidCoordinate |
Last valid coordinate reading. | |
Units::Angle | lastValidTT |
Last valid true track. | |
Positioning::PositionInfo | positionInfo |
Position information. | |
Units::Distance | pressureAltitude |
Pressure altitude. | |
bool | receivingPositionInfo |
Indicator that position information is being received. | |
QString | statusString |
Source status. |
Central Position Provider.
This class collects position data from the various sources (satellite, network, traffic receiver, …) chooses the best available source and exposes the data to QML and other parts of the program.
There exists one static instance of this class, which can be accessed via the method globalInstance(). No other instance of this class should be used.
Data from the standard operating system data source (typically: satnav or wifi) is only provided after startUpdates() has been called.
The methods in this class are reentrant, but not thread safe.
Definition at line 48 of file PositionProvider.h.
|
explicit |
Standard constructor.
parent | The standard QObject parent pointer |
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 148 of file PositionProvider.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 154 of file PositionProvider.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 166 of file PositionProvider.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 178 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 190 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 202 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 214 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 229 of file PositionProvider.h.
|
staticnodiscard |
Getter function for the property with the same name.
|
staticnodiscard |
Getter function for the property with the same name.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 184 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 196 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 208 of file PositionProvider.h.
|
inline |
startUpdates
Requests permissions if necessary and starts to provide data from the standard operating system data source (typically SatNav or WiFi) if permissions were granted.
Definition at line 246 of file PositionProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 220 of file PositionProvider.h.
|
read |
Approximate last valid coordinate.
This property equals lastValidCoordinate, except that it is updated only every ten kilometers.
Definition at line 85 of file PositionProvider.h.
|
read |
Last valid coordinate reading.
This property holds the last valid coordinate known. At the first start, this property is set to the location Freiburg Airport, EDTF. The value is stored in a QSetting at destruction, and restored in the construction.
Definition at line 94 of file PositionProvider.h.
|
read |
Last valid true track.
This property holds the last valid true track known. At the first start, this property is set to 0°. The value is stored in a QSetting at destruction, and restored in the construction.
Definition at line 102 of file PositionProvider.h.
|
read |
Position information.
This property holds information about the device position. To ensure that the data is up-to-date, the position information will be set to an invalid positionInfo when no data has arrived for more than the time specified in PositionInfo::lifetime.
Definition at line 111 of file PositionProvider.h.
|
read |
Pressure altitude.
This property holds information about the pressure altitude. If the traffic data provider provides pressure altitude, then this is reported here. If the traffic data provider does not report pressure altitude AND the current aircraft is configured to use cabin pressure for pressure altitude, then cabin pressure is reported here.
Definition at line 121 of file PositionProvider.h.
|
read |
Indicator that position information is being received.
This is a shortcut for positionInfo().isValid. This property exists because it does not change so often, and can thus be more efficient to use.
Definition at line 129 of file PositionProvider.h.
|
read |
Source status.
This property holds a translated, human-readable string that describes the status of the positionInfo source. This could typically be a string of the form "OK" or "Insufficient permission to access position info"
Definition at line 137 of file PositionProvider.h.