|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GPSReceiverSession.h>
Inheritance diagram for GPSReceiverSession:
Collaboration diagram for GPSReceiverSession:Classes | |
| struct | Connection |
Signals | |
| void | satelliteInfoUpdated (const GPSSatelliteReport &report) |
| void | positionUpdated (const GPSPositionReport &report) |
| void | surveyInStatusUpdated (const GPSSurveyReport &report) |
| Survey progress of a configured base. | |
| void | receiverReady (const QString &identity) |
| void | receiverDetected (GPSType type) |
| The family an Automatic session detected, or the protocol a passive receiver's output carries. | |
| void | inputProblem (GPSInputProblem problem) |
| Why a passive receiver delivers no position; None once positions arrive. | |
| void | ended (GPSConnectionError error, const QString &detail) |
| The worker failed or exited; the owner ends the session. | |
Public Member Functions | |
| GPSReceiverSession (quint64 id, Connection connection, QObject *parent) | |
| ~GPSReceiverSession () override | |
| void | registerCorrections (GPSCorrectionManager *manager, const QString &sourceInstance) |
| Forwards the receiver's RTCM as the local correction source when the connection asks for it. | |
| bool | start (const GPSReceiverWorkerFactory &factory, GPSReceiverWorker::TransportFactory transportFactory) |
| Creates the worker, with a real worker for an empty factory, and starts it. False when none is created. | |
| void | registerPosition (PositionManager *positionManager, GPSSourceHealth *producer) |
| Publishes producer as the receiver position source. Registration observers may retire this session. | |
| void | retire () |
| bool | hasWorker () const |
| QPointer< GPSReceiverWorker > | worker () const |
| The worker, which outlives the session once retired until its thread exits. | |
| RTKSettings::ReceiverRole | role () const |
| bool | forwardsCorrections () const |
| bool | compactObservations () const |
| A configured base sends compact (MSM4) observations. | |
| int | manufacturer () const |
| The detected family's once an Automatic session detected it; a passive receiver's stays passive. | |
| std::optional< GPSType > | detectedType () const |
| int | baseMode () const |
| BaseModeDefinition::Mode of a configured base, or -1 for a passive receiver. | |
| const QString & | serialDevice () const |
| const QString & | endpoint () const |
| const QString & | identity () const |
| GPSObservation | observation (const GPSPositionReport &report, quint64 receivedAtUs) const |
| A base with a known antenna position reports that position instead of its navigation solution. | |
One receiver connection of GPSReceiver: its worker, correction and position registrations, and identity. Worker signals are queued to the session and relayed only until it is retired. retire() disconnects them, but Qt still delivers calls it had already queued, so a retired session drops those itself.
Definition at line 48 of file GPSReceiverSession.h.
| GPSReceiverSession::GPSReceiverSession | ( | quint64 | id, |
| Connection | connection, | ||
| QObject * | parent | ||
| ) |
Definition at line 64 of file GPSReceiverSession.cc.
|
override |
Definition at line 73 of file GPSReceiverSession.cc.
References retire().
|
inline |
BaseModeDefinition::Mode of a configured base, or -1 for a passive receiver.
Definition at line 103 of file GPSReceiverSession.h.
References GPSBaseStationState::mode.
Referenced by GPSReceiver::activeBaseMode().
|
inline |
A configured base sends compact (MSM4) observations.
Definition at line 89 of file GPSReceiverSession.h.
References GPSReceiverConfig::base, GPSBaseStationConfig::compactObservations, and GPSReceiverSession::Connection::config.
|
inline |
The family an Automatic session detected, or the protocol a passive receiver's output carries: the family whose native protocol it is, or GPSType::passive for standard NMEA. Empty until then and for a selected family.
Definition at line 100 of file GPSReceiverSession.h.
Referenced by GPSReceiver::detectedReceiver().
|
signal |
The worker failed or exited; the owner ends the session.
Referenced by start().
|
inline |
Definition at line 107 of file GPSReceiverSession.h.
References GPSReceiverSession::Connection::endpoint.
Referenced by GPSReceiver::activeEndpoint().
|
inline |
Definition at line 86 of file GPSReceiverSession.h.
References GPSReceiverSession::Connection::forwardsCorrections.
Referenced by GPSReceiver::forwardingCorrections().
|
inline |
Definition at line 79 of file GPSReceiverSession.h.
Referenced by GPSReceiver::hasReceiver().
|
inline |
Definition at line 109 of file GPSReceiverSession.h.
Referenced by GPSReceiver::receiverIdentity().
|
signal |
Why a passive receiver delivers no position; None once positions arrive.
Referenced by start().
|
inline |
The detected family's once an Automatic session detected it; a passive receiver's stays passive.
Definition at line 92 of file GPSReceiverSession.h.
References gpsReceiverManufacturerForType(), and GPSReceiverSession::Connection::type.
| GPSObservation GPSReceiverSession::observation | ( | const GPSPositionReport & | report, |
| quint64 | receivedAtUs | ||
| ) | const |
A base with a known antenna position reports that position instead of its navigation solution.
Definition at line 161 of file GPSReceiverSession.cc.
References GPSObservation::fromNavigation(), GPSObservation::fromSurveyedPosition(), GPSPositionReport::navigation, observation(), GPSBaseStationState::position, and GPSObservation::sessionId.
Referenced by observation().
|
signal |
Referenced by start().
|
signal |
The family an Automatic session detected, or the protocol a passive receiver's output carries.
|
signal |
| void GPSReceiverSession::registerCorrections | ( | GPSCorrectionManager * | manager, |
| const QString & | sourceInstance | ||
| ) |
Forwards the receiver's RTCM as the local correction source when the connection asks for it.
Definition at line 79 of file GPSReceiverSession.cc.
References GPSReceiverSession::Connection::forwardsCorrections, GPSCorrectionSettings::LocalReceiver, and GPSCorrectionManager::openSource().
| void GPSReceiverSession::registerPosition | ( | PositionManager * | positionManager, |
| GPSSourceHealth * | producer | ||
| ) |
Publishes producer as the receiver position source. Registration observers may retire this session.
Definition at line 133 of file GPSReceiverSession.cc.
References PositionManager::registerReceiver().
| void GPSReceiverSession::retire | ( | ) |
Disconnects and stops the worker and ends both registrations. The worker keeps its transport, and so any serial reservation, until it exits and deletes itself.
Definition at line 145 of file GPSReceiverSession.cc.
References worker().
Referenced by ~GPSReceiverSession().
|
inline |
Definition at line 84 of file GPSReceiverSession.h.
References GPSReceiverSession::Connection::role.
Referenced by GPSReceiver::activeRole().
|
signal |
Referenced by start().
|
inline |
Definition at line 105 of file GPSReceiverSession.h.
References GPSReceiverSession::Connection::serialDevice.
| bool GPSReceiverSession::start | ( | const GPSReceiverWorkerFactory & | factory, |
| GPSReceiverWorker::TransportFactory | transportFactory | ||
| ) |
Creates the worker, with a real worker for an empty factory, and starts it. False when none is created.
Definition at line 87 of file GPSReceiverSession.cc.
References GPSReceiverSession::Connection::config, RTKSettings::ConfiguredBase, GPSReceiverWorker::connectionError(), ended(), GPSReceiverWorker::finished(), GPSReceiverWorker::inputProblem(), inputProblem(), GPSReceiverWorker::positionUpdated(), positionUpdated(), GPSReceiverWorker::receiverDetected(), GPSReceiverWorker::receiverReady(), GPSReceiverSession::Connection::role, GPSReceiverWorker::rtcmDataReceived(), GPSReceiverWorker::satelliteInfoUpdated(), satelliteInfoUpdated(), GPSReceiverWorker::surveyInStatusUpdated(), GPSReceiverSession::Connection::type, and worker().
|
signal |
Survey progress of a configured base.
|
inline |
The worker, which outlives the session once retired until its thread exits.
Definition at line 82 of file GPSReceiverSession.h.