Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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. -
A-C-E57028y@Christine are accelerometers not super accurate?
I have a GitHub repo if u want to see my progress...
Http://github.com/DeveloperACE/... -
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/... -
@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. -
@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. -
xroad23808y@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
-
@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. -
A-C-E57028y@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? -
@DeveloperACE Direction. Both ordinal (North, South, East, West) and vertical (up and down) will fuck up your calculations.
-
@dfox The git hub link works for me now, but my Google link still does not. Have fun debugging this one!
-
xroad23808y@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.
-
A-C-E57028y@xroad im not trying to use this for navigation, just a simple speedometer... (Probably not relevant but whatever)
-
A-C-E57028ySo how much fluctuation can i expect from this ?
From what i understand the data will get less accurate the longer the program runs... -
PRein11878yYou 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. -
lig114458y@DeveloperACE nothing that keep accumulating the error like continuous incremental calculations can compete with a sensor even as inaccurate as GPS is.
-
How is it possible to use accelerometer to measure speed, esp if phone is inside a moving vehicle? There is no relative motion..
-
PRein11878y@HoloDreamer if you start the measurement from still position it's theoretically possible. Or maybe take the speed from gps as a starting point.
-
A-C-E57028yWhat if i used the differences between two accelerometer readings and added thise repeatedly instead...
-
PRein11878y@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. -
A-C-E57028y@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...
-
PRein11878y@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 -
A-C-E57028y@PRein i dont need to. I can make the version on GitHub say 100 within a few seconds while sitting at my computer
-
dfox428278y@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 :/
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
undefined
speedometer
accelerometer