QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
definitions.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <chrono>
4
#include <cstdint>
5
#include <time.h>
// IWYU pragma: keep — part of the GPS_DEFINITIONS_HEADER contract for px4 sources
6
7
#include <QtCore/QLoggingCategory>
8
#include <QtCore/QThread>
9
#include <QtCore/QtMath>
10
11
#include "
sensor_gps.h
"
// IWYU pragma: keep — px4 sources resolve sensor_gps_s through this header
12
#include "
sensor_gnss_relative.h
"
// IWYU pragma: keep — px4 sources resolve sensor_gnss_relative_s through this header
13
#include "
satellite_info.h
"
// IWYU pragma: keep — px4 sources resolve satellite_info_s through this header
14
15
// Symbols below satisfy the px4-gpsdrivers GPS_DEFINITIONS_HEADER contract.
16
17
Q_DECLARE_LOGGING_CATEGORY(GPSDriversLog)
18
19
#define GPS_INFO(...) qCInfo(GPSDriversLog, __VA_ARGS__)
20
#define GPS_WARN(...) qCWarning(GPSDriversLog, __VA_ARGS__)
21
#define GPS_ERR(...) qCCritical(GPSDriversLog, __VA_ARGS__)
22
23
#define M_DEG_TO_RAD_F static_cast<float>(M_PI / 180.0)
24
#define M_RAD_TO_DEG (180.0 / M_PI)
25
26
typedef
uint64_t
gps_abstime
;
27
28
static
inline
gps_abstime
gps_absolute_time
()
29
{
30
return
std::chrono::duration_cast<std::chrono::microseconds>(
31
std::chrono::steady_clock::now().time_since_epoch()).count();
32
}
33
34
static
inline
void
gps_usleep
(
unsigned
long
usecs)
35
{
36
QThread::usleep(usecs);
37
}
gps_abstime
uint64_t gps_abstime
Definition
definitions.h:26
gps_absolute_time
static gps_abstime gps_absolute_time()
Definition
definitions.h:28
gps_usleep
static void gps_usleep(unsigned long usecs)
Definition
definitions.h:34
satellite_info.h
sensor_gnss_relative.h
sensor_gps.h
src
GPS
Driver
definitions.h
Generated by
1.9.8