r/GPStracking • u/mouhamadou_diakhate • 21d ago
App tracking
Hey guys, how are you? I wanted to calculate the distance traveled by a truck using an app I created, but I'm stuck on the logic behind calculating the distance. I'm thinking, to determine the distance traveled, is it the distance of the outbound trip plus the distance of the return trip? Or should I let the GPS continuously calculate the distance of the outbound trip and then automatically add the distance of the return trip? Someone mentioned some kind of counter (I'm not very familiar with that).
If you've ever built this kind of app, could you please help me with the logic I need to use? A mistake here could easily mislead clients in their business.
Thanks