accelerometer

Filtering rotational acceleration (Appropriate use for Kalman filter?)

人盡茶涼 提交于 2019-12-12 04:48:36
问题 I'm working on a project in which a rod is attached at one end to a rotating shaft. So, as the shaft rotates from 0 to ~100 degrees back-and-forth (in the xy plane), so does the rod. I mounted a 3-axis accelerometer at the end of the moving rod, and I measured the distance of the accelerometer from the center of rotation (i.e., the length of the rod) to be about 38 cm. I have collected a lot of data, but I'm in need of help to find the best method to filter it. First, here's a plot of the raw

What motion does iPhone SDK give exactly?

耗尽温柔 提交于 2019-12-12 04:46:16
问题 I am a little confused about iPhone's accelerometer and gyro data. I had worked with SDK at iOS 3.x times and as far as I remember it only gives rotation around axes. But with iPhone 4 I saw that it has a gyroscope; which is used for rotation again. If gyro is a new feature, what info does accelerometer give? I want to catch displacement of iPhone/iPod (without rotation) is there a way to catch this with any of the features? 回答1: The 3D accelerometer in the iPhone 3G produces results that

Device Motion Plugin

Deadly 提交于 2019-12-12 04:08:41
问题 I'm doing an application, which will use as a resource the accelerometer . I programmed it in HTML5 and JavaScript, and then I tested the application and it gave different values on different smartphones! How do I fix this? <script type="text/javascript" charset="utf-8"> // The watch id references the current `watchAcceleration` var watchID = null; // Wait for device API libraries to load // document.addEventListener("deviceready", onDeviceReady, false); // device APIs are available //

Android linear acceleration accuracy

倾然丶 夕夏残阳落幕 提交于 2019-12-12 04:07:16
问题 I have an app where I poll the sensors for acceleration data and save the XYZ values to a SQL DB. Codewise it is pretty simple: public void onSensorChanged(SensorEvent event) { sensor = event.sensor; int i = sensor.getType(); if (i == MainActivity.TYPE_ACCELEROMETER) { accelerometerMatrix = event.values; } else if (i == MainActivity.TYPE_GYROSCOPE) { gyroscopeMatrix = event.values; } else if (i == MainActivity.TYPE_GRAVITY) { gravityMatrix = event.values; } else if (i == MainActivity.TYPE

Keep Android service running even after Activity is closed

会有一股神秘感。 提交于 2019-12-12 03:49:23
问题 I am building one of those SOS apps. Whenever the device is shaken above a threshold value (detected through accelerometer), I am showing a Toast (as of now) 1) App is launched. User gives name, email, etc.. and clicks finish on last screen. 2) Service is started which keeps listening for shake. 3) It detects the shake correctly if the App is running. 4) If I close the app (the activity ), the service gets killed along with it. How do I keep the service running even if app is closed, so that

Use accelerometer in my movieplayer app

删除回忆录丶 提交于 2019-12-12 02:27:34
问题 I had an app which plays videos from a web server but it just plays in landscape orientation. I want my app to use the accelerometer to play my videos both in landscape and in portrait orientation. I want my video playback feature to look like the youtube app in the iPhone. Can anyone please help me how to do this? thanks 回答1: For this you do not need the accelerometer. Instead you listen to the notifications from the UIDevice singleton instance that are sent when the orientation changes. In

Android detect turn from phone

偶尔善良 提交于 2019-12-12 02:27:04
问题 I want to detect, if my smartphone user turn left or right or doing a turn around. Here an example to explain "turn right": The User faces a crossroad. Now I want to detect if my user takes the right path or the left path or goes straight on. therefore i use this to get azimuth: @Override public void onSensorChanged(SensorEvent event) { switch (event.sensor.getType()) { case Sensor.TYPE_ACCELEROMETER: for (int i = 0; i < 3; i++) { valuesAccelerometer[i] = event.values[i]; } break; case Sensor

Kinect accelerometer data timer backup

為{幸葍}努か 提交于 2019-12-11 22:35:37
问题 First of all, I'm very beginner at programming and you probably will see that, but here is my problem: I want to record a Kinects Accelerometers data, and write it to a file every 5 minutes as a backup. But I can't reach in the Timers OnTimeEvent the StringBuilder data, that contains what the I get from the Accelerometer. So the question is, can the StringBuilder data passed trough the ElapsedEventArghs, or is there any other option, to reach the StringBuilders data? I copy my code here:

ML enough features?

旧城冷巷雨未停 提交于 2019-12-11 22:02:55
问题 I'm trying to train a random forest on accelerometer dataset. I calculate features like mean, sd, correlation between axes, area under curve and others. I'm a ML Noob. I'm trying to understand two things: 1.If I split the dataset from one person into test and train and run the RF prediction the accuracy is high (> 90%). However, if I train the RF with data from different people and then predict, the accuracy is low (< 50%). Why? How do I debug this? Not sure what I'm doing wrong. In the above

iOS orientation estimation and heading error

落爺英雄遲暮 提交于 2019-12-11 22:02:53
问题 Instead of doing my own sensor fusion, I am using the Quaternions available from iOS and converting them to Euler angles. I walked around in a rectangle shape for few times and I observe that the shape is not as expected. I am plotting the shape by plotting the Yaw values. Please see below. It appears that the heading deviates significantly. I maintained the path while walking. How do I correct the Yaw values so I get correct rectangle shape. 来源: https://stackoverflow.com/questions/30941993