APM:Libraries
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AP_GPS_Backend Class Referenceabstract

#include <GPS_Backend.h>

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

Public Member Functions

 AP_GPS_Backend (AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port)
 
virtual ~AP_GPS_Backend (void)
 
virtual bool read ()=0
 
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
 
virtual const char * name () const =0
 
void broadcast_gps_type () const
 
virtual void Write_DataFlash_Log_Startup_messages () const
 
virtual bool prepare_for_arming (void)
 

Protected Member Functions

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

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 24 of file GPS_Backend.h.

Constructor & Destructor Documentation

◆ AP_GPS_Backend()

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

Definition at line 31 of file GPS_Backend.cpp.

◆ ~AP_GPS_Backend()

virtual AP_GPS_Backend::~AP_GPS_Backend ( void  )
inlinevirtual

Definition at line 31 of file GPS_Backend.h.

Here is the call graph for this function:

Member Function Documentation

◆ _detection_message()

void AP_GPS_Backend::_detection_message ( char *  buffer,
uint8_t  buflen 
) const
protected

Definition at line 139 of file GPS_Backend.cpp.

Referenced by broadcast_gps_type(), and Write_DataFlash_Log_Startup_messages().

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

◆ broadcast_configuration_failure_reason()

virtual void AP_GPS_Backend::broadcast_configuration_failure_reason ( void  ) const
inlinevirtual

Reimplemented in AP_GPS_UBLOX, and AP_GPS_SBF.

Definition at line 50 of file GPS_Backend.h.

Referenced by AP_GPS::broadcast_first_configuration_failure_reason().

Here is the caller graph for this function:

◆ broadcast_gps_type()

void AP_GPS_Backend::broadcast_gps_type ( ) const

Definition at line 159 of file GPS_Backend.cpp.

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

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

◆ fill_3d_velocity()

void AP_GPS_Backend::fill_3d_velocity ( void  )
protected

Definition at line 116 of file GPS_Backend.cpp.

Referenced by AP_GPS_SIRF::_parse_gps(), AP_GPS_NMEA::_term_complete(), AP_GPS_NOVA::process_message(), AP_GPS_GSOF::process_message(), AP_GPS_MTK::read(), and AP_GPS_MTK19::read().

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

◆ get_lag()

virtual bool AP_GPS_Backend::get_lag ( float &  lag) const
inlinevirtual

Reimplemented in AP_GPS_UBLOX, and AP_GPS_SBF.

Definition at line 56 of file GPS_Backend.h.

Referenced by AP_GPS::get_lag().

Here is the caller graph for this function:

◆ handle_gnss_msg()

virtual void AP_GPS_Backend::handle_gnss_msg ( const AP_GPS::GPS_State msg)
inlinevirtual

Reimplemented in AP_GPS_UAVCAN.

Definition at line 53 of file GPS_Backend.h.

◆ handle_msg()

virtual void AP_GPS_Backend::handle_msg ( const mavlink_message_t *  msg)
inlinevirtual

Reimplemented in AP_GPS_MAV.

Definition at line 52 of file GPS_Backend.h.

Referenced by AP_GPS::handle_msg().

Here is the caller graph for this function:

◆ highest_supported_status()

virtual AP_GPS::GPS_Status AP_GPS_Backend::highest_supported_status ( void  )
inlinevirtual

Reimplemented in AP_GPS_UBLOX, AP_GPS_ERB, AP_GPS_SBF, AP_GPS_SBP, AP_GPS_SBP2, AP_GPS_GSOF, and AP_GPS_NOVA.

Definition at line 40 of file GPS_Backend.h.

Referenced by AP_GPS::highest_supported_status().

Here is the caller graph for this function:

◆ inject_data()

void AP_GPS_Backend::inject_data ( const uint8_t *  data,
uint16_t  len 
)
virtual

Reimplemented in AP_GPS_SBP, AP_GPS_SBP2, and AP_GPS_NOVA.

Definition at line 127 of file GPS_Backend.cpp.

Referenced by AP_GPS::inject_data(), and is_configured().

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

◆ is_configured()

virtual bool AP_GPS_Backend::is_configured ( void  )
inlinevirtual

Reimplemented in AP_GPS_UBLOX, and AP_GPS_SBF.

Definition at line 42 of file GPS_Backend.h.

Here is the call graph for this function:

◆ is_healthy()

virtual bool AP_GPS_Backend::is_healthy ( void  ) const
inlinevirtual

Reimplemented in AP_GPS_SBF.

Definition at line 59 of file GPS_Backend.h.

Referenced by AP_GPS::is_healthy().

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

◆ make_gps_time()

