![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|
This class handles communication with the navigation board on the rover by sending RoveComm packets over the network. More...
#include <NavigationBoard.h>
Public Member Functions | |
NavigationBoard () | |
Construct a new Navigation Board:: Navigation Board object. | |
~NavigationBoard () | |
Destroy the Navigation Board:: Navigation Board object. | |
geoops::GPSCoordinate | GetGPSData () |
Accessor for most recent GPS data received from NavBoard. | |
geoops::UTMCoordinate | GetUTMData () |
Accessor for most recent GPS data received from NavBoard converted to UTM coords. | |
double | GetHeading () |
Accessor for the most recent compass heading received from the NavBoard. | |
double | GetHeadingAccuracy () |
Accessor for the most recent compass heading accuracy received from NavBoard. | |
double | GetVelocity () |
The rover's current velocity based off of the distance covered over the last two GPSCoordinates. | |
double | GetAngularVelocity () |
The rover's current angular velocity based off of the change in angle over the last two headings. | |
std::chrono::system_clock::duration | GetGPSLastUpdateTime () |
A chrono timestamp storing the last time autonomy's GPS location was updated over RoveComm via the NavBoard. | |
std::chrono::system_clock::duration | GetCompassLastUpdateTime () |
A chrono timestamp storing the last time autonomy's compass location was updated over RoveComm via the NavBoard. | |
bool | IsOutOfDate () |
Checks if any of the navboard data is out of date. Expired data depends on constants::NAVBOARD_MAX_COMPASS_DATA_AGE. | |
Private Attributes | |
geoops::GPSCoordinate | m_stLocation |
double | m_dHeading |
double | m_dHeadingAccuracy |
double | m_dVelocity |
double | m_dAngularVelocity |
std::shared_mutex | m_muLocationMutex |
std::shared_mutex | m_muHeadingMutex |
std::shared_mutex | m_muVelocityMutex |
std::shared_mutex | m_muAngularVelocityMutex |
std::chrono::system_clock::time_point | m_tmLastGPSUpdateTime |
std::chrono::system_clock::time_point | m_tmLastCompassUpdateTime |
bool | m_bNavBoardOutOfDate |
const std::function< void(const rovecomm::RoveCommPacket< double > &, const sockaddr_in &)> | ProcessGPSData |
Callback function that is called whenever RoveComm receives new GPS data. | |
const std::function< void(const rovecomm::RoveCommPacket< float > &, const sockaddr_in &)> | ProcessAccuracyData |
Callback function that is called whenever RoveComm receives new Accuracy data. | |
const std::function< void(const rovecomm::RoveCommPacket< float > &, const sockaddr_in &)> | ProcessCompassData |
Callback function that is called whenever RoveComm receives new Compass data. | |
This class handles communication with the navigation board on the rover by sending RoveComm packets over the network.
NavigationBoard::NavigationBoard | ( | ) |
Construct a new Navigation Board:: Navigation Board object.
NavigationBoard::~NavigationBoard | ( | ) |
Destroy the Navigation Board:: Navigation Board object.
geoops::GPSCoordinate NavigationBoard::GetGPSData | ( | ) |
Accessor for most recent GPS data received from NavBoard.
geoops::UTMCoordinate NavigationBoard::GetUTMData | ( | ) |
Accessor for most recent GPS data received from NavBoard converted to UTM coords.
double NavigationBoard::GetHeading | ( | ) |
Accessor for the most recent compass heading received from the NavBoard.
double NavigationBoard::GetHeadingAccuracy | ( | ) |
Accessor for the most recent compass heading accuracy received from NavBoard.
double NavigationBoard::GetVelocity | ( | ) |
The rover's current velocity based off of the distance covered over the last two GPSCoordinates.
double NavigationBoard::GetAngularVelocity | ( | ) |
The rover's current angular velocity based off of the change in angle over the last two headings.
std::chrono::system_clock::duration NavigationBoard::GetGPSLastUpdateTime | ( | ) |
A chrono timestamp storing the last time autonomy's GPS location was updated over RoveComm via the NavBoard.
std::chrono::system_clock::duration NavigationBoard::GetCompassLastUpdateTime | ( | ) |
A chrono timestamp storing the last time autonomy's compass location was updated over RoveComm via the NavBoard.
bool NavigationBoard::IsOutOfDate | ( | ) |
Checks if any of the navboard data is out of date. Expired data depends on constants::NAVBOARD_MAX_COMPASS_DATA_AGE.
|
private |
Callback function that is called whenever RoveComm receives new GPS data.
|
private |
Callback function that is called whenever RoveComm receives new Accuracy data.
|
private |
Callback function that is called whenever RoveComm receives new Compass data.