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

#include <GPSManager.h>

Inheritance diagram for GPSManager:
Collaboration diagram for GPSManager:

Public Member Functions

 GPSManager (QObject *parent=nullptr, RuntimeScheduler *scheduler=nullptr)
 scheduler runs the timers of every GPS service; the manager creates one when none is given.
 ~GPSManager ()
void init ()
void shutdown ()
 Stops the GPS services, then the position manager.
GPSReceiver * receiver () const
GPSCorrectionManager * corrections () const
NTRIPManager * ntrip () const
PositionManager * positionManager () const
Q_INVOKABLE bool saveCurrentBasePosition ()

Static Public Member Functions

static GPSManager * instance ()

Friends

class GPSManagerTest

Detailed Description

Owns the GPS services and wires them to settings and vehicles. Terms used across src/GPS:

Definition at line 21 of file GPSManager.h.

Constructor & Destructor Documentation

◆ GPSManager()

GPSManager::GPSManager ( QObject * parent = nullptr,
RuntimeScheduler * scheduler = nullptr )

scheduler runs the timers of every GPS service; the manager creates one when none is given.

Definition at line 42 of file GPSManager.cc.

Referenced by GPSManagerTest, and instance().

◆ ~GPSManager()

GPSManager::~GPSManager ( )

Definition at line 61 of file GPSManager.cc.

References shutdown().

Member Function Documentation

◆ corrections()

GPSCorrectionManager * GPSManager::corrections ( ) const
inline

Definition at line 52 of file GPSManager.h.

◆ init()

void GPSManager::init ( )

Initializes the ground-station position manager first, then the GPS services that consume it, and starts polling the receiver connection.

Definition at line 88 of file GPSManager.cc.

References GPSSettingsBindings::bindCorrections(), GPSSettingsBindings::bindNtrip(), GPSSettingsBindings::bindPosition(), GPSSettingsBindings::bindReceiver(), LinkManager::connectionsSuspended(), LinkManager::instance(), and SettingsManager::instance().

Referenced by GPSManagerTest.

◆ instance()

GPSManager * GPSManager::instance ( )
static

◆ ntrip()

NTRIPManager * GPSManager::ntrip ( ) const
inline

Definition at line 54 of file GPSManager.h.

◆ positionManager()

PositionManager * GPSManager::positionManager ( ) const
inline

Definition at line 56 of file GPSManager.h.

Referenced by QGroundControlQmlGlobal::positionManager().

◆ receiver()

GPSReceiver * GPSManager::receiver ( ) const
inline

Definition at line 50 of file GPSManager.h.

References receiver().

Referenced by receiver().

◆ saveCurrentBasePosition()

bool GPSManager::saveCurrentBasePosition ( )

Stores the receiver's current position and accuracy as the fixed base position for a later connection. Returns false, leaving the settings unchanged, when the receiver's facts cannot save the current position.

Definition at line 72 of file GPSManager.cc.

References SettingsManager::instance(), and SettingsManager::rtkSettings().

◆ shutdown()

void GPSManager::shutdown ( )

Stops the GPS services, then the position manager.

Definition at line 104 of file GPSManager.cc.

Referenced by GPSManagerTest, QGCApplication::shutdown(), and ~GPSManager().

◆ GPSManagerTest

friend class GPSManagerTest
friend

Definition at line 35 of file GPSManager.h.

References GPSManager(), GPSManagerTest, init(), instance(), and shutdown().

Referenced by GPSManagerTest.


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