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

#include <AP_Beacon_Marvelmind.h>

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

Classes

struct  MarvelmindHedge
 
struct  PositionValue
 
struct  StationaryBeaconPosition
 
struct  StationaryBeaconsPositions
 

Public Member Functions

 AP_Beacon_Marvelmind (AP_Beacon &frontend, AP_SerialManager &serial_manager)
 
bool healthy ()
 
void update ()
 
- Public Member Functions inherited from AP_Beacon_Backend
 AP_Beacon_Backend (AP_Beacon &frontend)
 
void set_vehicle_position (const Vector3f &pos, float accuracy_estimate)
 
void set_beacon_distance (uint8_t beacon_instance, float distance)
 
void set_beacon_position (uint8_t beacon_instance, const Vector3f &pos)
 
float get_beacon_origin_lat (void) const
 
float get_beacon_origin_lon (void) const
 
float get_beacon_origin_alt (void) const
 

Private Types

enum  { RECV_HDR, RECV_DGRAM }
 

Private Member Functions

uint16_t calc_crc_modbus (uint8_t *buf, uint16_t len)
 
StationaryBeaconPositionget_or_alloc_beacon (uint8_t address)
 
void process_beacons_positions_datagram ()
 
void process_beacons_positions_highres_datagram ()
 
void process_position_highres_datagram ()
 
void process_position_datagram ()
 
void process_beacons_distances_datagram ()
 
void set_stationary_beacons_positions ()
 
void order_stationary_beacons ()
 
int8_t find_beacon_instance (uint8_t address) const
 

Private Attributes

enum AP_Beacon_Marvelmind:: { ... }  parse_state
 
MarvelmindHedge hedge
 
uint8_t input_buffer [AP_BEACON_MARVELMIND_BUF_SIZE]
 
uint16_t num_bytes_in_block_received
 
uint16_t data_id
 
AP_HAL::UARTDriveruart
 
uint32_t last_update_ms
 
Vector3f vehicle_position_NED__m
 
bool vehicle_position_initialized
 
Vector3f beacon_position_NED__m [AP_BEACON_MAX_BEACONS]
 
bool beacon_position_initialized
 

Additional Inherited Members

- Protected Member Functions inherited from AP_Beacon_Backend
Vector3f correct_for_orient_yaw (const Vector3f &vector)
 
- Protected Attributes inherited from AP_Beacon_Backend
AP_Beacon_frontend
 
int16_t orient_yaw_deg
 
float orient_cos_yaw = 0.0f
 
float orient_sin_yaw = 1.0f
 

Detailed Description

Definition at line 27 of file AP_Beacon_Marvelmind.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
RECV_HDR 
RECV_DGRAM 

Definition at line 72 of file AP_Beacon_Marvelmind.h.

Constructor & Destructor Documentation

◆ AP_Beacon_Marvelmind()

AP_Beacon_Marvelmind::AP_Beacon_Marvelmind ( AP_Beacon frontend,
AP_SerialManager serial_manager 
)

Definition at line 42 of file AP_Beacon_Marvelmind.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ calc_crc_modbus()

uint16_t AP_Beacon_Marvelmind::calc_crc_modbus ( uint8_t *  buf,
uint16_t  len 
)
private

Definition at line 65 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ find_beacon_instance()

int8_t AP_Beacon_Marvelmind::find_beacon_instance ( uint8_t  address) const
private

Definition at line 228 of file AP_Beacon_Marvelmind.cpp.

Referenced by process_beacons_distances_datagram().

Here is the caller graph for this function:

◆ get_or_alloc_beacon()

AP_Beacon_Marvelmind::StationaryBeaconPosition * AP_Beacon_Marvelmind::get_or_alloc_beacon ( uint8_t  address)
private

Definition at line 120 of file AP_Beacon_Marvelmind.cpp.

Referenced by process_beacons_positions_datagram(), and process_beacons_positions_highres_datagram().

Here is the caller graph for this function:

◆ healthy()

bool AP_Beacon_Marvelmind::healthy ( void  )
virtual

Implements AP_Beacon_Backend.

Definition at line 361 of file AP_Beacon_Marvelmind.cpp.

Here is the call graph for this function:

◆ order_stationary_beacons()

void AP_Beacon_Marvelmind::order_stationary_beacons ( )
private

Definition at line 409 of file AP_Beacon_Marvelmind.cpp.

Referenced by process_beacons_positions_datagram(), and process_beacons_positions_highres_datagram().

Here is the caller graph for this function:

◆ process_beacons_distances_datagram()

void AP_Beacon_Marvelmind::process_beacons_distances_datagram ( )
private

Definition at line 201 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

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

◆ process_beacons_positions_datagram()

void AP_Beacon_Marvelmind::process_beacons_positions_datagram ( )
private

Definition at line 135 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

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

◆ process_beacons_positions_highres_datagram()

void AP_Beacon_Marvelmind::process_beacons_positions_highres_datagram ( )
private

Definition at line 165 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

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

◆ process_position_datagram()

void AP_Beacon_Marvelmind::process_position_datagram ( )
private

Definition at line 83 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ process_position_highres_datagram()

void AP_Beacon_Marvelmind::process_position_highres_datagram ( )
private

Definition at line 100 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

Here is the caller graph for this function:

◆ set_stationary_beacons_positions()

void AP_Beacon_Marvelmind::set_stationary_beacons_positions ( )
private

Definition at line 367 of file AP_Beacon_Marvelmind.cpp.

Referenced by update().

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

◆ update()

void AP_Beacon_Marvelmind::update ( void  )
virtual

Implements AP_Beacon_Backend.

Definition at line 238 of file AP_Beacon_Marvelmind.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ beacon_position_initialized

bool AP_Beacon_Marvelmind::beacon_position_initialized
private

Definition at line 103 of file AP_Beacon_Marvelmind.h.

Referenced by set_stationary_beacons_positions(), and update().

◆ beacon_position_NED__m

Vector3f AP_Beacon_Marvelmind::beacon_position_NED__m[AP_BEACON_MAX_BEACONS]
private

Definition at line 102 of file AP_Beacon_Marvelmind.h.

Referenced by set_stationary_beacons_positions().

◆ data_id

uint16_t AP_Beacon_Marvelmind::data_id
private

Definition at line 80 of file AP_Beacon_Marvelmind.h.

Referenced by AP_Beacon_Marvelmind(), and update().

◆ hedge

MarvelmindHedge AP_Beacon_Marvelmind::hedge
private

◆ input_buffer

uint8_t AP_Beacon_Marvelmind::input_buffer[AP_BEACON_MARVELMIND_BUF_SIZE]
private

◆ last_update_ms

uint32_t AP_Beacon_Marvelmind::last_update_ms
private

◆ num_bytes_in_block_received

uint16_t AP_Beacon_Marvelmind::num_bytes_in_block_received
private

Definition at line 79 of file AP_Beacon_Marvelmind.h.

Referenced by AP_Beacon_Marvelmind(), and update().

◆ parse_state

enum { ... } AP_Beacon_Marvelmind::parse_state

Referenced by AP_Beacon_Marvelmind(), and update().

◆ uart

AP_HAL::UARTDriver* AP_Beacon_Marvelmind::uart
private

Definition at line 94 of file AP_Beacon_Marvelmind.h.

Referenced by AP_Beacon_Marvelmind(), and update().

◆ vehicle_position_initialized

bool AP_Beacon_Marvelmind::vehicle_position_initialized
private

Definition at line 99 of file AP_Beacon_Marvelmind.h.

Referenced by set_stationary_beacons_positions(), and update().

◆ vehicle_position_NED__m

Vector3f AP_Beacon_Marvelmind::vehicle_position_NED__m
private

Definition at line 98 of file AP_Beacon_Marvelmind.h.

Referenced by set_stationary_beacons_positions().


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