PySide6.QtPositioning.QNmeaSatelliteInfoSource¶
- class QNmeaSatelliteInfoSource¶
- The - QNmeaSatelliteInfoSourceclass provides satellite information using an NMEA data source.- Details- NMEA is a commonly used protocol for the specification of one’s global position at a certain point in time. The - QNmeaSatelliteInfoSourceclass reads NMEA data and uses it to provide information about satellites in view and satellites in use in form of lists of- QGeoSatelliteInfoobjects.- A - QNmeaSatelliteInfoSourceinstance operates in either- RealTimeModeor- SimulationMode. These modes allow NMEA data to be read from either a live source of data, or replayed for simulation purposes from previously recorded NMEA data.- The source of NMEA data is set via - setDevice().- Use - startUpdates()to start receiving regular satellite information updates and- stopUpdates()to stop these updates. If you only require updates occasionally, you can call- requestUpdate()to request a single update of both satellites in view and satellites in use.- The information about satellites in view is received via the - satellitesInViewUpdated()signal.- The information about satellites in use is received via the - satellitesInUseUpdated()signal.- Synopsis¶- Methods¶- def - __init__()
- def - device()
- def - setDevice()
- def - setError()
- def - updateMode()
 - Virtual methods¶- Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - class UpdateMode¶
- Defines the available update modes. - Constant - Description - QNmeaSatelliteInfoSource.UpdateMode.UpdateMode.RealTimeMode - Satellite information is read and distributed from the data source as it becomes available. Use this mode if you are using a live source of NMEA data (for example a GPS hardware device). - QNmeaSatelliteInfoSource.UpdateMode.UpdateMode.SimulationMode - Satellite information is read and distributed from the data source at the given rate. The rate is determined by the SimulationUpdateInterval parameter. Use this mode if the data source contains previously recorded NMEA data and you want to replay the data for simulation purposes. 
 - class SatelliteInfoParseStatus¶
- Defines the parse status of satellite information. The satellite information can be split into multiple sentences, and we need to parse all of them. - Constant - Description - QNmeaSatelliteInfoSource.SatelliteInfoParseStatus.NotParsed - The data does not contain information about satellites. - QNmeaSatelliteInfoSource.SatelliteInfoParseStatus.PartiallyParsed - A valid satellite information is received and parsed, but it’s not complete, so we need to wait for another NMEA sentence. - QNmeaSatelliteInfoSource.SatelliteInfoParseStatus.FullyParsed - Satellite information was fully collected and parsed. 
 - PySide6.QtPositioning.QNmeaSatelliteInfoSource.SimulationUpdateInterval¶
 - __init__(mode[, parent=None])¶
- Parameters:
- mode – - UpdateMode
- parent – - QObject
 
 
 - Constructs a - QNmeaSatelliteInfoSourceinstance with the given- parentand- mode.- Returns the NMEA data source. - See also - parseSatelliteInfoFromNmea(data, infos, system)¶
- Parameters:
- data – - QByteArrayView
- infos – .list of QGeoSatelliteInfo 
- system – - SatelliteSystem
 
- Return type:
 
 - parseSatelliteInfoFromNmea(data, size, infos, system)
- Parameters:
- data – str 
- size – int 
- infos – .list of QGeoSatelliteInfo 
- system – - SatelliteSystem
 
- Return type:
 
 - Parses an NMEA sentence string to extract the information about satellites in view. - The default implementation will parse standard NMEA $GPGSV sentences. This method should be reimplemented in a subclass whenever the need to deal with non-standard NMEA sentences arises. - The parser reads - sizebytes from- dataand uses that information to fill- infoslist.- Returns - SatelliteInfoParseStatuswith parse result. Modifies- infoslist in case- PartiallyParsedor- FullyParsedis returned. Also sets the- systemto correct satellite system type. This is required to determine the system type in case there are no satellites in view.- parseSatellitesInUseFromNmea(data, pnrsInUse)¶
- Parameters:
- data – - QByteArrayView
- pnrsInUse – .list of int 
 
- Return type:
 
 - parseSatellitesInUseFromNmea(data, size, pnrsInUse)
- Parameters:
- data – str 
- size – int 
- pnrsInUse – .list of int 
 
- Return type:
 
 - Parses an NMEA sentence string to extract the IDs of satelites in use. - The default implementation will parse standard NMEA $GPGSA sentences. This method should be reimplemented in a subclass whenever the need to deal with non-standard NMEA sentences arises. - The parser reads - sizebytes from- dataand uses that information to fill- pnrsInUselist.- Returns system type if the sentence was successfully parsed, otherwise returns - Undefinedand should not modifiy- pnrsInUse.- Sets the NMEA data source to - device. If the device is not open, it will be opened in ReadOnly mode.- The source device can only be set once and must be set before calling - startUpdates()or- requestUpdate().- Note - The - devicemust emit QIODevice::readyRead() for the source to be notified when data is available for reading.- QNmeaSatelliteInfoSourcedoes not assume the ownership of the device, and hence does not deallocate it upon destruction.- See also - updateMode()¶
- Return type:
 
 - Returns the update mode.