Before you can use the navigation service, you need a movement sensor that
provides GPS position and compass heading. This guide walks you through
choosing a GPS module, configuring it, and verifying the data is accurate
enough for navigation.
Choose a GPS module
Browse GPS-capable movement sensor models in the
Viam registry.
Search for your GPS hardware by manufacturer or chip name.
GPS accuracy and what it means for navigation
Standard GPS is accurate to approximately 3 meters under open sky. In
environments with trees, buildings, or uneven terrain, accuracy degrades
due to signal interference.
The navigation service’s plan_deviation_m parameter controls how far the
robot can drift from its planned path before replanning. If your GPS error
is 3 meters and plan_deviation_m is 2.6 meters (the default), the robot
will replan frequently because normal GPS jitter exceeds the threshold.
GPS type
Typical accuracy
Good plan_deviation_m range
Standard GPS
2-5 meters
5-10 meters
SBAS-enhanced GPS
1-3 meters
3-5 meters
RTK GPS
1-10 centimeters
0.5-2 meters
If your application requires sub-meter accuracy (following a precise path,
working near obstacles), look for RTK GPS modules in the registry.
Click the + button and select Configuration block.
Search for the model that matches your GPS hardware.
Name it (for example, my-gps) and click Create.
Configure the attributes as required by your module (serial port,
baud rate, I2C address, or network settings).
Click Save.
Verify GPS position
Before configuring navigation, confirm the movement sensor reports
accurate GPS data.
Find your movement sensor in the configuration view.
Expand the TEST section.
Check that position shows a latitude and longitude close to your
actual location.
Check that compass heading updates when you rotate the robot.
0 degrees is north, 90 is east, 180 is south, 270 is west.
If the position is significantly wrong or the compass heading doesn’t
change when you rotate the robot, check your wiring and module
configuration before proceeding.
Compass interference
The compass (magnetometer) in many GPS/IMU modules is sensitive to
magnetic interference from motors, metal structures, and power wiring.
Common symptoms:
Heading doesn’t change when the robot rotates.
Heading jumps erratically.
Heading is consistently offset by a fixed amount.
To reduce interference:
Mount the GPS module as far from motors and power wiring as practical.
Run magnetometer calibration if your module supports it (check the
module’s documentation in the registry).
Consider the
merged movement sensor
model, which combines data from multiple sensors. For example, use GPS
for position and a separately mounted IMU for heading.
Verify with code
Read position and heading programmatically to confirm the data is
available to your application code.