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

#include <AP_GPS_SIRF.h>

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

Classes

struct  sirf_geonav
 

Public Member Functions

 AP_GPS_SIRF (AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port)
 
bool read ()
 
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 SIRF_detect_state &state, uint8_t data)
 

Private Types

enum  sirf_protocol_bytes {
  PREAMBLE1 = 0xa0, PREAMBLE2 = 0xa2, POSTAMBLE1 = 0xb0, POSTAMBLE2 = 0xb3,
  MSG_GEONAV = 0x29
}
 
enum  sirf_fix_type { FIX_3D = 0x6, FIX_MASK = 0x7 }
 

Private Member Functions

bool _parse_gps (void)
 
void _accumulate (uint8_t val)
 

Private Attributes

uint8_t _step
 
uint16_t _checksum
 
bool _gather
 
uint16_t _payload_length
 
uint16_t _payload_counter
 
uint8_t _msg_id
 
union {
   DEFINE_BYTE_ARRAY_METHODS sirf_geonav   nav
 
_buffer
 

Static Private Attributes

static const uint8_t _initialisation_blob []
 

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 30 of file AP_GPS_SIRF.h.

Member Enumeration Documentation

◆ sirf_fix_type

Enumerator
FIX_3D 
FIX_MASK 

Definition at line 85 of file AP_GPS_SIRF.h.

◆ sirf_protocol_bytes

Enumerator
PREAMBLE1 
PREAMBLE2 
POSTAMBLE1 
POSTAMBLE2 
MSG_GEONAV 

Definition at line 78 of file AP_GPS_SIRF.h.

Constructor & Destructor Documentation

◆ AP_GPS_SIRF()

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

Definition at line 35 of file AP_GPS_SIRF.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ _accumulate()

void AP_GPS_SIRF::_accumulate ( uint8_t  val)
private

Definition at line 192 of file AP_GPS_SIRF.cpp.

Referenced by read().

Here is the caller graph for this function:

◆ _detect()

bool AP_GPS_SIRF::_detect ( struct SIRF_detect_state state,
uint8_t  data 
)
static

Definition at line 202 of file AP_GPS_SIRF.cpp.

Referenced by AP_GPS::detect_instance().

Here is the caller graph for this function:

◆ _parse_gps()

bool AP_GPS_SIRF::_parse_gps ( void  )
private

Definition at line 166 of file AP_GPS_SIRF.cpp.

Referenced by read().

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

◆ name()

const char* AP_GPS_SIRF::name ( ) const
inlineoverridevirtual

Implements AP_GPS_Backend.

Definition at line 38 of file AP_GPS_SIRF.h.

◆ read()

bool AP_GPS_SIRF::read ( void  )
virtual

Implements AP_GPS_Backend.

Definition at line 52 of file AP_GPS_SIRF.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _buffer

union { ... } AP_GPS_SIRF::_buffer

Referenced by _parse_gps(), and read().

◆ _checksum

uint16_t AP_GPS_SIRF::_checksum
private

Definition at line 93 of file AP_GPS_SIRF.h.

Referenced by _accumulate(), and read().

◆ _gather

bool AP_GPS_SIRF::_gather
private

Definition at line 94 of file AP_GPS_SIRF.h.

Referenced by read().

◆ _initialisation_blob

const uint8_t AP_GPS_SIRF::_initialisation_blob
staticprivate
Initial value:
= {
0xa0, 0xa2, 0x00, 0x08, 0xa6, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xb0, 0xb3,
0xa0, 0xa2, 0x00, 0x08, 0xa6, 0x00, 0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xb0, 0xb3
}

Definition at line 108 of file AP_GPS_SIRF.h.

Referenced by AP_GPS_SIRF().

◆ _msg_id

uint8_t AP_GPS_SIRF::_msg_id
private

Definition at line 97 of file AP_GPS_SIRF.h.

Referenced by _parse_gps(), and read().

◆ _payload_counter

uint16_t AP_GPS_SIRF::_payload_counter
private

Definition at line 96 of file AP_GPS_SIRF.h.

Referenced by read().

◆ _payload_length

uint16_t AP_GPS_SIRF::_payload_length
private

Definition at line 95 of file AP_GPS_SIRF.h.

Referenced by read().

◆ _step

uint8_t AP_GPS_SIRF::_step
private

Definition at line 92 of file AP_GPS_SIRF.h.

Referenced by read().

◆ nav

Definition at line 102 of file AP_GPS_SIRF.h.


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