I've been working on converting OBD device output—specifically latitude and longitude positions—into a valid SUMO route. I tested several approaches suggested in the SUMO documentation, but encountered multiple errors along the way. The only method that worked
reliably was creating a trip using the lat/lon data from a CSV file and then converting this trip into a valid route using the duarouter tool:
'''
duarouter -n teste.net.xml -t trip_from_gps.xml -o route.rou.xml --mapmatch.distance 50 --repair
'''
While this process successfully generates a valid route, the resulting trajectories are often inaccurate. For instance, the vehicle may perform unrealistic loops or even move backward when it should be going forward.
My question is: are there any recommended tools or preprocessing steps to filter or clean OBD data before converting it to a SUMO route? Is there a more accurate or reliable workflow for this task?
My ultimate goal is to take an OBD dataset—with latitude, longitude, speed, acceleration, etc.—and reproduce this driving pattern as faithfully as possible within SUMO.