6
A-C-E
4y

Has anyone ever tried to use a devices accelerometer to determine speed before?

The way i plan to do it, it should be more accurate than using GPS. Just wondering if anyone has ever done something similar that i can use

Comments
  • 6
    Your calculations will only be as accurate as the data the accelerometer gives you.

    So, not very accurate.

    Plus there's other problems, like the fact that the user probably won't be traveling in a straight line.

    Not to rain on your parade, but this is beyond non-trivial.
  • 0
    @Christine are accelerometers not super accurate?

    I have a GitHub repo if u want to see my progress...

    Http://github.com/DeveloperACE/...
  • 2
    Correct, its accuracy is unreliable. As for your github, I'm already tapped out for the night, so I'll give it a pass

    But here's a SO article that seems relevant.

    http://stackoverflow.com/questions/...
  • 2
    @dfox Possible Android bug? OP's original comment did not have a link. He edited it, added a link, and I can't click it.

    Will test here. Http://www.google.com

    Yep, links added to post in modification are not clickable.
  • 0
  • 0
    @DeveloperACE Not your fault, it's a dev rant bug.

    Anyway, look at the comments in that link I shared. Then follow the SO comment link for the academic article "An introduction to inertial navigation". It will be very illuminating.
  • 0
    @Christine so its so inaccurate that this entire thing won't work?
  • 1
    @Christine is correct. Accelerometers are wildly inaccurate, especially for speed. For a lot of phones even GPS can be inaccurate less than 10 - 20 meters
  • 0
    @DeveloperACE If the goal is navigation? Basically, yes, the inaccuracies would compound so quickly as to render it useless.

    However, it doesn't mean you shouldn't try! If it's a project that interests you, you can still do it, even if it doesn't actually function correctly, from bad data. And other reasons, like calculus. It will certainly be a good learning experience.
  • 1
    (also, re the bug: leaving this rant and coming back made the links clickable?)
  • 0
    @Christine its just my attempt to make a better speed tracking app than GPS like @xroad mentioned...

    My idea is to repeatedly add the acceleration values (after negating gravity) into one variable, so positive acceleration will increase it and negative will decrease it. Any major flaws in this besides the inaccuracy? Won't it somehow negate itself when decellerating?
  • 1
    @DeveloperACE Direction. Both ordinal (North, South, East, West) and vertical (up and down) will fuck up your calculations.
  • 0
    @Christine thank you, I'll look into this.
  • 0
    @dfox The git hub link works for me now, but my Google link still does not. Have fun debugging this one!
  • 1
    @DeveloperACE yeah that'll be worse than GPS. At least GPS will (attempt to) correct itself. Accelerometer will just keep compounding the errors. Error in rate of acceleration != error of deceleration always. In either case if the acceleration is wrong you'll be marked on the wrong long/lat anyway, so even if they were equal it wouldn't matter.
  • 0
    @xroad im not trying to use this for navigation, just a simple speedometer... (Probably not relevant but whatever)
  • 0
    So how much fluctuation can i expect from this ?

    From what i understand the data will get less accurate the longer the program runs...
  • 1
    You get the idea. Now think.. Every time the sensor makes a mistake, it is there to stay. You need a lot of samples per minute to try being accurate. More samples, more mistakes.
    Sadly I beleived it is possible 4 years ago and got dissapointed by this integration stuff real quick.
  • 1
    @DeveloperACE nothing that keep accumulating the error like continuous incremental calculations can compete with a sensor even as inaccurate as GPS is.
  • 0
    How is it possible to use accelerometer to measure speed, esp if phone is inside a moving vehicle? There is no relative motion..
  • 0
    @HoloDreamer if you start the measurement from still position it's theoretically possible. Or maybe take the speed from gps as a starting point.
  • 0
    @HoloDreamer the phone experiences the same acceleration as the car
  • 0
    What if i used the differences between two accelerometer readings and added thise repeatedly instead...
  • 0
    @DeveloperACE In the hopes of them being wring in different directions? You can definitely try. You are still accumulating error though. Even if the error might be smaller this time.

    Btw, dont let all these things stop you from experimenting. Nothing beats your own experience.
  • 0
    @PRein i don't really care if the error is small, as long as it doesn't keep compounding. i just want to get an accurate speed +- 1mph ish...
  • 0
    @DeveloperACE is there any way to somehow counter the error?
  • 0
    @dfox just got an alert for mentioning myself ^. Bug?
  • 0
    @DeveloperACE when i mentioned the error being small I meant thatthe sampling errors will be smaller. These errors you sum and they only get bigger with time.
    I'd be glad if you try a simple test with a phone and a bike (or anything with a presice speedmeter) and show us a result
  • 0
    @PRein with my app or another app?
  • 0
    @DeveloperACE your app.
  • 0
    @PRein i dont need to. I can make the version on GitHub say 100 within a few seconds while sitting at my computer
  • 1
    @Christine I have this fixed for the next version. It was an Android-only issue where for some reason the open URL functionality won't work if http is capital or something :/
Add Comment