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

#include <AP_GPS_MTK19.h>

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

Classes

struct  diyd_mtk_msg
 

Public Member Functions

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

Private Types

enum  diyd_mtk_fix_type {
  FIX_NONE = 1, FIX_2D = 2, FIX_3D = 3, FIX_2D_SBAS = 6,
  FIX_3D_SBAS = 7
}
 
enum  diyd_mtk_protocol_bytes { PREAMBLE1_V16 = 0xd0, PREAMBLE1_V19 = 0xd1, PREAMBLE2 = 0xdd }
 

Private Attributes

uint8_t _ck_a
 
uint8_t _ck_b
 
uint8_t _step
 
uint8_t _payload_counter
 
uint8_t _mtk_revision
 
uint8_t _fix_counter
 
union {
   DEFINE_BYTE_ARRAY_METHODS diyd_mtk_msg   msg
 
_buffer
 

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 31 of file AP_GPS_MTK19.h.

Member Enumeration Documentation

◆ diyd_mtk_fix_type

Enumerator
FIX_NONE 
FIX_2D 
FIX_3D 
FIX_2D_SBAS 
FIX_3D_SBAS 

Definition at line 54 of file AP_GPS_MTK19.h.

◆ diyd_mtk_protocol_bytes

Enumerator
PREAMBLE1_V16 
PREAMBLE1_V19 
PREAMBLE2 

Definition at line 62 of file AP_GPS_MTK19.h.

Constructor & Destructor Documentation

◆ AP_GPS_MTK19()

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

Definition at line 30 of file AP_GPS_MTK19.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ _detect()

bool AP_GPS_MTK19::_detect ( struct MTK19_detect_state state,
uint8_t  data 
)
static

Definition at line 187 of file AP_GPS_MTK19.cpp.

Referenced by AP_GPS::detect_instance().

Here is the caller graph for this function:

◆ name()

const char* AP_GPS_MTK19::name ( ) const
inlineoverridevirtual

Implements AP_GPS_Backend.

Definition at line 39 of file AP_GPS_MTK19.h.

◆ read()

bool AP_GPS_MTK19::read ( void  )
virtual

Implements AP_GPS_Backend.

Definition at line 52 of file AP_GPS_MTK19.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _buffer

union { ... } AP_GPS_MTK19::_buffer

Referenced by read().

◆ _ck_a

uint8_t AP_GPS_MTK19::_ck_a
private

Definition at line 69 of file AP_GPS_MTK19.h.

Referenced by read().

◆ _ck_b

uint8_t AP_GPS_MTK19::_ck_b
private

Definition at line 70 of file AP_GPS_MTK19.h.

Referenced by read().

◆ _fix_counter

uint8_t AP_GPS_MTK19::_fix_counter
private

Definition at line 77 of file AP_GPS_MTK19.h.

Referenced by read().

◆ _mtk_revision

uint8_t AP_GPS_MTK19::_mtk_revision
private

Definition at line 75 of file AP_GPS_MTK19.h.

Referenced by read().

◆ _payload_counter

uint8_t AP_GPS_MTK19::_payload_counter
private

Definition at line 74 of file AP_GPS_MTK19.h.

Referenced by read().

◆ _step

uint8_t AP_GPS_MTK19::_step
private

Definition at line 73 of file AP_GPS_MTK19.h.

Referenced by read().

◆ msg

Definition at line 82 of file AP_GPS_MTK19.h.


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