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

Host-timed survey-in duration for receivers that report completion but not elapsed time. More...

#include <GPSSurveyClock.h>

Public Member Functions

void start (uint64_t nowUs)
 
void reset ()
 
void stop (uint64_t nowUs)
 Freezes the duration at its final value.
 
bool running () const
 
bool update (uint64_t nowUs)
 
std::chrono::seconds duration () const
 
void start (GPSDecodeContext &context)
 Starts timing and publishes the survey as active.
 
void publishProgress (GPSDecodeContext &context)
 Publishes the active survey when its whole-second duration advanced.
 
void finish (GPSDecodeContext &context, bool valid, const GPSEllipsoidPosition &position={})
 Stops timing and publishes the finished survey, valid at position or failed.
 

Detailed Description

Host-timed survey-in duration for receivers that report completion but not elapsed time.

Definition at line 10 of file GPSSurveyClock.h.

Member Function Documentation

◆ duration()

std::chrono::seconds GPSSurveyClock::duration ( ) const
inline

Definition at line 48 of file GPSSurveyClock.h.

Referenced by publishProgress(), and start().

◆ finish()

void GPSSurveyClock::finish ( GPSDecodeContext &  context,
bool  valid,
const GPSEllipsoidPosition &  position = {} 
)
inline

Stops timing and publishes the finished survey, valid at position or failed.

Definition at line 66 of file GPSSurveyClock.h.

◆ publishProgress()

void GPSSurveyClock::publishProgress ( GPSDecodeContext &  context)
inline

Publishes the active survey when its whole-second duration advanced.

Definition at line 58 of file GPSSurveyClock.h.

References duration(), GPSDecodeContext::nowUs(), GPSDecodeContext::publishSurvey(), and update().

◆ reset()

void GPSSurveyClock::reset ( )
inline

Definition at line 19 of file GPSSurveyClock.h.

◆ running()

bool GPSSurveyClock::running ( ) const
inline

Definition at line 32 of file GPSSurveyClock.h.

◆ start() [1/2]

void GPSSurveyClock::start ( GPSDecodeContext &  context)
inline

Starts timing and publishes the survey as active.

Definition at line 51 of file GPSSurveyClock.h.

References duration(), GPSDecodeContext::nowUs(), GPSDecodeContext::publishSurvey(), and start().

◆ start() [2/2]

void GPSSurveyClock::start ( uint64_t  nowUs)
inline

Definition at line 13 of file GPSSurveyClock.h.

Referenced by start().

◆ stop()

void GPSSurveyClock::stop ( uint64_t  nowUs)
inline

Freezes the duration at its final value.

Definition at line 26 of file GPSSurveyClock.h.

References update().

◆ update()

bool GPSSurveyClock::update ( uint64_t  nowUs)
inline
Returns
true when the whole-second duration advanced.

Definition at line 35 of file GPSSurveyClock.h.

Referenced by publishProgress(), and stop().


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