ardupilot/libraries/SITL/SIM_GPS_SBF.h
Peter Barker 07b27d76be SITL: correct and augment SBF simulator
- checksum calculation was including header parts in CRC twice
 - need to send DOP message to make EKF happy
 - need to supply own number of satellites
 - must pad packets to a multiple of 4 bytes
2024-08-21 06:31:41 +10:00

30 lines
476 B
C++

#pragma once
#include "SIM_config.h"
#if AP_SIM_GPS_SBF_ENABLED
#include "SIM_GPS.h"
namespace SITL {
class GPS_SBF : public GPS_Backend {
public:
CLASS_NO_COPY(GPS_SBF);
using GPS_Backend::GPS_Backend;
void publish(const GPS_Data *d) override;
private:
void send_sbf(uint16_t msgid, uint8_t *buf, uint16_t buf_size);
void publish_PVTGeodetic(const GPS_Data *d);
void publish_DOP(const GPS_Data *d);
};
};
#endif // AP_SIM_GPS_SBF_ENABLED