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

#include <GPSCorrectionManager.h>

+ Inheritance diagram for GPSCorrectionManager:
+ Collaboration diagram for GPSCorrectionManager:

Classes

struct  Configuration
 The correction settings as values; the application's settings binding supplies them. More...
 
struct  UdpInputConfiguration
 
struct  UdpOutputConfiguration
 

Public Types

enum class  State { Inactive , Waiting , Fresh }
 Whether vehicles receive RTK corrections, across NTRIP, UDP input, and the local receiver. More...
 

Signals

void stateChanged ()
 
void selectedBytesPerSecondChanged ()
 
void vehicleBytesSubmittedChanged ()
 
void udpInputChanged ()
 
void udpOutputChanged ()
 

Public Member Functions

 GPSCorrectionManager (QObject *parent=nullptr, RuntimeScheduler *scheduler=nullptr)
 
 ~GPSCorrectionManager () override
 
void shutdown ()
 
RTCMMAVLink * rtcmMavlink ()
 The vehicle output, whose links tests replace with RTCMMAVLink::setOutputProvider().
 
void setConfiguration (const Configuration &configuration)
 Applies the parts that changed; ignored after shutdown().
 
std::unique_ptr< GPSCorrectionSourceHandle > openSource (GPSCorrectionSettings::CorrectionSource source, const QString &instance)
 
State state () const
 As last published with stateChanged().
 
GPSCorrectionStream selectedStream () const
 
quint64 selectedBytesPerSecond () const
 Rate of the corrections sent from the selected stream.
 
quint64 vehicleBytesSubmitted () const
 Bytes of the selected streams that vehicle links admitted, from every source since startup.
 
QString udpInputError () const
 Why the enabled UDP input is not listening; empty while it listens or is disabled.
 
QString udpOutputError () const
 Why the enabled UDP output does not forward; empty while it forwards or is disabled.
 

Static Public Member Functions

static Q_INVOKABLE QString sourceName (int source)
 

Friends

class GPSCorrectionSourceHandle
 

Detailed Description

Owns the shared MAVLink sequence domain and the UDP correction input and output for all GPS sources. The selected stream goes to vehicles over MAVLink and to UDP forwarding. Receipt times are on the scheduler's clock; producers on worker threads stamp with the steady clock, which the application's QtRuntimeScheduler uses.

Definition at line 45 of file GPSCorrectionManager.h.

Member Enumeration Documentation

◆ State

enum class GPSCorrectionManager::State
strong

Whether vehicles receive RTK corrections, across NTRIP, UDP input, and the local receiver.

Enumerator
Inactive 

No correction source is enabled.

Waiting 

A source is enabled, but no fresh stream is selected for vehicles.

Fresh 

A fresh stream is selected for vehicles.

Definition at line 61 of file GPSCorrectionManager.h.

Constructor & Destructor Documentation

◆ GPSCorrectionManager()

GPSCorrectionManager::GPSCorrectionManager ( QObject *  parent = nullptr,
RuntimeScheduler *  scheduler = nullptr 
)
explicit

Definition at line 58 of file GPSCorrectionManager.cc.

References RuntimeScheduler::nowUs().

◆ ~GPSCorrectionManager()

GPSCorrectionManager::~GPSCorrectionManager ( )
override

Definition at line 87 of file GPSCorrectionManager.cc.

References shutdown().

Member Function Documentation

◆ openSource()

std::unique_ptr< GPSCorrectionSourceHandle > GPSCorrectionManager::openSource ( GPSCorrectionSettings::CorrectionSource  source,
const QString &  instance 
)

Begins source, which delivers the stream instance, until the returned handle is destroyed. A category has one source at a time, so a replacement opens after the previous handle is gone.

Definition at line 81 of file GPSCorrectionManager.cc.

References GPSCorrectionSourceHandle.

Referenced by GPSReceiverSession::registerCorrections().

◆ rtcmMavlink()

RTCMMAVLink * GPSCorrectionManager::rtcmMavlink ( )
inline

The vehicle output, whose links tests replace with RTCMMAVLink::setOutputProvider().

Definition at line 105 of file GPSCorrectionManager.h.

◆ selectedBytesPerSecond()

quint64 GPSCorrectionManager::selectedBytesPerSecond ( ) const
inline

Rate of the corrections sent from the selected stream.

Definition at line 122 of file GPSCorrectionManager.h.

◆ selectedBytesPerSecondChanged

void GPSCorrectionManager::selectedBytesPerSecondChanged ( )
signal

◆ selectedStream()

GPSCorrectionStream GPSCorrectionManager::selectedStream ( ) const
inline

The fresh stream selected for vehicles, as last published with stateChanged(); a HighestPriority source when none is.

Definition at line 119 of file GPSCorrectionManager.h.

◆ setConfiguration()

◆ shutdown()

◆ sourceName()

QString GPSCorrectionManager::sourceName ( int  source)
static

◆ state()

State GPSCorrectionManager::state ( ) const
inline

As last published with stateChanged().

Definition at line 115 of file GPSCorrectionManager.h.

◆ stateChanged

void GPSCorrectionManager::stateChanged ( )
signal

◆ udpInputChanged

void GPSCorrectionManager::udpInputChanged ( )
signal

Referenced by setConfiguration().

◆ udpInputError()

QString GPSCorrectionManager::udpInputError ( ) const
inline

Why the enabled UDP input is not listening; empty while it listens or is disabled.

Definition at line 128 of file GPSCorrectionManager.h.

◆ udpOutputChanged

void GPSCorrectionManager::udpOutputChanged ( )
signal

Referenced by setConfiguration().

◆ udpOutputError()

QString GPSCorrectionManager::udpOutputError ( ) const
inline

Why the enabled UDP output does not forward; empty while it forwards or is disabled.

Definition at line 131 of file GPSCorrectionManager.h.

◆ vehicleBytesSubmitted()

quint64 GPSCorrectionManager::vehicleBytesSubmitted ( ) const
inline

Bytes of the selected streams that vehicle links admitted, from every source since startup.

Definition at line 125 of file GPSCorrectionManager.h.

References RTCMMAVLink::totalBytesSubmitted().

◆ vehicleBytesSubmittedChanged

void GPSCorrectionManager::vehicleBytesSubmittedChanged ( )
signal

Friends And Related Symbol Documentation

◆ GPSCorrectionSourceHandle

friend class GPSCorrectionSourceHandle
friend

Definition at line 57 of file GPSCorrectionManager.h.

Referenced by openSource().


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