Rail quality decreases directly in proportion to the operating time of the train since the rail is loaded from the train wheels. Railroad tracks are inspected by PPJ (Track Inspector) by using a track gauge master to measure slope. Manually operated devices cause PPJ to run along the railroad between stations, causing accidents and requiring relatively long operating times. Using a device that measures the slope of railroad tracks is a more effective solution to these problems. The device uses a gyroscope sensor and GPS module to locate non-standard rails. A complementary filter is applied to the converted pitch and roll values. A slope measuring instrument was used to test the accuracy of pitch and roll angles. Gyroscope sensors are calibrated to prevent measurement errors (errors). Based on the results, the gyroscope sensor had an accuracy error of 0.20° in pitch and 0.27° in a roll. A complementary filter reduces error accuracy to 0.06° for pitch and 0.08° for roll. Its accuracy compared to smartphone GPS is 5.38 meters, while its accuracy compared to the actual location is 7.74 meters.