Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A "speedometer" that doesn't use GPS

How to calculate speed without requiring GPS? I have heard of something called "sensor technology" but am not sure what that means. I am asking because I want to make an app, but I don't think it is battery efficient to use GPS, plus it is for a long-term project so I want the app to continuously run without having to manually turn it on or turn on GPS.

like image 588
Mike Yeah Avatar asked Mar 27 '26 14:03

Mike Yeah


2 Answers

GPS is by far the most accurate way to do this.

You can get access to the accelerometers, but they are not remotely accurate enough for this type of application.

The only other way I can think of would be to get one of those bluetooth adapters that you plug into your car's diagnostic port, and get the speedometer input from there. Then, you're wasting power on bluetooth as well.

Just buy a power adapter for your phone to run on the vehicle.

like image 195
Brad Avatar answered Mar 29 '26 07:03

Brad


I tried to measure the speed using Android's accelerometer sensor for an indoor-navigation project but that failed miserably. I intented to derive the current speed from the acceleration/deceleration over time and so in the end calculate movements along the X, Y and Z-axis, but that didn't work out at all. The accelerometer sensors of common Android devices are way too inaccurate for that kind of usage.

So, you will have to use GPS. To reduce battery drain, you can increase the intervals (time and/or distance) in which the LocationManager notifies your App. See the minTime and minDistance parameters of it's requestLocationUpdates() method.

like image 36
Ridcully Avatar answered Mar 29 '26 08:03

Ridcully



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!