APM:Libraries
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
AP_GPS_SBP Class Reference

#include <AP_GPS_SBP.h>

Inheritance diagram for AP_GPS_SBP:
[legend]
Collaboration diagram for AP_GPS_SBP:
[legend]

Classes

struct  sbp_dops_t
 
struct  sbp_gps_time_t
 
struct  sbp_heartbeat_t
 
struct  sbp_iar_state_t
 
struct  sbp_parser_state_t
 
struct  sbp_pos_llh_t
 
struct  sbp_tracking_state_t
 
struct  sbp_vel_ned_t
 

Public Member Functions

 AP_GPS_SBP (AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port)
 
AP_GPS::GPS_Status highest_supported_status (void)
 
bool supports_mavlink_gps_rtk_message ()
 
bool read ()
 
void inject_data (const uint8_t *data, uint16_t len) override
 
const char * name () const override
 
- Public Member Functions inherited from AP_GPS_Backend
 AP_GPS_Backend (AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port)
 
virtual ~AP_GPS_Backend (void)
 
virtual bool is_configured (void)
 
virtual void send_mavlink_gps_rtk (mavlink_channel_t chan)
 
virtual void broadcast_configuration_failure_reason (void) const
 
virtual void handle_msg (const mavlink_message_t *msg)
 
virtual void handle_gnss_msg (const AP_GPS::GPS_State &msg)
 
virtual bool get_lag (float &lag) const
 
virtual bool is_healthy (void) const
 
void broadcast_gps_type () const
 
virtual void Write_DataFlash_Log_Startup_messages () const
 
virtual bool prepare_for_arming (void)
 

Static Public Member Functions

static bool _detect (struct SBP_detect_state &state, uint8_t data)
 

Private Member Functions

void _sbp_process ()
 
void _sbp_process_message ()
 
bool _attempt_state_update ()
 
void logging_log_full_update ()
 
void logging_log_raw_sbp (uint16_t msg_type, uint16_t sender_id, uint8_t msg_len, uint8_t *msg_buff)
 

Private Attributes

struct AP_GPS_SBP::sbp_parser_state_t parser_state
 
uint32_t last_heatbeat_received_ms
 
uint32_t last_injected_data_ms
 
struct sbp_gps_time_t last_gps_time
 
struct sbp_dops_t last_dops
 
struct sbp_pos_llh_t last_pos_llh_spp
 
struct sbp_pos_llh_t last_pos_llh_rtk
 
struct sbp_vel_ned_t last_vel_ned
 
uint32_t last_iar_num_hypotheses
 
uint32_t last_full_update_tow
 
uint32_t last_full_update_cpu_ms
 
uint32_t crc_error_counter
 

Static Private Attributes

static const uint8_t SBP_PREAMBLE = 0x55
 
static const uint16_t SBP_STARTUP_MSGTYPE = 0xFF00
 
static const uint16_t SBP_HEARTBEAT_MSGTYPE = 0xFFFF
 
static const uint16_t SBP_GPS_TIME_MSGTYPE = 0x0100
 
static const uint16_t SBP_DOPS_MSGTYPE = 0x0206
 
static const uint16_t SBP_POS_ECEF_MSGTYPE = 0x0200
 
static const uint16_t SBP_POS_LLH_MSGTYPE = 0x0201
 
static const uint16_t SBP_BASELINE_ECEF_MSGTYPE = 0x0202
 
static const uint16_t SBP_BASELINE_NED_MSGTYPE = 0x0203
 
static const uint16_t SBP_VEL_ECEF_MSGTYPE = 0x0204
 
static const uint16_t SBP_VEL_NED_MSGTYPE = 0x0205
 
static const uint16_t SBP_TRACKING_STATE_MSGTYPE = 0x0016
 
static const uint16_t SBP_IAR_STATE_MSGTYPE = 0x0019
 

Additional Inherited Members

- Protected Member Functions inherited from AP_GPS_Backend
int32_t swap_int32 (int32_t v) const
 
