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

#include <AP_GPS_ERB.h>

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

Classes

struct  erb_dops
 
struct  erb_header
 
struct  erb_pos
 
struct  erb_rtk
 
struct  erb_stat
 
struct  erb_vel
 
struct  erb_ver
 
union  PACKED
 

Public Member Functions

 AP_GPS_ERB (AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port)
 
bool read ()
 
AP_GPS::GPS_Status highest_supported_status (void)
 
bool supports_mavlink_gps_rtk_message ()
 
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 inject_data (const uint8_t *data, uint16_t len)
 
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 ERB_detect_state &state, uint8_t data)
 

Private Types

enum  erb_protocol_bytes {
  PREAMBLE1 = 0x45, PREAMBLE2 = 0x52, MSG_VER = 0x01, MSG_POS = 0x02,
  MSG_STAT = 0x03, MSG_DOPS = 0x04, MSG_VEL = 0x05, MSG_RTK = 0x07
}
 
enum  erb_fix_type { FIX_NONE = 0x00, FIX_SINGLE = 0x01, FIX_FLOAT = 0x02, FIX_FIX = 0x03 }
 

Private Member Functions

bool _parse_gps ()
 

Private Attributes

union AP_GPS_ERB::PACKED _buffer
 
uint8_t _ck_a
 
uint8_t _ck_b
 
uint8_t _step
 
uint8_t _msg_id
 
uint16_t _payload_length
 
uint16_t _payload_counter
 
uint8_t _fix_count
 
uint32_t _last_pos_time
 
uint32_t _last_vel_time
 
bool _new_position:1
 
bool _new_speed:1
 
AP_GPS::GPS_Status next_fix
 

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_ERB.h.

Member Enumeration Documentation

◆ erb_fix_type

Enumerator
FIX_NONE 
FIX_SINGLE 
FIX_FLOAT 
FIX_FIX 

Definition at line 121 of file AP_GPS_ERB.h.

◆ erb_protocol_bytes

Enumerator
PREAMBLE1 
PREAMBLE2 
MSG_VER 
MSG_POS 
MSG_STAT 
MSG_DOPS 
MSG_VEL 
MSG_RTK 

Definition at line 110 of file AP_GPS_ERB.h.

Constructor & Destructor Documentation

◆ AP_GPS_ERB()

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

Definition at line 35 of file AP_GPS_ERB.cpp.

Member Function Documentation

◆ _detect()

bool AP_GPS_ERB::_detect ( struct ERB_detect_state state,
uint8_t  data 
)
static

Definition at line 241 of file AP_GPS_ERB.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:

◆ _parse_gps()

bool AP_GPS_ERB::_parse_gps ( void  )
private

Definition at line 138 of file AP_GPS_ERB.cpp.

Referenced by read().

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_ERB::highest_supported_status ( void  )
inlinevirtual

Reimplemented from AP_GPS_Backend.

Definition at line 35 of file AP_GPS_ERB.h.

◆ name()

const char* AP_GPS_ERB::name ( ) const
inlineoverridevirtual

Implements AP_GPS_Backend.

Definition at line 41 of file AP_GPS_ERB.h.

◆ read()

bool AP_GPS_ERB::read ( void  )
virtual

Implements AP_GPS_Backend.

Definition at line 51 of file AP_GPS_ERB.cpp.

Here is the call graph for this function:

◆ supports_mavlink_gps_rtk_message()

bool AP_GPS_ERB::supports_mavlink_gps_rtk_message ( )
inlinevirtual

Reimplemented from AP_GPS_Backend.

Definition at line 37 of file AP_GPS_ERB.h.

Here is the call graph for this function:

Member Data Documentation

◆ _buffer

union AP_GPS_ERB::PACKED AP_GPS_ERB::_buffer
private

Referenced by _parse_gps(), and read().

◆ _ck_a

uint8_t AP_GPS_ERB::_ck_a
private

Definition at line 129 of file AP_GPS_ERB.h.

Referenced by read().

◆ _ck_b

uint8_t AP_GPS_ERB::_ck_b
private

Definition at line 130 of file AP_GPS_ERB.h.

Referenced by read().

◆ _fix_count

uint8_t AP_GPS_ERB::_fix_count
private

Definition at line 139 of file AP_GPS_ERB.h.

Referenced by _parse_gps().

◆ _last_pos_time

uint32_t AP_GPS_ERB::_last_pos_time
private

Definition at line 141 of file AP_GPS_ERB.h.

Referenced by _parse_gps().

◆ _last_vel_time

uint32_t AP_GPS_ERB::_last_vel_time
private

Definition at line 142 of file AP_GPS_ERB.h.

Referenced by _parse_gps().

◆ _msg_id

uint8_t AP_GPS_ERB::_msg_id
private

Definition at line 134 of file AP_GPS_ERB.h.

Referenced by _parse_gps(), and read().

◆ _new_position

bool AP_GPS_ERB::_new_position
private

Definition at line 145 of file AP_GPS_ERB.h.

Referenced by _parse_gps().

◆ _new_speed

bool AP_GPS_ERB::_new_speed
private

Definition at line 147 of file AP_GPS_ERB.h.

Referenced by _parse_gps().

◆ _payload_counter

uint16_t AP_GPS_ERB::_payload_counter
private

Definition at line 136 of file AP_GPS_ERB.h.

Referenced by read().

◆ _payload_length

uint16_t AP_GPS_ERB::_payload_length
private

Definition at line 135 of file AP_GPS_ERB.h.

Referenced by read().

◆ _step

uint8_t AP_GPS_ERB::_step
private

Definition at line 133 of file AP_GPS_ERB.h.

Referenced by read().

◆ next_fix

AP_GPS::GPS_Status AP_GPS_ERB::next_fix
private

Definition at line 153 of file AP_GPS_ERB.h.

Referenced by _parse_gps().


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