Class Positioning
#include <positioning.h>
Inherits the following classes: QObject
Public Properties
| Type | Name |
|---|---|
| property bool | active |
| property double | antennaHeight |
| property bool | averagedPosition |
| property int | averagedPositionCount |
| property bool | averagedPositionFilterAccuracy |
| property bool | backgroundMode |
| property double | badAccuracyThreshold |
| property QgsQuickCoordinateTransformer * | coordinateTransformer |
| property AbstractGnssReceiver::Capabilities | deviceCapabilities |
| property QString | deviceId |
| property QString | deviceLastError |
| property QAbstractSocket::SocketState | deviceSocketState |
| property QString | deviceSocketStateString |
| property PositioningSource::ElevationCorrectionMode | elevationCorrectionMode |
| property double | excellentAccuracyThreshold |
| property bool | logging |
| property QString | loggingPath |
| property double | orientation |
| property GnssPositionInformation | positionInformation |
| property double | projectedHorizontalAccuracy |
| property QgsPoint | projectedPosition |
| property bool | serviceMode |
| property QgsPoint | sourcePosition |
| property bool | valid |
Public Signals
| Type | Name |
|---|---|
| signal void | activeChanged |
| signal void | antennaHeightChanged |
| signal void | averagedPositionChanged |
| signal void | averagedPositionCountChanged |
| signal void | averagedPositionFilterAccuracyChanged |
| signal void | backgroundModeChanged |
| signal void | badAccuracyThresholdChanged |
| signal void | coordinateTransformerChanged |
| signal void | deviceIdChanged |
| signal void | deviceLastErrorChanged |
| signal void | deviceSocketStateChanged |
| signal void | deviceSocketStateStringChanged |
| signal void | elevationCorrectionModeChanged |
| signal void | excellentAccuracyThresholdChanged |
| signal void | loggingChanged |
| signal void | loggingPathChanged |
| signal void | orientationChanged |
| signal void | positionInformationChanged |
| signal void | projectedPositionChanged |
| signal void | serviceModeChanged |
| signal void | triggerConnectDevice |
| signal void | triggerDisconnectDevice |
| signal void | validChanged |
Public Functions
Detailed Description
This class manages the positioning source and offers positioning details.
Public Properties Documentation
property active [1/2]
bool Positioning::active;
property antennaHeight [1/2]
double Positioning::antennaHeight;
property averagedPosition [1/2]
bool Positioning::averagedPosition;
property averagedPositionCount [1/2]
int Positioning::averagedPositionCount;
property averagedPositionFilterAccuracy [1/2]
bool Positioning::averagedPositionFilterAccuracy;
property backgroundMode [1/2]
bool Positioning::backgroundMode;
property badAccuracyThreshold [1/2]
double Positioning::badAccuracyThreshold;
property coordinateTransformer [1/2]
QgsQuickCoordinateTransformer * Positioning::coordinateTransformer;
property deviceCapabilities [1/2]
AbstractGnssReceiver::Capabilities Positioning::deviceCapabilities;
property deviceId [1/2]
QString Positioning::deviceId;
property deviceLastError [1/2]
QString Positioning::deviceLastError;
property deviceSocketState [1/2]
QAbstractSocket::SocketState Positioning::deviceSocketState;
property deviceSocketStateString [1/2]
QString Positioning::deviceSocketStateString;
property elevationCorrectionMode [1/2]
PositioningSource::ElevationCorrectionMode Positioning::elevationCorrectionMode;
property excellentAccuracyThreshold [1/2]
double Positioning::excellentAccuracyThreshold;
property logging [1/2]
bool Positioning::logging;
property loggingPath [1/2]
QString Positioning::loggingPath;
property orientation [1/2]
double Positioning::orientation;
property positionInformation [1/2]
GnssPositionInformation Positioning::positionInformation;
property projectedHorizontalAccuracy [1/2]
double Positioning::projectedHorizontalAccuracy;
property projectedPosition [1/2]
QgsPoint Positioning::projectedPosition;
property serviceMode [1/2]
bool Positioning::serviceMode;
property sourcePosition [1/2]
QgsPoint Positioning::sourcePosition;
property valid [1/2]
bool Positioning::valid;
Public Signals Documentation
signal activeChanged
void Positioning::activeChanged;
signal antennaHeightChanged
void Positioning::antennaHeightChanged;
signal averagedPositionChanged
void Positioning::averagedPositionChanged;
signal averagedPositionCountChanged
void Positioning::averagedPositionCountChanged;
signal averagedPositionFilterAccuracyChanged
void Positioning::averagedPositionFilterAccuracyChanged;
signal backgroundModeChanged
void Positioning::backgroundModeChanged;
signal badAccuracyThresholdChanged
void Positioning::badAccuracyThresholdChanged;
signal coordinateTransformerChanged
void Positioning::coordinateTransformerChanged;
signal deviceIdChanged
void Positioning::deviceIdChanged;
signal deviceLastErrorChanged
void Positioning::deviceLastErrorChanged;
signal deviceSocketStateChanged
void Positioning::deviceSocketStateChanged;
signal deviceSocketStateStringChanged
void Positioning::deviceSocketStateStringChanged;
signal elevationCorrectionModeChanged
void Positioning::elevationCorrectionModeChanged;
signal excellentAccuracyThresholdChanged
void Positioning::excellentAccuracyThresholdChanged;
signal loggingChanged
void Positioning::loggingChanged;
signal loggingPathChanged
void Positioning::loggingPathChanged;
signal orientationChanged
void Positioning::orientationChanged;
signal positionInformationChanged
void Positioning::positionInformationChanged;
signal projectedPositionChanged
void Positioning::projectedPositionChanged;
signal serviceModeChanged
void Positioning::serviceModeChanged;
signal triggerConnectDevice
void Positioning::triggerConnectDevice;
signal triggerDisconnectDevice
void Positioning::triggerDisconnectDevice;
signal validChanged
void Positioning::validChanged;
Public Functions Documentation
function Positioning
explicit Positioning::Positioning (
QObject * parent=nullptr
)
function active [2/2]
bool Positioning::active () const
Returns TRUE when positioning is active.
See also: setActive
function antennaHeight [2/2]
double Positioning::antennaHeight () const
Sets the GNSS device antenna height. This should be the pole height + sensore phase height.
Note:
When IMU is active this value is ignored as the device does the correction internally.
function averagedPosition [2/2]
bool Positioning::averagedPosition () const
Returns whether the position information is averaged from an ongoing stream of incoming positions from the device.
function averagedPositionCount [2/2]
int Positioning::averagedPositionCount () const
Returns the current number of collected position informations from which the averaged position is calculated.
Note:
When averaged position is off, the value is zero.
function averagedPositionFilterAccuracy [2/2]
bool Positioning::averagedPositionFilterAccuracy () const
Returns whether the average position filter accuracy is enabled.
function backgroundMode [2/2]
bool Positioning::backgroundMode () const
Returns TRUE if the background mode is active. When activated, position information details will not be signaled but instead saved to disk until deactivated.
See also: getBackgroundPositionInformation()
function badAccuracyThreshold [2/2]
inline double Positioning::badAccuracyThreshold () const
Returns the threshold above which accuracy is considered bad.
function coordinateTransformer [2/2]
inline QgsQuickCoordinateTransformer * Positioning::coordinateTransformer () const
Returns the coordinate transformer object used to reproject the position location.
function deviceCapabilities [2/2]
AbstractGnssReceiver::Capabilities Positioning::deviceCapabilities () const
function deviceDetails
GnssPositionDetails Positioning::deviceDetails () const
Returns extra details (such as hdop, vdop, pdop) provided by the positioning device.
function deviceId [2/2]
QString Positioning::deviceId () const
Returns the current positioning device id used to fetch position information.
See also: setDevice
function deviceLastError [2/2]
QString Positioning::deviceLastError () const
Returns positioning device's last error string.
function deviceSocketState [2/2]
QAbstractSocket::SocketState Positioning::deviceSocketState () const
Returns positioning device's socket state.
See also: deviceSocketStateString
function deviceSocketStateString [2/2]
QString Positioning::deviceSocketStateString () const
Returns a string representation of the positioning device's socket state.
See also: deviceSocketState
function elevationCorrectionMode [2/2]
PositioningSource::ElevationCorrectionMode Positioning::elevationCorrectionMode () const
Returns the current elevation correction mode.
Note:
Some modes depends on device capabilities.
function excellentAccuracyThreshold [2/2]
inline double Positioning::excellentAccuracyThreshold () const
Returns the threshold below which accuracy is considered excellent.
function getBackgroundPositionInformation
Q_INVOKABLE QList< GnssPositionInformation > Positioning::getBackgroundPositionInformation () const
Returns a list of position information collected while background mode is active.
See also: backgroundMode()
See also: setBackgroundMode()
function logging [2/2]
bool Positioning::logging () const
Returns whether GNSS devices will log their incoming position stream into a logfile.
Note:
Requires a device type with logging capability
function loggingPath [2/2]
QString Positioning::loggingPath () const
Returns the path where GNSS devices will log their incoming position stream into logfiles.
Note:
Requires a device type with logging capability
function orientation [2/2]
double Positioning::orientation () const
Returns the current device orientation
function positionInformation [2/2]
GnssPositionInformation Positioning::positionInformation () const
Returns a GnssPositionInformation position information object.
function projectedHorizontalAccuracy [2/2]
double Positioning::projectedHorizontalAccuracy () const
Returns the position horizontal accuracy in the destination CRS' map units.
function projectedPosition [2/2]
QgsPoint Positioning::projectedPosition () const
Returns the position point in its destination CRS defined in the coordinate transformer.
function serviceMode [2/2]
bool Positioning::serviceMode () const
Returns TRUE if the service mode is active. On supported platform, positioning runs into a dedicated service that is not suspended when devices are locked or the application is put suspended.
See also: setServiceMode()
function setActive
void Positioning::setActive (
bool active
)
Sets the positioning active status.
See also: active
function setAntennaHeight
void Positioning::setAntennaHeight (
double antennaHeight
)
Returns the GNSS device antenna height. This should be the pole height + sensore phase height.
Note:
When IMU is active this value is ignored as the device does the correction internally.
function setAveragedPosition
void Positioning::setAveragedPosition (
bool averaged
)
Sets whether the position information is averaged from an ongoing stream of incoming positions from the device.
function setAveragedPositionFilterAccuracy
void Positioning::setAveragedPositionFilterAccuracy (
bool enabled
)
Enables or disables the average position filter accuracy.
function setBackgroundMode
void Positioning::setBackgroundMode (
bool enabled
)
Sets whether the background mode is active. When activated, position information details will not be signaled but instead saved to disk until deactivated.
See also: getBackgroundPositionInformation()
function setBadAccuracyThreshold
void Positioning::setBadAccuracyThreshold (
double threshold
)
Sets the threshold above which accuracy is considered bad.
function setCoordinateTransformer
void Positioning::setCoordinateTransformer (
QgsQuickCoordinateTransformer * coordinateTransformer
)
Sets the coordinate transformer object used to reproject the position location.
Parameters:
coordinateTransformerA QgsQuickCoordinateTransformer object.
function setDeviceId
void Positioning::setDeviceId (
const QString & id
)
Sets the positioning device id used to fetch position information.
Note:
A blank string will connect the internal positioning device; bluetooth addresses will trigger an NMEA connection to external devices.
function setElevationCorrectionMode
void Positioning::setElevationCorrectionMode (
PositioningSource::ElevationCorrectionMode elevationCorrectionMode
)
Sets the current elevation correction mode.
Note:
Some modes depends on device capabilities.
function setExcellentAccuracyThreshold
void Positioning::setExcellentAccuracyThreshold (
double threshold
)
Sets the threshold below which accuracy is considered excellent.
function setLogging
void Positioning::setLogging (
bool logging
)
Sets whether GNSS devices will log their incoming position stream into a logfile.
Note:
Requires a device type with logging capability
function setLoggingPath
void Positioning::setLoggingPath (
const QString & path
)
Sets the path where GNSS devices will log their incoming position stream into logfiles.
Note:
Requires a device type with logging capability
function setServiceMode
void Positioning::setServiceMode (
bool enabled
)
Sets whether the service mode is active. On supported platform, positioning runs into a dedicated service that is not suspended when devices are locked or the application is put suspended.
See also: serviceMode()
function setValid
void Positioning::setValid (
bool valid
)
Sets whether the positioning device is valid.
function sourcePosition [2/2]
QgsPoint Positioning::sourcePosition () const
Returns the position point in its original WGS84 projection.
function valid [2/2]
bool Positioning::valid () const
Returns TRUE when the positioning device is valid.
function ~Positioning
virtual Positioning::~Positioning () = default
The documentation for this class was generated from the following file src/core/positioning/positioning.h