|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GPSCorrectionSelector.h>
Public Member Functions | |
| void | configure (GPSCorrectionSettings::CorrectionSource source, qint64 now) |
| Routes only source, or selects automatically for HighestPriority. A valid, changed source reselects at once. | |
| void | beginSource (GPSCorrectionSettings::CorrectionSource source, qint64 now) |
| Starts source. A category has one source at a time, which ends itself before a replacement begins. | |
| void | endSource (GPSCorrectionSettings::CorrectionSource source, qint64 now) |
| Stops routing source. | |
| bool | submit (GPSCorrectionSettings::CorrectionSource source, const QString &instance, qint64 receivedAtMs, qint64 now) |
| void | shutdown () |
| bool | hasSources () const |
| Whether any source is begun. | |
| std::optional< GPSCorrectionStream > | selectedStream (qint64 now) const |
| The selected fresh stream, if any. | |
Static Public Attributes | |
| static constexpr std::chrono::milliseconds | FRESHNESS_TIMEOUT {5000} |
| Age at which a frame is no longer routed and its stream stops being eligible for selection. | |
| static constexpr std::chrono::milliseconds | SWITCH_HOLD_DOWN {2000} |
Selects the one correction stream sent to vehicles and UDP forwarding, with freshness, priority and hold-down. Each source category follows one instance at a time; another instance takes over once it goes stale. Callers submit only valid frames. Selection calls take the monotonic time in milliseconds.
Definition at line 34 of file GPSCorrectionSelector.h.
| void GPSCorrectionSelector::beginSource | ( | GPSCorrectionSettings::CorrectionSource | source, |
| qint64 | now | ||
| ) |
Starts source. A category has one source at a time, which ends itself before a replacement begins.
Definition at line 67 of file GPSCorrectionSelector.cc.
References endSource().
| void GPSCorrectionSelector::configure | ( | GPSCorrectionSettings::CorrectionSource | source, |
| qint64 | now | ||
| ) |
Routes only source, or selects automatically for HighestPriority. A valid, changed source reselects at once.
Definition at line 56 of file GPSCorrectionSelector.cc.
Referenced by GPSCorrectionManager::setConfiguration().
| void GPSCorrectionSelector::endSource | ( | GPSCorrectionSettings::CorrectionSource | source, |
| qint64 | now | ||
| ) |
Stops routing source.
Definition at line 77 of file GPSCorrectionSelector.cc.
Referenced by beginSource().
| bool GPSCorrectionSelector::hasSources | ( | ) | const |
Whether any source is begun.
Definition at line 111 of file GPSCorrectionSelector.cc.
| std::optional< GPSCorrectionStream > GPSCorrectionSelector::selectedStream | ( | qint64 | now | ) | const |
The selected fresh stream, if any.
Definition at line 116 of file GPSCorrectionSelector.cc.
References GPSCorrectionStream::source.
| void GPSCorrectionSelector::shutdown | ( | ) |
Definition at line 124 of file GPSCorrectionSelector.cc.
Referenced by GPSCorrectionManager::shutdown().
| bool GPSCorrectionSelector::submit | ( | GPSCorrectionSettings::CorrectionSource | source, |
| const QString & | instance, | ||
| qint64 | receivedAtMs, | ||
| qint64 | now | ||
| ) |
Offers one valid RTCM frame of a begun source; the stream is instance within the source. Returns whether the frame is fresh and from the selected stream, so it is to be sent.
Definition at line 87 of file GPSCorrectionSelector.cc.
References MonotonicClock::age(), and FRESHNESS_TIMEOUT.
|
staticconstexpr |
Age at which a frame is no longer routed and its stream stops being eligible for selection.
Definition at line 57 of file GPSCorrectionSelector.h.
Referenced by submit().
|
staticconstexpr |
Definition at line 58 of file GPSCorrectionSelector.h.