109 satellite(
const std::string& sprn,
int elevation,
int azimuth,
int snr):
110 prn(sprn), elevation_deg(elevation), azimuth_deg(azimuth), snr(snr) {}
131 nmeatxt(
int severity,
const std::string& message):
132 severity(severity), message(message){}
169 std::string time_utc = std::string(
"");
173 uint8_t satellites = 0;
177 float altitude_meters = 0.0;
179 float geoid_height_meters = 0.0;
181 float age_seconds = 0.0;
183 std::string station_id = std::string(
"");
187 bool chksum_match =
false;
207 NMEAGPS(
unsigned int uart,
unsigned int baudrate,
217 NMEAGPS(
const std::string& uart,
unsigned int baudrate);
226 NMEAGPS(
unsigned int bus, uint8_t addr);
239 std::string readStr(
size_t size);
248 int writeStr(
const std::string& buffer);
257 void enable(
bool enable);
266 void setBaudrate(
unsigned int baudrate);
279 bool dataAvailable(
unsigned int millis);
285 size_t getMaxQueueDepth();
293 size_t setMaxQueueDepth(
size_t depth);
326 std::string getRawSentence();
339 size_t fixQueueSize();
345 size_t rawSentenceQueueSize();
351 size_t txtMessageQueueSize();
359 void parseNMEASentence(
const std::string& sentence);
365 std::vector<satellite> satellites();
371 double sentencesPerSecond();
380 double bytesPerSecond();
400 void _parse_thread();
403 std::atomic<bool> _running;
406 void _parse_gpgga(
const std::string&
string);
408 void _parse_gpgsv(
const std::string&
string);
410 void _parse_gpgll(
const std::string&
string);
412 void _parse_gptxt(
const std::string&
string);
415 using fp = void (
NMEAGPS::*)(
const std::string &);
417 const std::map<std::string, fp> nmea_2_parser =
419 {
"GPGGA", &NMEAGPS::_parse_gpgga},
420 {
"GPGSV", &NMEAGPS::_parse_gpgsv},
421 {
"GPGLL", &NMEAGPS::_parse_gpgll},
422 {
"GPTXT", &NMEAGPS::_parse_gptxt},
426 std::queue<std::string> _queue_nmea_sentence;
427 std::mutex _mtx_nmea_sentence;
430 std::queue<gps_fix> _queue_fix;
434 std::queue<nmeatxt> _queue_txt;
438 std::atomic<size_t> _maxQueueDepth;
441 std::atomic<size_t> _sentences_since_start;
444 std::atomic<size_t> _bytes_since_start;
447 std::atomic<double> _seconds_since_start;
450 std::list<satellite> _satlist;
451 std::mutex _mtx_satlist;
bool isRunning()
Definition: nmea_gps.hpp:312
nmea_gps_context m_nmea_gps
Definition: nmea_gps.hpp:389
coord_DD coordinates
Definition: nmea_gps.hpp:167
std::string __str__()
Definition: nmea_gps.cxx:620
Definition: nmea_gps.hpp:77
Definition: nmea_gps.h:51
Definition: nmea_gps.hpp:195
nmeatxt(int severity, const std::string &message)
Definition: nmea_gps.hpp:131
satellite(const std::string &sprn, int elevation, int azimuth, int snr)
Definition: nmea_gps.hpp:109
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
Definition: nmea_gps.hpp:165
gps_fix_quality
Definition: nmea_gps.hpp:141
std::string message
Definition: nmea_gps.hpp:123
Definition: nmea_gps.hpp:90
Definition: nmea_gps.hpp:119
double longitude
Definition: nmea_gps.hpp:81
int azimuth_deg
Definition: nmea_gps.hpp:96
int snr
Definition: nmea_gps.hpp:98
double latitude
Definition: nmea_gps.hpp:79
int elevation_deg
Definition: nmea_gps.hpp:94
std::string prn
Definition: nmea_gps.hpp:92
satellite()
Definition: nmea_gps.hpp:100
int severity
Definition: nmea_gps.hpp:121
nmeatxt()
Definition: nmea_gps.hpp:125