GPS and Compass Hardware
The BN880 board combines a GPS receiver with an HMC5883L-compatible magnetometer. The current navigation runtime consumes GPS fixes from the UART. Compass reading is available in a separate bench utility but is not integrated into the live route manager, so the docs do not claim live compass-based heading control.
Parts (Amazon)
- BN880 GPS Module with HMC5883L — $33.98
How It Works
navigation.pyopens the GPS on/dev/ttyAMA0at9600baud and reads NMEA sentences line by line (GPS_PORT,GPS_BAUD).- Parsed fixes can be passed to the route manager and snapped to a graph vertex in
trossachs_nav_graph.json. The A* planner routes over that graph and divides the route into AI and manual segments with crosswalk handoffs. code/test_files/sensors/bn880_test.pycan read the magnetometer over I2C for bench verification. That test path is separate fromnavigation.py.
Why This Choice
- The BN880 packages GPS and compass hardware on one board, which keeps the physical sensor assembly compact even though the current runtime uses only the GPS path.
- UART at 9600 baud is the standard, low-overhead interface for NMEA GPS and does not compete with the higher-rate LiDAR or camera buses.
Verify Before a Run
- Bench test:
code/test_files/sensors/bn880_test.pyreads the module and prints fixes and compass data. - Failure symptoms: permission denied on
/dev/ttyAMA0can mean the serial console, device permissions, or another process owns the port. Do not confuse this port with the LiDAR: GPS is/dev/ttyAMA0; the LiDAR uses a CP2102 UART-to-USB Adapter.