43 #include "../../definitions.h" 45 #ifndef GPS_READ_BUFFER_SIZE 46 #define GPS_READ_BUFFER_SIZE 150 145 #define GPS_EPOCH_SECS ((time_t)1234567890ULL) 170 virtual int configure(
unsigned &baud,
OutputMode output_mode) = 0;
179 virtual int receive(
unsigned timeout) = 0;
192 void resetUpdateRates();
193 void storeUpdateRates();
206 int read(uint8_t *buf,
int buf_length,
int timeout)
208 *((
int *)buf) = timeout;
218 int write(
const void *buf,
int buf_length)
259 static void ECEF2lla(
double ecef_x,
double ecef_y,
double ecef_z,
double &latitude,
double &longitude,
float &altitude);
262 void *_callback_user{};
264 uint8_t _rate_count_lat_lon{};
265 uint8_t _rate_count_vel{};
267 float _rate_lat_lon{0.0f};
268 float _rate_vel{0.0f};
270 uint64_t _interval_rate_start{0};
float getPositionUpdateRate()
void surveyInStatus(SurveyInStatus &status)
static struct vehicle_status_s status
int setBaudrate(int baudrate)
set the Baudrate
double latitude
NAN if unknown/not set [deg].
virtual int reset(GPSRestartType restart_type)
Reset GPS device.
int read(uint8_t *buf, int buf_length, int timeout)
read from device
double longitude
NAN if unknown/not set [deg].
int write(const void *buf, int buf_length)
write to the device
set Baudrate data1: ignored data2: baudrate return: 0 on success
void gotRTCMMessage(uint8_t *buf, int buf_length)
got an RTCM message from the device
int(* GPSCallbackPtr)(GPSCallbackType type, void *data1, int data2, void *user)
Callback function for platform-specific stuff.
Got an RTCM message from the device.
float altitude
NAN if unknown/not set [m].
In cold start mode, the receiver has no information from the last position at startup.
In warm start mode, the receiver has approximate information for time, position, and coarse satellite...
can be used to set the current clock accurately data1: pointer to a timespec struct data2: ignored re...
uint8_t flags
bit 0: valid, bit 1: active
uint32_t mean_accuracy
[mm]
In hot start mode, the receiver was powered down only for a short time (4 hours or less)...
void setClock(timespec &t)
message about current survey-in status data1: points to a SurveyInStatus struct data2: ignored return...
float getVelocityUpdateRate()
Write data to device data1: data to be written data2: number of bytes to write return: num written by...