int16_t swap_int16 (int16_t v) const
 
void fill_3d_velocity (void)
 
void make_gps_time (uint32_t bcd_date, uint32_t bcd_milliseconds)
 
void _detection_message (char *buffer, uint8_t buflen) const
 
bool should_df_log () const
 
- Protected Attributes inherited from AP_GPS_Backend
AP_HAL::UARTDriverport
 UART we are attached to. More...
 
AP_GPSgps
 access to frontend (for parameters) More...
 
AP_GPS::GPS_Statestate
 public state for this instance More...
 

Detailed Description

Definition at line 27 of file AP_GPS_SBP.h.

Constructor & Destructor Documentation

◆ AP_GPS_SBP()

AP_GPS_SBP::AP_GPS_SBP ( AP_GPS _gps,
AP_GPS::GPS_State _state,
AP_HAL::UARTDriver _port 
)

Definition at line 47 of file AP_GPS_SBP.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ _attempt_state_update()

bool AP_GPS_SBP::_attempt_state_update ( )
private

Definition at line 228 of file AP_GPS_SBP.cpp.

Referenced by read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _detect()

bool AP_GPS_SBP::_detect ( struct SBP_detect_state state,
uint8_t  data 
)
static

Definition at line 311 of file AP_GPS_SBP.cpp.

Referenced by AP_GPS::detect_instance(), and supports_mavlink_gps_rtk_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _sbp_process()

void AP_GPS_SBP::_sbp_process ( )
private

Definition at line 95 of file AP_GPS_SBP.cpp.

Referenced by read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _sbp_process_message()

void AP_GPS_SBP::_sbp_process_message ( )
private

Definition at line 177 of file AP_GPS_SBP.cpp.

Referenced by _sbp_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ highest_supported_status()

AP_GPS::GPS_Status AP_GPS_SBP::highest_supported_status ( void  )
inlinevirtual

Reimplemented from AP_GPS_Backend.

Definition at line 32 of file AP_GPS_SBP.h.

◆ inject_data()

void AP_GPS_SBP::inject_data ( const uint8_t *  data,
uint16_t  len 
)
overridevirtual

Reimplemented from AP_GPS_Backend.

Definition at line 80 of file AP_GPS_SBP.cpp.

Referenced by supports_mavlink_gps_rtk_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logging_log_full_update()

void AP_GPS_SBP::logging_log_full_update ( )
private

Definition at line 388 of file AP_GPS_SBP.cpp.

Referenced by _attempt_state_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logging_log_raw_sbp()

void AP_GPS_SBP::logging_log_raw_sbp ( uint16_t  msg_type,
uint16_t  sender_id,
uint8_t  msg_len,
uint8_t *  msg_buff 
)
private

Definition at line 407 of file AP_GPS_SBP.cpp.

Referenced by _sbp_process_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

const char* AP_GPS_SBP::name ( ) const
inlineoverridevirtual

Implements AP_GPS_Backend.

Definition at line 43 of file AP_GPS_SBP.h.

◆ read()

bool AP_GPS_SBP::read ( void  )
virtual

Implements AP_GPS_Backend.

Definition at line 65 of file AP_GPS_SBP.cpp.

Referenced by supports_mavlink_gps_rtk_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ supports_mavlink_gps_rtk_message()

bool AP_GPS_SBP::supports_mavlink_gps_rtk_message ( )
inlinevirtual

Reimplemented from AP_GPS_Backend.

Definition at line 34 of file AP_GPS_SBP.h.

Here is the call graph for this function:

Member Data Documentation

◆ crc_error_counter

uint32_t AP_GPS_SBP::crc_error_counter
private

Definition at line 177 of file AP_GPS_SBP.h.

Referenced by _sbp_process(), and logging_log_full_update().

◆ last_dops

struct sbp_dops_t AP_GPS_SBP::last_dops
private

Definition at line 164 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update(), and _sbp_process_message().

◆ last_full_update_cpu_ms

uint32_t AP_GPS_SBP::last_full_update_cpu_ms
private

Definition at line 171 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update().

◆ last_full_update_tow

uint32_t AP_GPS_SBP::last_full_update_tow
private

Definition at line 170 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update().

◆ last_gps_time

struct sbp_gps_time_t AP_GPS_SBP::last_gps_time
private

Definition at line 163 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update(), and _sbp_process_message().

◆ last_heatbeat_received_ms

uint32_t AP_GPS_SBP::last_heatbeat_received_ms
private

Definition at line 160 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update(), _sbp_process_message(), and AP_GPS_SBP().

◆ last_iar_num_hypotheses

uint32_t AP_GPS_SBP::last_iar_num_hypotheses
private

◆ last_injected_data_ms

uint32_t AP_GPS_SBP::last_injected_data_ms
private

Definition at line 161 of file AP_GPS_SBP.h.

Referenced by inject_data(), and logging_log_full_update().

◆ last_pos_llh_rtk

struct sbp_pos_llh_t AP_GPS_SBP::last_pos_llh_rtk
private

Definition at line 166 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update(), and _sbp_process_message().

◆ last_pos_llh_spp

struct sbp_pos_llh_t AP_GPS_SBP::last_pos_llh_spp
private

Definition at line 165 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().

◆ last_vel_ned

struct sbp_vel_ned_t AP_GPS_SBP::last_vel_ned
private

Definition at line 167 of file AP_GPS_SBP.h.

Referenced by _attempt_state_update(), and _sbp_process_message().

◆ parser_state

struct AP_GPS_SBP::sbp_parser_state_t AP_GPS_SBP::parser_state
private

◆ SBP_BASELINE_ECEF_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_BASELINE_ECEF_MSGTYPE = 0x0202
staticprivate

Definition at line 77 of file AP_GPS_SBP.h.

◆ SBP_BASELINE_NED_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_BASELINE_NED_MSGTYPE = 0x0203
staticprivate

Definition at line 78 of file AP_GPS_SBP.h.

◆ SBP_DOPS_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_DOPS_MSGTYPE = 0x0206
staticprivate

Definition at line 74 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().

◆ SBP_GPS_TIME_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_GPS_TIME_MSGTYPE = 0x0100
staticprivate

Definition at line 73 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().

◆ SBP_HEARTBEAT_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_HEARTBEAT_MSGTYPE = 0xFFFF
staticprivate

Definition at line 72 of file AP_GPS_SBP.h.

Referenced by _detect(), and _sbp_process_message().

◆ SBP_IAR_STATE_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_IAR_STATE_MSGTYPE = 0x0019
staticprivate

Definition at line 82 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().

◆ SBP_POS_ECEF_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_POS_ECEF_MSGTYPE = 0x0200
staticprivate

Definition at line 75 of file AP_GPS_SBP.h.

◆ SBP_POS_LLH_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_POS_LLH_MSGTYPE = 0x0201
staticprivate

Definition at line 76 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().

◆ SBP_PREAMBLE

const uint8_t AP_GPS_SBP::SBP_PREAMBLE = 0x55
staticprivate

Definition at line 68 of file AP_GPS_SBP.h.

Referenced by _detect(), and _sbp_process().

◆ SBP_STARTUP_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_STARTUP_MSGTYPE = 0xFF00
staticprivate

Definition at line 71 of file AP_GPS_SBP.h.

◆ SBP_TRACKING_STATE_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_TRACKING_STATE_MSGTYPE = 0x0016
staticprivate

Definition at line 81 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().

◆ SBP_VEL_ECEF_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_VEL_ECEF_MSGTYPE = 0x0204
staticprivate

Definition at line 79 of file AP_GPS_SBP.h.

◆ SBP_VEL_NED_MSGTYPE

const uint16_t AP_GPS_SBP::SBP_VEL_NED_MSGTYPE = 0x0205
staticprivate

Definition at line 80 of file AP_GPS_SBP.h.

Referenced by _sbp_process_message().


The documentation for this class was generated from the following files: