|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GPSDriver.h>
Public Member Functions | |
| GPSDriver (GPSType type, GPSTransport &transport, const GPSReceiverConfig &config, GPSDriverSinks sinks) | |
| ~GPSDriver () | |
| GPSDriver (const GPSDriver &)=delete | |
| GPSDriver & | operator= (const GPSDriver &)=delete |
| bool | configure () |
| Create and configure the underlying driver. Returns false on failure. | |
| int | receive (unsigned timeoutMs) |
| int | handleCallback (int type, void *data1, int data2) |
Facade over the px4-gpsdrivers library: selects and configures the receiver driver, bridges its callbacks to a GPSTransport plus the supplied sinks, and pumps its receive loop. Keeps all px4 headers and types out of callers.
Definition at line 56 of file GPSDriver.h.
| GPSDriver::GPSDriver | ( | GPSType | type, |
| GPSTransport & | transport, | ||
| const GPSReceiverConfig & | config, | ||
| GPSDriverSinks | sinks | ||
| ) |
Definition at line 27 of file GPSDriver.cc.
|
default |
|
delete |
| bool GPSDriver::configure | ( | ) |
Create and configure the underlying driver. Returns false on failure.
Definition at line 37 of file GPSDriver.cc.
References femto, GPSReceiverConfig::fixedBaseAccuracyMeters, GPSReceiverConfig::fixedBaseAltitudeMeters, GPSReceiverConfig::fixedBaseLatitude, GPSReceiverConfig::fixedBaseLongitude, GPSReceiverConfig::headingOffsetDeg, septentrio, GPSReceiverConfig::surveyInAccMeters, GPSReceiverConfig::surveyInDurationSecs, trimble, u_blox, and GPSReceiverConfig::useFixedBase.
| int GPSDriver::handleCallback | ( | int | type, |
| void * | data1, | ||
| int | data2 | ||
| ) |
Trampoline target for the px4 callback; type is a GPSCallbackType value. Public only so the file-local C callback can reach it — not for callers.
Definition at line 115 of file GPSDriver.cc.
References GPSSurveyInStatus::active, GPSSurveyInStatus::altitude, GPSSurveyInStatus::durationSecs, GPSSurveyInStatus::latitude, GPSSurveyInStatus::longitude, GPSSurveyInStatus::meanAccuracyMM, GPSDriverSinks::onRTCM, GPSDriverSinks::onSurveyIn, GPSTransport::read(), GPSTransport::setBaudrate(), GPSSurveyInStatus::valid, and GPSTransport::write().
| int GPSDriver::receive | ( | unsigned | timeoutMs | ) |
Pump one receive cycle, invoking the position/satellite sinks as data arrives. Returns the px4 bitset (<0 error, bit0 position, bit1 satellite), or <0 if not configured.
Definition at line 95 of file GPSDriver.cc.
References GPSDriverSinks::onPosition, and GPSDriverSinks::onSatelliteInfo.