accelerometer

Madgwick sensor fusion on LSM9DS0

人盡茶涼 提交于 2019-12-01 05:38:57
问题 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

Android get normalized acceleration

谁说胖子不能爱 提交于 2019-12-01 05:30:31
I wish to get the acceleration vector of an Android phone. The problem is, the accelerometer coordinates are relative to the phone's rotation. What I want is the "absolute" acceleration, i.e., it should return the same values whichever way the phone is facing. (I want to detect if a user that is skiing is sliding down a slope without using GPS. I also need to be able to differentiate sliding and going up the chairlift.) I can probably get those values by combining the accelerometer with the gyroscope, but I have no idea how I could offset the accelerometer's values with the gyroscope's. Is

Accelerometer & gyro accuracy in different mobile device

血红的双手。 提交于 2019-12-01 03:51:48
I want to implement an indoor localisation system using the sensors of a mobile device (accelerometer, compass, gyro) . This problem was already discussed here on several places such as - here and here The first step is to decide which platform is the best one to implement such a system. The main possibilities are Samsung's Galaxy/ Galaxy tab, or the iphone/ ipad. The most important criteria is the accuracy of the sensors data. However, This comparison is very complicated, as the accuracy is dependent not only on the device itself but also on the software layers above it. Is there any research

Android accelerometer full range

喜你入骨 提交于 2019-12-01 01:15:09
I am currently working with Android Sensor API and accelerometer data. Though the internal components should support high acceleration (even +-16g), I tried some recent smartphone and found that the maximum range of exposed data is usually +-2g (e.g. Nexus 5) and sometimes +-4g (e.g. Nexus 4). Is there any way to set the full scale of the sensor? (I didn't manage to find a public API for this) Alternatively, is there any flagship smartphone that support higher range from stock? (e.g. +-8g, +-16g). I'm facing the same problem as yours. DISCLAIMER: I just discovered what I'm writing, so I haven

Accelerometer & gyro accuracy in different mobile device

末鹿安然 提交于 2019-12-01 00:47:14
问题 I want to implement an indoor localisation system using the sensors of a mobile device (accelerometer, compass, gyro) . This problem was already discussed here on several places such as - here and here The first step is to decide which platform is the best one to implement such a system. The main possibilities are Samsung's Galaxy/ Galaxy tab, or the iphone/ ipad. The most important criteria is the accuracy of the sensors data. However, This comparison is very complicated, as the accuracy is

Impossibility to change the rate of the accelerometer

女生的网名这么多〃 提交于 2019-11-30 23:21:27
I have to collect accelerometer data from my Android phone, so I have made a little program to do that. After some tests, I have found that my Nexus S accelerometer's rate is always 50 values per second when the phone is active, and 6 values per second when it is asleep (with a PARTIAL_WAKE_LOCK ), whatever the rate I ask for ( NORMAL , UI , GAME or FASTEST ). So I decided to install an application found on the Internet which tests the rate of the accelerometer : http://samoht.fr/tuto/accelerometers-frequency-on-android-with-code But I got the same "error" : whatever the rate I ask for, it is

How to program smooth movement with the accelerometer like a labyrinth game on iPhone OS?

别等时光非礼了梦想. 提交于 2019-11-30 22:42:54
I want to be able to make image move realistically with the accelerometer controlling it, like any labyrinth game. Below shows what I have so far but it seems very jittery and isnt realistic at all. The ball images seems to never be able to stop and does lots of jittery movements around everywhere. - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { deviceTilt.x = 0.01 * deviceTilt.x + (1.0 - 0.01) * acceleration.x; deviceTilt.y = 0.01 * deviceTilt.y + (1.0 - 0.01) * acceleration.y; } -(void)onTimer { ballImage.center = CGPointMake(ballImage

Gyro Sensor drift and Correct angle Estimation

痞子三分冷 提交于 2019-11-30 21:23:01
I am using LG Optimus 2x smartphone(Gyroscope and Accelerometer sensor) for positioning. I want to get correct rotation angles from gyroscope that can be used later on for body to earth coordinate transformation. My question is that How I can measure and remove the drift in gyro sensor. The one way is to take the average of gyro samples (when mobile is in static condition) for some time and subtracting from current sample, which is not good way. When the mobile is in rotation/motion how to get the drift free angles? As far as I know, either the Kalman filter or something similar is implemented

How can I unit test an Android Activity that acts on Accelerometer?

邮差的信 提交于 2019-11-30 21:21:06
I am starting with an Activity based off of this ShakeActivity and I want to write some unit tests for it. I have written some small unit tests for Android activities before but I'm not sure where to start here. I want to feed the accelerometer some different values and test how the activity responds to it. For now I'm keeping it simple and just updating a private int counter variable and a TextView when a "shake" event happens. So my question largely boils down to this: How can I send fake data to the accelerometer from a unit test? Corey Sunwold My solution to this ended up way simpler then

Android accelerometer full range

雨燕双飞 提交于 2019-11-30 20:33:51
问题 I am currently working with Android Sensor API and accelerometer data. Though the internal components should support high acceleration (even +-16g), I tried some recent smartphone and found that the maximum range of exposed data is usually +-2g (e.g. Nexus 5) and sometimes +-4g (e.g. Nexus 4). Is there any way to set the full scale of the sensor? (I didn't manage to find a public API for this) Alternatively, is there any flagship smartphone that support higher range from stock? (e.g. +-8g, +