|
QGroundControl
Ground Control Station for MAVLink Drones
|
Session health is independent of transport readiness and RTK survey-in validity. More...
#include <GPSSourceHealth.h>
Inheritance diagram for GPSSourceHealth:
Collaboration diagram for GPSSourceHealth:Public Types | |
| enum class | State { NoData = 0 , Usable = 1 , Invalid = 2 , Stale = 3 } |
Signals | |
| void | positionChanged () |
Public Member Functions | |
| GPSSourceHealth (QObject *parent=nullptr, RuntimeScheduler *scheduler=nullptr) | |
| ~GPSSourceHealth () override | |
| void | setFreshnessTimeout (std::chrono::milliseconds timeout) |
| State | state () const |
| quint64 | observationRevision () const |
| std::optional< GPSObservation > | acceptedObservation (GPSObservation::PositionUse use=GPSObservation::PositionUse::GroundStation, std::optional< std::chrono::milliseconds > maximumAge=std::nullopt) const |
| void | updateObservation (const GPSObservation &observation) |
| void | invalidatePosition () |
| void | reset () |
Static Public Attributes | |
| static constexpr std::chrono::milliseconds | FRESHNESS_TIMEOUT {5000} |
| Default position age at which health becomes Stale and the position stops being usable. | |
Friends | |
| class | GPSSourceHealthTest |
| class | PositionManagerTest |
Session health is independent of transport readiness and RTK survey-in validity.
Definition at line 12 of file GPSSourceHealth.h.
|
strong |
| Enumerator | |
|---|---|
| NoData | |
| Usable | |
| Invalid | |
| Stale | |
Definition at line 19 of file GPSSourceHealth.h.
|
explicit |
Definition at line 13 of file GPSSourceHealth.cc.
|
override |
Definition at line 21 of file GPSSourceHealth.cc.
| std::optional< GPSObservation > GPSSourceHealth::acceptedObservation | ( | GPSObservation::PositionUse | use = GPSObservation::PositionUse::GroundStation, |
| std::optional< std::chrono::milliseconds > | maximumAge = std::nullopt |
||
| ) | const |
Definition at line 35 of file GPSSourceHealth.cc.
Referenced by GPSReceiver::acceptedPositionObservation().
| void GPSSourceHealth::invalidatePosition | ( | ) |
Definition at line 95 of file GPSSourceHealth.cc.
References Invalid, positionChanged(), Stale, and state().
|
inline |
Definition at line 38 of file GPSSourceHealth.h.
|
signal |
| void GPSSourceHealth::reset | ( | ) |
Definition at line 108 of file GPSSourceHealth.cc.
References ScheduledTask::cancel(), positionChanged(), and state().
| void GPSSourceHealth::setFreshnessTimeout | ( | std::chrono::milliseconds | timeout | ) |
Definition at line 117 of file GPSSourceHealth.cc.
References NoData, positionChanged(), and state().
|
inline |
Definition at line 36 of file GPSSourceHealth.h.
Referenced by GPSReceiver::GPSReceiver(), invalidatePosition(), reset(), setFreshnessTimeout(), and updateObservation().
| void GPSSourceHealth::updateObservation | ( | const GPSObservation & | observation | ) |
Definition at line 54 of file GPSSourceHealth.cc.
References ScheduledTask::cancel(), GPSObservation::monotonicTimestampUs, positionChanged(), and state().
|
friend |
Definition at line 15 of file GPSSourceHealth.h.
|
friend |
Definition at line 16 of file GPSSourceHealth.h.
|
staticconstexpr |
Default position age at which health becomes Stale and the position stops being usable.
Definition at line 32 of file GPSSourceHealth.h.