In order for our software to warn you about your distance (or rather lack thereof), we need to know how fast you are going. This is very important because for proper safety the faster you go, the more distance you should have between your vehicle and the vehicle in front of you.
So as a result we looked into calculating your speed. This is actually surprisingly simple, but you need to let our app. access your phone GPS system. By getting your position frequently, we can find out your vehicle speed within a second or so, which for our app. purpose is good enough.
As you know, your GPS gives us your coordinates on the Earth. Using these coordinates and the time when you were there, we can first calculate the distance be each point and so know how much distance you covered and since we know how much it took to go from one point to the next, we can calculate a speed in kilometers per seconds (you can choose to see mph on your phone).
Your speed is a very important parameter in our application since it tells us what the minimum distance between you and the vehicle in front of you should be at that moment. When shorter, the application warns you that you want to increase that distance for your personal safety.