An attitude and heading reference systems (AHRS) are widely used in tracking the fleet of wheeled vehicles as well as power tools supporting transport planning. Another functionality is post factum performance assessment for operations performed cyclically or in a certain sequence. In the literature, you can find a number of solutions of this type dedicated to wheeled transport, airplanes, agriculture, robotics, sports, film industry. Most of them require access to GPS and the question is how to localize in the underground condition where GPS access is unavailable? Of course, this is not a new problem. Many scientific works deal with inertial navigation dedicated to tunnels, underground mining excavations, sewers, and other similar applications. Most of them concern gyro drift and clearly underline the need to use the magnetometer signal to correct the estimated motion path with a Kalman filter or a complementary filter etc. The authors made many attempts to test the proposed solutions in the underground mine. Unfortunately, many factors translated into magnetic field disturbances, which had poor readings. The authors propose a low-cost solution based on the correction of the vehicle motion path estimated by integrating the gyro signal based on a digital map and the existing topology rules of the mine's road infrastructure. The article presents the methodology, along with the method of generalizing the digital map as well as an application of procedures on industrial data.