void AP_GPS_Backend::make_gps_time ( uint32_t  bcd_date,
uint32_t  bcd_milliseconds 
)
protected

fill in time_week_ms and time_week from BCD date and time components assumes MTK19 millisecond form of bcd_time

Definition at line 76 of file GPS_Backend.cpp.

Referenced by AP_GPS_NMEA::_term_complete(), AP_GPS_MTK::read(), and AP_GPS_MTK19::read().

Here is the caller graph for this function:

◆ name()

virtual const char* AP_GPS_Backend::name ( ) const
pure virtual

Implemented in AP_GPS_UBLOX, AP_GPS_NMEA, AP_GPS_SBP, AP_GPS_ERB, AP_GPS_SBP2, AP_GPS_SBF, AP_GPS_MTK, AP_GPS_MTK19, AP_GPS_MAV, AP_GPS_SIRF, AP_GPS_UAVCAN, AP_GPS_GSOF, and AP_GPS_NOVA.

Referenced by _detection_message(), and is_healthy().

Here is the caller graph for this function:

◆ prepare_for_arming()

virtual bool AP_GPS_Backend::prepare_for_arming ( void  )
inlinevirtual

Reimplemented in AP_GPS_SBF.

Definition at line 66 of file GPS_Backend.h.

Referenced by AP_GPS::prepare_for_arming().

Here is the caller graph for this function:

◆ read()

virtual bool AP_GPS_Backend::read ( )
pure virtual

Implemented in AP_GPS_UBLOX, AP_GPS_NMEA, AP_GPS_SBF, AP_GPS_SBP, AP_GPS_GSOF, AP_GPS_MTK19, AP_GPS_SBP2, AP_GPS_MTK, AP_GPS_SIRF, AP_GPS_ERB, AP_GPS_NOVA, AP_GPS_MAV, and AP_GPS_UAVCAN.

Referenced by AP_GPS::update_instance(), and ~AP_GPS_Backend().

Here is the caller graph for this function:

◆ send_mavlink_gps_rtk()

void AP_GPS_Backend::send_mavlink_gps_rtk ( mavlink_channel_t  chan)
virtual

Definition at line 179 of file GPS_Backend.cpp.

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

Here is the caller graph for this function:

◆ should_df_log()

bool AP_GPS_Backend::should_df_log ( ) const
protected

Definition at line 173 of file GPS_Backend.cpp.

Referenced by AP_GPS_SBF::log_ExtEventPVTGeodetic(), AP_GPS_UBLOX::log_mon_hw(), AP_GPS_UBLOX::log_mon_hw2(), AP_GPS_UBLOX::log_rxm_raw(), AP_GPS_UBLOX::log_rxm_rawx(), AP_GPS_SBP2::logging_ext_event(), AP_GPS_SBP::logging_log_full_update(), AP_GPS_SBP2::logging_log_full_update(), AP_GPS_SBP::logging_log_raw_sbp(), and AP_GPS_SBP2::logging_log_raw_sbp().

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

◆ supports_mavlink_gps_rtk_message()

virtual bool AP_GPS_Backend::supports_mavlink_gps_rtk_message ( )
inlinevirtual

Reimplemented in AP_GPS_ERB, and AP_GPS_SBP.

Definition at line 47 of file GPS_Backend.h.

Here is the call graph for this function:

◆ swap_int16()

int16_t AP_GPS_Backend::swap_int16 ( int16_t  v) const
protected

Definition at line 57 of file GPS_Backend.cpp.

Referenced by AP_GPS_SIRF::_parse_gps().

Here is the caller graph for this function:

◆ swap_int32()

int32_t AP_GPS_Backend::swap_int32 ( int32_t  v) const
protected

Definition at line 41 of file GPS_Backend.cpp.

Referenced by AP_GPS_SIRF::_parse_gps(), and AP_GPS_MTK::read().

Here is the caller graph for this function:

◆ Write_DataFlash_Log_Startup_messages()

void AP_GPS_Backend::Write_DataFlash_Log_Startup_messages ( ) const
virtual

Reimplemented in AP_GPS_UBLOX.

Definition at line 166 of file GPS_Backend.cpp.

Referenced by is_healthy(), AP_GPS_UBLOX::Write_DataFlash_Log_Startup_messages(), and AP_GPS::Write_DataFlash_Log_Startup_messages().

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

Member Data Documentation

◆ gps

AP_GPS& AP_GPS_Backend::gps
protected

◆ port

AP_HAL::UARTDriver* AP_GPS_Backend::port
protected

◆ state

AP_GPS::GPS_State& AP_GPS_Backend::state
protected

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