Class: QgsGpsConnection¶
Abstract base class for connection to a GPS device
Class Hierarchy¶
Base classes¶
Subclasses¶
Evaluates NMEA sentences coming from a GPS device  | 
|
A GPS connection subclass based on the Qt Location libraries.  | 
Methods
Closes connection to device  | 
|
Opens connection to device  | 
|
Returns the current gps information (lat, lon, etc.)  | 
|
Returns the last valid location obtained by the device.  | 
|
Parse available data source content  | 
|
Sets the GPS source.  | 
|
Returns the status.  | 
Signals
Emitted when the GPS device fix status is changed.  | 
|
Emitted whenever the GPS device receives a raw NMEA sentence.  | 
|
Emitted when the GPS position changes.  | 
|
Emitted whenever the GPS state is changed.  | 
Attributes
- class qgis.core.QgsGpsConnection[source]¶
 Bases:
QObject- __init__(dev: QIODevice | None)
 Constructor
- Parameters:
 dev (Optional[QIODevice]) – input device for the connection (e.g. serial device). The class takes ownership of the object
- Connected = 1¶
 
- DataReceived = 2¶
 
- GPSDataReceived = 3¶
 
- NotConnected = 0¶
 
- class Status¶
 Bases:
int
- currentGPSInformation(self) QgsGpsInformation[source]¶
 Returns the current gps information (lat, lon, etc.)
- Return type:
 
- signal fixStatusChanged(status: Qgis.GpsFixStatus)[source]¶
 Emitted when the GPS device fix status is changed.
Added in version 3.30.
- Parameters:
 status (Qgis.GpsFixStatus)
- lastValidLocation(self) QgsPoint[source]¶
 Returns the last valid location obtained by the device.
Added in version 3.30.
- Return type:
 
- signal nmeaSentenceReceived(substring: str)[source]¶
 Emitted whenever the GPS device receives a raw NMEA sentence.
- Parameters:
 substring (str)
- signal positionChanged(point: QgsPoint)[source]¶
 Emitted when the GPS position changes.
This signal is only emitted when the new GPS location is considered valid (see
QgsGpsInformation.isValid()).Added in version 3.30.
- Parameters:
 point (QgsPoint)
- setSource(self, source: QIODevice | None)[source]¶
 Sets the GPS source. The class takes ownership of the device class
- Parameters:
 source (Optional[QIODevice])
- signal stateChanged(info: QgsGpsInformation)[source]¶
 Emitted whenever the GPS state is changed.
- Parameters:
 info (QgsGpsInformation)
- status(self) QgsGpsConnection.Status[source]¶
 Returns the status. Possible state are not connected, connected, data received
- Return type: