Central engineering reference and operations manual for the MRDT Autonomy Software.
View the Project on GitHub MissouriMRDT/Autonomy_Software
Return to RoveSoDocs Guides for Today, Tomorrow, and Forever.
The NavigationBoard driver (src/drivers/NavigationBoard.h & NavigationBoard.cpp) interfaces with the rover’s GPS receivers, RTK systems, and IMU compass to maintain ground-truth positioning.
constants::NAVBOARD_EASTING_OFFSET, NAVBOARD_NORTHING_OFFSET, and NAVBOARD_ALTITUDE_OFFSET.IsOutOfDate(), alerting the state machine if GPS packets drop for longer than constants::NAVBOARD_MAX_GPS_DATA_AGE.The driver registers RoveComm callbacks for two primary telemetry packets:
GPSLATLON: Contains double-precision latitude, longitude, altitude, and fix accuracy metrics.IMUDATA: Contains double-precision compass heading ($0^\circ$ to $360^\circ$ clockwise from North) and heading accuracy estimate in degrees.IsOutOfDate)GPS antennas can lose satellite lock, and network lines can experience dropped packets.
m_tmLastGPSUpdateTime.m_tmLastCompassUpdateTime.IsOutOfDate() method checks:
\(\Delta t_{\text{GPS}} = t_{\text{current}} - t_{\text{last GPS}}\)
\(\Delta t_{\text{compass}} = t_{\text{current}} - t_{\text{last compass}}\)
If $\Delta t_{\text{GPS}} > \text{constants::NAVBOARD_MAX_GPS_DATA_AGE}$ (default 3.0 seconds) or $\Delta t_{\text{compass}} > \text{constants::NAVBOARD_MAX_COMPASS_DATA_AGE}$, IsOutOfDate() returns true.NavigatingState continuously polls IsOutOfDate(). If true, the rover halts and logs critical warnings, preventing blind runaway.Telemetry arrives on the RoveCommUDP background thread while multiple autonomy threads (StateMachineHandler, GeoPlanner, VisualizationHandler, DriveBoard) read navigation state simultaneously.
std::shared_mutex instances:
m_muLocationMutexm_muHeadingMutexm_muVelocityMutexm_muAngularVelocityMutexstd::unique_lock), while getter methods acquire shared read locks (std::shared_lock), ensuring high throughput without data races.// Coordinate Getters
geoops::GPSCoordinate GetGPSData();
geoops::UTMCoordinate GetUTMData();
// Orientation & Kinematics
double GetHeading();
double GetHeadingAccuracy();
double GetVelocity();
double GetAngularVelocity();
// Freshness & Health
std::chrono::system_clock::duration GetGPSLastUpdateTime();
std::chrono::system_clock::duration GetCompassLastUpdateTime();
bool IsOutOfDate();