42 #include "../../definitions.h" 47 #define ASHTECH_RECV_BUFFER_SIZE 512 49 #define ASH_RESPONSE_TIMEOUT 200 // ms, timeout for waiting for a response 61 int receive(
unsigned timeout)
override;
114 void sendSurveyInStatusUpdate(
bool active,
bool valid,
double latitude = (
double)NAN,
double longitude = (
double)NAN,
115 float altitude = NAN);
RTCMParsing * _rtcm_parsing
int handleMessage(int len)
int writeAckedCommand(const void *buf, int buf_length, unsigned timeout)
Write a command and wait for a (N)Ack.
int receive(unsigned timeout) override
receive & handle new data from the device
NMEACommandState _command_state
struct satellite_info_s * _satellite_info
bool _correction_output_activated
struct vehicle_gps_position_s * _gps_position
void activateCorrectionOutput()
enable output of correction output
uint8_t _rx_buffer[ASHTECH_RECV_BUFFER_SIZE]
bool _got_pashr_pos_message
If we got a PASHR,POS message, we will ignore GGA messages.
NMEACommand _waiting_for_command
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
int configure(unsigned &baudrate, OutputMode output_mode) override
configure the device
int(* GPSCallbackPtr)(GPSCallbackType type, void *data1, int data2, void *user)
Callback function for platform-specific stuff.
void receiveWait(unsigned timeout_min)
receive data for at least the specified amount of time
GPSDriverAshtech(GPSCallbackPtr callback, void *callback_user, struct vehicle_gps_position_s *gps_position, struct satellite_info_s *satellite_info, float heading_offset=0.f)
uint64_t _last_timestamp_time
void sendSurveyInStatusUpdate(bool active, bool valid, double latitude=(double) NAN, double longitude=(double) NAN, float altitude=NAN)
GPS driver base class with Base Station Support.
virtual ~GPSDriverAshtech()
gps_abstime _survey_in_start
uint16_t _rx_buffer_bytes
int waitForReply(NMEACommand command, const unsigned timeout)
AshtechBoard _board
board we are connected to
#define ASHTECH_RECV_BUFFER_SIZE
NMEADecodeState _decode_state
char _port
port we are connected to (e.g.
void activateRTCMOutput()