I want to measure distance travelled in a moving car from an android app. The distance is typically between (0-60 metres). How can I calculate the distance using sensors on an android device.
Thanks.
Technique to measure distance from android app (between 0-60 mts)
1.1k views Asked by piXel_pRo AtThere are 2 answers
Svj0hn
On
You could (try) to integrate accelerometer values, but as Gabe Sechan said, it'll be mostly hopeless. If you spend some time analyzing your accelerometer and calibrating it manually (by this I mean compensating by your measured bias and scaling errors) you can reduce the error, but you're still stuck with a (significant) growing error that gets worse quicker over time.
As a side note, if you're constantly turning (say, in a spiral ramp), you can get the velocity directly from a combination of gyroscope and accelerometer (basically combining equations of centripetal motion "a = v^2 / r" and angular velocity "v = w * r" to get "v^2 = a^2 / w^2"). I've tried doing this with an Android device, and as long as the angular velocity "w" is high enough, the values returned are very consistent and fairly accurate (and the error doesn't grow exponentially with time as when integrating acceleration data twice).
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in ACCELEROMETER
- Wheel rotation frequency from accelerometer data
- Andriod phone accelerometer reading: native code vs. Android API
- Calculate Velocity from Accelerometer of Android Phone
- Buffersize to small
- Convert IMU data into trajectory data
- ERROR in rc_mpu_calibrate_accel_routine, center of fitted ellipsoids(in beagle bone blue)
- How to implement EKF (Extended Kalman filter) for INS GPS sensor fusion in a mobile application?
- Velocity from Accelerometer data
- Calculating pitch and roll from XYZ accelerometer data collected from a wildlife collar
- MC3635 convert Gs to delta and mux for interupt threshold
- problem with the Majwick filter when processing data from the gyroscope
- How to calculate device translation from accelerometer values?
- Extracting IMU sensitivity/accelerometer scale range in an app
- Accelerometer shows the same exact behavior as roll, pitch and yaw extracted from gyroscope
- Function for shaking the phone on the PWA mobile application
Related Questions in ANDROID-SENSORS
- The BH1750 fails to be configured
- Assigning sensor information to image coordinates
- Device pose android emulator rotation values to App
- proximity sensor permission in android app
- I cannot programatically access files on my rooted Galaxy s10+
- Workaround for TYPE_STEP_COUNTER onSensorChanged not triggered in background
- LibGDX camera rotation does not work on Android
- How do I use coroutines in my Kotlin code to read in phone sensor data one by one?
- There is a way to know if other application is using a sensor [Android]
- How to add fixed delay in sensors readings in kotlin?
- Samsung Galaxy Note 9: sensors: wrote an app that reads all sensors, asks for BODY_SENSORS permissions, displays heartrate, how to display SpO2?
- Custom Rotation observer which works like ActivityInfo.SCREEN_ORIENTATION_SENSOR (android:screenOrientation="sensor") in Activities
- How to measure radiation(Non Ionizing) [Android SDK] for a Radiation measuring application
- can someone help me with accessing RGB values on my smart-phone light sensor via Android studio?
- Android Auto Car Sensors: unavailable when testing on a real car
Related Questions in GYROSCOPE
- Convert IMU data into trajectory data
- How to visualize data from a 6-axis gyroscope using a 3D model in WPF?
- Velocity from Accelerometer data
- problem with the Majwick filter when processing data from the gyroscope
- Can I get the gyroscope data from my phone to make a makeshift racing sim rig for pc
- Accelerometer shows the same exact behavior as roll, pitch and yaw extracted from gyroscope
- Calculating precise heading using raw magnetometer, accelerometer and gyroscope data
- Simulating Gyroscope with ARW, BI, and Spectral Density Using Physical IMU Data
- MPU6050 raw z-axis data is always zero
- How to know if mobile is tilted upward or downward in Android?
- How can I have Android on the RasPi with Accel/Gyro?
- run ADIS16465-1BMLZ on raspberry pi 4 with kuiper linux
- How to ensure stability on all device that can use the Android TYPE_GAME_ROTATION_VECTOR sensor
- MPU6050 Quaternion calculation with stm32
- Unity iOS gyroscope always returns constant value
Related Questions in COMPASS
- Is it possible to place the bearing angle on compass image?
- How to add my destination bearing angle with respect to compass in kotlin
- Not able to connect mongo with replica set to mongo compass
- Unity Compass is not adjusted to the gyroscope
- Compare fields in a document Using MongoDB Compass
- How to proxy access mongoDB through ssh tunnel in code?
- Angle jump in reverse direction at points 179 degree to -179 degree and -179 to 179 degree while making compass app in android studio
- Why my animation doesn't work for a compass made in SwiftUI
- MongoDB Compass filter dynamic array
- ScrollView content offset freezes compass
- Magnetometer Heading Calculation?
- Android compass calibration without moving
- How to Animate Compass in Flutter
- The Flex Items Seem to Inherit a Height Property From a Form That I Can't Find
- Android RotateAnimation: rotate compass smoothly
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Your best bet is GPS. Get the location of the start and finish and use Location.distanceTo.
If you mean you want to try and calculate when you start and stop as well- I'd look for a siginificant acceleration event and correlate with GPS position at those times.
If you mean you want to not use GPS at all- give up now. The sensors are far too noisy to try and solve using acceleration equations.