Skip to content

Commit 99351ec

Browse files
committed
pbio/imu: Make heading positive clockwise.
Since both conventions are used in practice, we might as well make it match the default drive base behavior.
1 parent 2beddbc commit 99351ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbio/src/imu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ float pbio_imu_get_heading(void) {
220220

221221
pbio_geometry_vector_map(&pbio_orientation_base_orientation, &single_axis_rotation, &heading_mapped);
222222

223-
return heading_mapped.z - heading_offset;
223+
return -heading_mapped.z - heading_offset;
224224
}
225225

226226
/**

0 commit comments

Comments
 (0)