QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSReceiverSession Class Reference

#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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ GPSReceiverSession()

GPSReceiverSession::GPSReceiverSession ( quint64 id,
Connection connection,
QObject * parent )

Definition at line 64 of file GPSReceiverSession.cc.

References gpsBaseStationStateFor().

Referenced by start().

◆ ~GPSReceiverSession()

GPSReceiverSession::~GPSReceiverSession ( )
override

Definition at line 73 of file GPSReceiverSession.cc.

References retire().

Member Function Documentation

◆ baseMode()

int GPSReceiverSession::baseMode ( ) const
inline

BaseModeDefinition::Mode of a configured base, or -1 for a passive receiver.

Definition at line 103 of file GPSReceiverSession.h.

◆ compactObservations()

bool GPSReceiverSession::compactObservations ( ) const
inline

A configured base sends compact (MSM4) observations.

Definition at line 89 of file GPSReceiverSession.h.

◆ detectedType()

std::optional< GPSType > GPSReceiverSession::detectedType ( ) const
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.

◆ ended

void GPSReceiverSession::ended ( GPSConnectionError error,
const QString & detail )
signal

The worker failed or exited; the owner ends the session.

References identity().

Referenced by start().

◆ endpoint()

const QString & GPSReceiverSession::endpoint ( ) const
inline

Definition at line 107 of file GPSReceiverSession.h.

◆ forwardsCorrections()

bool GPSReceiverSession::forwardsCorrections ( ) const
inline

Definition at line 86 of file GPSReceiverSession.h.

◆ hasWorker()

bool GPSReceiverSession::hasWorker ( ) const
inline

Definition at line 79 of file GPSReceiverSession.h.

◆ identity()

const QString & GPSReceiverSession::identity ( ) const
inline

Definition at line 109 of file GPSReceiverSession.h.

Referenced by ended(), and receiverReady().

◆ inputProblem

void GPSReceiverSession::inputProblem ( GPSInputProblem problem)
signal

Why a passive receiver delivers no position; None once positions arrive.

◆ manufacturer()

int GPSReceiverSession::manufacturer ( ) const
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().

◆ observation()

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, and observation().

Referenced by observation().

◆ positionUpdated

void GPSReceiverSession::positionUpdated ( const GPSPositionReport & report)
signal

◆ receiverDetected

void GPSReceiverSession::receiverDetected ( GPSType type)
signal

The family an Automatic session detected, or the protocol a passive receiver's output carries.

◆ receiverReady

void GPSReceiverSession::receiverReady ( const QString & identity)
signal

References identity().

◆ registerCorrections()

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 GPSCorrectionSettings::LocalReceiver, and GPSCorrectionManager::openSource().

◆ registerPosition()

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().

◆ retire()

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().

◆ role()

RTKSettings::ReceiverRole GPSReceiverSession::role ( ) const
inline

Definition at line 84 of file GPSReceiverSession.h.

◆ satelliteInfoUpdated

void GPSReceiverSession::satelliteInfoUpdated ( const GPSSatelliteReport & report)
signal

◆ serialDevice()

const QString & GPSReceiverSession::serialDevice ( ) const
inline

Definition at line 105 of file GPSReceiverSession.h.

◆ start()

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 RTKSettings::ConfiguredBase, ended(), GPSReceiverWorker::finished(), GPSReceiverSession(), and worker().

◆ surveyInStatusUpdated

void GPSReceiverSession::surveyInStatusUpdated ( const GPSSurveyReport & report)
signal

Survey progress of a configured base.

◆ worker()

QPointer< GPSReceiverWorker > GPSReceiverSession::worker ( ) const
inline

The worker, which outlives the session once retired until its thread exits.

Definition at line 82 of file GPSReceiverSession.h.

Referenced by retire(), and start().


The documentation for this class was generated from the following files: