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 6469397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:59:08+00:00 2026-05-25T05:59:08+00:00

I need my app to perform different operations depending on how fast the person

  • 0

I need my app to perform different operations depending on how fast the person holding the phone is moving. I figured the best way to do this would be: (In pseudo code)

function mySpeed(){
    float speed = location.getSpeed();

    if(speed > minSpeed){
    // Do this
    }else{
    // Do that
    }
}

How well would getSpeed() work in this case? Is there a better way anyone can think of. Maybe accelerometer?

  • 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-25T05:59:09+00:00Added an answer on May 25, 2026 at 5:59 am

    The getSpeed() method is as accurate as the locations provided by the GPS. Depending on where you are this could be +/- walking speed in any direction. A better way would be to compute the speed over a larger direction if you can make that work. Get and save one location, then watch positions until the distance between the saved location and the current one is a few hundred meters, then use distance/timedifference to compute the speed.

    I can’t imagine that integrating the accelerometer over a long period of time (which you would have to do to compute speed) would be very accurate at all, but may be worth a try.

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

Sidebar

Related Questions

I really love the way Ajax makes a web app perform more like a
I'm learning Backbone.js for a new app I'm building. I need to perform an
I need to implement input validation throughout my winform app. There are many different
I am developing an App where I would need to perform HTTP Request using
my app need to show user scrollable menu bar under tab bar like fox
I need an app that sends an UDP packet to some network server and
I need my app to show as full screen. Now I know how to
In my app I need to draw a widget contents onto Bitmap. The code(pseudo)
I need a console app which will calling webmethod. It must be asynchronous and
My android app project need to add a new function of saving the click

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.