GPS programing: I'm getting a callback every second or so with latitude and longitude. What's a good rule of thumb for calculating "current speed", and other derived values? -


(I think this question is platform independent, but I have to be coding for the Nexus One).

About "current speed": I am getting every other callback or telling me how much my current latitude and longitude is, I can call the distance between the current location and the previous location I am, therefore, I can keep track of cumulative distance and cumulative. With this I can say what is the average speed for the entire journey, but how can I do the current pace? I suspect that I need to use recent N samples, right? Am I thinking about this right? What is a good rule of thumb for N? (How many samples, or how many seconds back?)

"Time to shut down": If I am still standing, then I can be a little different latitude and underline, okay? So, to decide that I'm not really saying anything like "x x locks are all within one meter of each other", right? Am I thinking about this right? What is a good rule of thumb for X and Y?

Even about "distance": am I not able to understand it because I am really cutting corners? Is there an algorithm, thumb rule for determining whether I am "turning" and adding it to some frustration?

EDIT: I feel bad about wasteing people time and well, but unfortunately, the device IS is pushing me I thought That was not because it was not in the emulator, but on the real device it is. Thanks to all. There are still some code-rules that I have to write, but speed was the biggest challenge.

EDIT: I apologize, in my original question I had written that the distance is also derived value. If I only use raw GPS data, then I will remove the distances due to mistakes. I can run on a straight line, but the use of raw GPS will continue for a long time, so if I distance between points By measuring the total distance, I will overstate it. Here are some links that are related to this problem.




about current speed Most GPS devices send you this information on their own


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -