For navigation tasks like yours, considering an IMU with a magnetometer, gyroscope, and accelerometer would be beneficial for providing absolute heading data and overall orientation.
Some popular options in the Arduino community include the MPU-9250 or BNO055, which can be used with libraries that simplify data processing and sensor fusion: