GPS Sensor#
Introduction#
The V5 GPS (Game Positioning System™) Sensor provides accurate position and orientation tracking for a robot on the VEX Field. It uses the GPS Field Code around the Field’s perimeter to calculate the robot’s X and Y coordinates and heading in real time.
The GPS Sensor returns the robot’s position using a reference point automatically calculated from the offsets entered when configuring the GPS Sensor in the Devices window.
For more information about the GPS Sensor, read Using the GPS Sensor with VEX V5 in the VEX Library.
The reference point acts as the GPS Sensor’s own (0, 0) position where all coordinates, headings, and movements returned by GPS blocks are relative to this configured point.

Below is a list of available blocks:
calibrate GPS – Calibrates the GPS Sensor to set its heading as the current drivetrain heading.
set GPS location – Sets the reference point’s position and heading on the Field.
GPS position – Returns the reference point’s x or y coordinate on the Field.
GPS heading – Returns the reference point’s heading based on the Field orientation.
GPS acceleration – Returns the robot’s acceleration on a selected axis.
GPS gyro rate – Returns the robot’s rotational speed on a selected axis.
GPS orientation – Returns the robot’s roll, pitch, or yaw orientation in degrees.
GPS signal quality – Returns the signal strength of the GPS Sensor.
when GPS heading changed – Runs the attached stack whenever the GPS Sensor detects a change in heading.
calibrate GPS#
The calibrate GPS block calibrates the reference point, setting its configured heading as the current drivetrain heading. During this time, the robot must remain completely still as movement during calibration will produce inaccurate results.
calibrar [GPS 1 v]
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
set GPS location#
The set GPS location block sets the position and heading of the reference point on the Field manually. This can be done to help reduce inaccuracies if the GPS Sensor is too close to the Field’s walls on startup to get a sufficient amount of the GPS Field Code in its view.

Establezca la ubicación [GPS 1 v] en [0] [0] [mm v] y [0] grados
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
x |
The x coordinate of the reference point on the Field. |
y |
The y coordinate of the reference point on the Field. |
coordinates unit |
The unit of measurement for the x and y coordinates:
|
heading |
The heading the reference point is facing relative to the absolute Field heading from 0 to 359.9 degrees. |
GPS position#
The GPS position block returns the reference point’s x or y coordinate on the Field.
([GPS 1 v] posición [X v] en [mm v])
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
axis |
Which axis to use:
|
unit |
The unit of measurement:
|
GPS heading#
The GPS heading block returns the reference point’s heading based on the Field’s orientation from 0 to 359.9 degrees.
The heading corresponds to the absolute Field heading, which is a range of 0º to 359.9º in the clockwise direction. The 0º is in the 12 o’clock position.

([GPS 1 v] rumbo en grados)
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
GPS acceleration#
The GPS acceleration block returns the robot’s acceleration on a specified axis from -4.0 to 4.0 Gs.
([GPS 1 v] aceleración de [X v] eje en g)
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
axis |
Which axis to use:
|
GPS gyro rate#
The GPS gyro rate block returns the robot’s rotational speed on a selected axis.
([GPS 1 v] velocidad de giro de [X v] eje en [dps v])
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
axis |
Which axis to use:
|
unit |
The unit of measurement:
|
GPS orientation#
The GPS orientation block returns the robot’s roll, pitch, or yaw orientation in degrees.
([GPS 1 v] orientación de [rollo v] en grados)
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
orientation |
Which orientation to return:
|
GPS signal quality#
The GPS signal quality block returns the signal strength of the GPS Sensor as a percent.
Possible Values |
Description |
|---|---|
100 |
All reported positional and heading data from the GPS Sensor is valid. |
~90 |
Any positional data is no longer being calculated by capturing information from the GPS Field Code, but rather through alternative means. |
0 - 80 |
Only GPS Sensor heading values are valid, but as more time goes by where a GPS Sensor is not scanning enough of the GPS Field Code to accurately determine position and heading information, the reported signal quality will continue to drop until 0, where any GPS Sensor data is effectively frozen and no longer valid. |
([GPS 1 v] calidad de señal en %)
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |
when GPS heading changed#
The when GPS heading changed block runs the attached stack whenever the GPS Sensor detects a change in heading.
cuando cambió el rumbo [GPS 1 v] :: hat events
Parameters |
Description |
|---|---|
device |
Which GPS Sensor to use, configured in the Devices window. |