Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 564705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:47:42+00:00 2026-05-13T12:47:42+00:00

(I think this question is platform independent, but I happen to be coding for

  • 0

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

About “current speed”: I’m getting a callback every second or so telling me what my current latitude and longitude are. I can calc the distance between the current location and the previous location, so I can keep track of cumulative distance and cumulative time. With that I can say what the average speed has been for the ENTIRE trip.

But how do I calc current speed? I suspect I need to use the most recent N samples, right? Am I thinking about this the right way? What’s a good rule of thumb for N? How many samples, or how many seconds back?

About “stop time”: If I’m just standing still, I can still get slightly different latitudes and longitudes reported to me, right? So, deciding that I’m not really moving means saying something like, “the previous X locs have all been within Y meters of each other”, right? Am I thinking about this the right way? What’s a good rule of thumb for X and Y?

Even about “distance”: Will I be understating it because I’m literally cutting corners? Is there an algorithm or a rule of thumb, for determining when I’m “turning” and should I add in a little fudge?

EDIT: I APOLOGIZE: I feel bad about wasting people’s time and good will, but sadly, the device IS giving me speed. I thought it wasn’t because in the emulator it wasn’t, but on the real device it is. Thanks everybody. There’s still some rule-of-thumb code I need to write, but speed was the biggest challenge.

EDIT: I retract the apology. In my original question I wrote that distance too is a derived value. If I just use the raw GPS data, I will be overstating distance because of the inaccuracies. I might be walking a straight line, but the raw GPS lat/long will wobble, so if I calc total distance by measuring the distance between the points, I will be overstating it. Here’s some links that are related to this problem.

Smooth GPS data
http://www.cs.unc.edu/~welch/kalman/Levy1997/index.html
How to intelligently degrade or smooth GIS data (simplifying polygons)?
How to 'smooth' data and calculate line gradient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:47:43+00:00Added an answer on May 13, 2026 at 12:47 pm

    about the current speed: most gps devices send you this information on their own

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.