accelerometer

Vertical movement sensor

我们两清 提交于 2019-12-01 16:12:46
问题 I am working on an android app that requires the detection of vertical motion. When moving the tablet upward, the Gyroscope, Accelerometer, and Linear Acceleration sensors give a corresponding value indicating upward or downward motion. The problem I have is that these sensors will also read an upward/downward motion when you tilt the tablet towards the user or away from the user. For example, the x value in the gyroscope represents the vertical plane. But when you tilt the device forwards,

FFT and accelerometer data: why am I getting this output?

一笑奈何 提交于 2019-12-01 11:58:23
I have read various posts here at StackOverflow regarding the execution of FFT on accelerometer data, but none of them helped me understand my problem. I am executing this FFT implementation on my accelerometer data array in the following way: int length = data.size(); double[] re = new double[256]; double[] im = new double[256]; for (int i = 0; i < length; i++) { input[i] = data[i]; } FFT fft = new FFT(256); fft.fft(re, im); float outputData[] = new float[256]; for (int i = 0; i < 128; i++) { outputData[i] = (float) Math.sqrt(re[i] * re[i] + im[i] * im[i]); } I plotted the contents of

Sensor reading in web worker

☆樱花仙子☆ 提交于 2019-12-01 11:09:10
It seems that we can not get sensor data in the web workers. I wonder the reason behind it. The use case is that I am thinking about getting geolocation data in the worker thread and only send the processed version to the main thread. For GPS, this post says it is not supported in the worker thread (no reason is given). And I double checked it, navigator.geolocation is not supported in web workers. For accelerator and gyroscope, we have DeviceOrientationEvent and DeviceMotionEvent. But we need to use them through the window object, which is not available to the worker thread. The same

Processing accelerometer data

我的梦境 提交于 2019-12-01 10:36:09
I would like to know if there are some libraries/algorithms/techniques that help to extract the user context (walking/standing) from accelerometer data (extracted from any smartphone)? For example, I would collect accelerometer data every 5 seconds for a definite period of time and then identify the user context (ex. for the first 5 minutes, the user was walking, then the user was standing for a minute, and then he continued walking for another 3 minutes). Thank you very much in advance :) Ali I don't know of any such library. It is a very time consuming task to write such a library. Basically

Madgwick sensor fusion on LSM9DS0

孤人 提交于 2019-12-01 08:57:33
I'm trying to implement Madgwick sensor fusion algorithm from here on LSM9DS0 sensor (accelerometer, gyroscope and magnetometer) on STM Cortex M3 microcontroller. Raw data from all sensors seems to be fine. My problem is: when I hold sensor with it's z-axis horizontal or downwards (i.e. roll or pitch angle is more than 90 degrees) - quaternion from filter becomes really unstable and randomly flips 180 degrees. More correctly, q0 and q3 are constantly changing signs, resulting in 180 degree flip of rotation. I tried using constant values instead of real sensor output and still got this behavior

WP7: Convert Accelometer and Compass data to mock Motion API

廉价感情. 提交于 2019-12-01 08:16:34
I'm writing a small sample application for the Windows Phone 7.1 (Mango) and want to use the Combined Motion API to display the motion of the device. I need to write mock classes to be able to test my application when using the emulator which does not support all sensors of the device. I already wrote a simple mock class to simulate a compass (it just simulates a rotating device) and for the accelerometer which is actually available in the emulator. Now I would have to write a new mock object for the Motion API but I hope that I could calculate the values that are used for the Motion object

How to replace UIAccelerometer with CMMotionManager?

岁酱吖の 提交于 2019-12-01 07:42:37
问题 I'm new to iOS development. I follow the tutorial from Ray Wenderlich to create a little location based AR app. However, the tutorial uses an AR Toolkit which has not been updated for a while. The UIAccelerometer it uses has already been deprecated since iOS 5, so when I try to run it on my iPhone (iOS 7.0.4), the Xcode says that there are 3 warnings, and all of them are caused by UIAccelerometer. The result it leads to is that all the marks stay at the center of the screen one above another,

Processing accelerometer data

浪尽此生 提交于 2019-12-01 07:39:30
问题 I would like to know if there are some libraries/algorithms/techniques that help to extract the user context (walking/standing) from accelerometer data (extracted from any smartphone)? For example, I would collect accelerometer data every 5 seconds for a definite period of time and then identify the user context (ex. for the first 5 minutes, the user was walking, then the user was standing for a minute, and then he continued walking for another 3 minutes). Thank you very much in advance :)

Is it possible to detect motion when screen is off?

心已入冬 提交于 2019-12-01 06:07:06
My app simply need to detect any motion of the device while screen is off. I know that accelerometer is used for this task but it don't work while screen is off in all devices. this is a list of devices http://www.saltwebsites.com/2012/android-accelerometers-screen-off so is there a way of taking accelerometer sensor data while screen is off that works on all devices? or is there a way to detect motion using another sensors? Partial Wake Lock is all you need to access accelerometer readings while the screen is off. You can use it like this: private PowerManager.WakeLock mWakeLock; PowerManager

WP7: Convert Accelometer and Compass data to mock Motion API

本小妞迷上赌 提交于 2019-12-01 05:49:53
问题 I'm writing a small sample application for the Windows Phone 7.1 (Mango) and want to use the Combined Motion API to display the motion of the device. I need to write mock classes to be able to test my application when using the emulator which does not support all sensors of the device. I already wrote a simple mock class to simulate a compass (it just simulates a rotating device) and for the accelerometer which is actually available in the emulator. Now I would have to write a new mock object