accelerometer

What is the real world accuracy of phone accelerometers when used for positioning?

感情迁移 提交于 2019-12-28 00:59:37
问题 I am working on an application where I would like to track the position of a mobile user inside a building where GPS is unavailable. The user starts at a well known fixed location (accurate to within 5 centimeters), at which point the accelerometer in the phone is to be activated to track any further movements with respect to that fixed location. My question is, in current generation smart phones (iphones, android phones, etc), how accurately can one expect to be able to track somebodies

What is the real world accuracy of phone accelerometers when used for positioning?

*爱你&永不变心* 提交于 2019-12-28 00:59:28
问题 I am working on an application where I would like to track the position of a mobile user inside a building where GPS is unavailable. The user starts at a well known fixed location (accurate to within 5 centimeters), at which point the accelerometer in the phone is to be activated to track any further movements with respect to that fixed location. My question is, in current generation smart phones (iphones, android phones, etc), how accurately can one expect to be able to track somebodies

How Nike+ GPS on iPhone receives accelerometer updates in the background?

懵懂的女人 提交于 2019-12-27 16:44:42
问题 The new Nike+ GPS application for iOS 5 is able to process accelerometer events in the background (thus allowing for indoor treadmill tracking). How is this possible? When I put my application in background, it ceases receiving events. I use the standard UIAccelerometer API. 回答1: For the sake of providing an answer to this question, even though it is already self answered... "If you use the newer Core Motion API, you can receive updates in the background." Here is an example: - (void

Android: How to increase Accelerometer Sampling Rate?

家住魔仙堡 提交于 2019-12-25 16:53:53
问题 I am currently using Java API to get accelerometer values in 5Hz, which is below my requirements. I want to achieve at least 50Hz. Is there any way to increase the sampling rate of accelerometer? Regards 回答1: I think the maximun sampling rate is diferent between diferent android phones. What i think you can do is setup the sensormanager to update the data as fast as it can, take a look of the constant SENSOR_DELAY_FASTEST from the documentation. regards. 回答2: The param SENSOR_DELAY_FASTEST

How do I compare a constant value to a continuously-updated Accelerometer value each time round a loop?

我的梦境 提交于 2019-12-25 05:07:57
问题 As it was suggested to me in a previous post of mine, the following code takes the data coming from the accelerometer the "minute" the assignment : CMAccelerometerData* data = [manager accelerometerData]; is performed, and then extracts from that data the acceleration exercised on the x-Axis and stores its value in a double (double x) : CMMotionManager* manager = [[CMMotionManager alloc] init]; CMAccelerometerData* data = [manager accelerometerData]; double x = [data acceleration].x; Suppose

Android Studio Gyroscope examples?

半世苍凉 提交于 2019-12-25 03:32:41
问题 I'm trying to build an application which does a desired affect when the device is tilted to a certain degree. I've taken a look at, and successfully enabled, an accelerometer, but this doesn't give me the desired affect. Like I said, I wish the device to do what I want it to, only when the device has achieved a certain degree, say 90 degrees. I've got the following code, but this only works when the device is tilted fast enough: @Override public void onSensorChanged(SensorEvent sensorEvent) {

Event driven sign with “pitch” in App Inventor 2

跟風遠走 提交于 2019-12-25 01:55:55
问题 Since I'm new to App Inventor2 tool, I'm having a little issue trying to get a "pitch" value to trigger the visibility of a label. I need to have a label being shown when the "AccelerometerSensor", reaches the -30 or 30 degrees point. To make this happen I'm using the "zAccel" value and the app runs in landscape mode, with the home button on the right side of the android device. The following image shows the blocks I've used so far, without much success, as the "Warning" is visible all the

Unable to resolve getApplicationContext and startActivity methods in shake event listener: Android Studio

血红的双手。 提交于 2019-12-24 17:21:43
问题 I am trying to implement a shake event listener and below is my code. It is Android Studio environment if it matters. It just says cannot resolve method getApplicationContext or even startActivity. Can anyone help me find my mistake? package com.shaivaldesai.shake; import android.app.Application; import android.content.Context; import android.content.Intent; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; /** * Created by

Extracting accelerometer data from Microsoft Band

这一生的挚爱 提交于 2019-12-24 13:37:55
问题 I am trying to do an analysis of data from various fitness tracker devices and i need to extract the accelerometer data from microsoft band jaw bone and Basis Peak for this. I know they have the analyzed data in their app, so the data must be somewhere on my phone, but how do i access it? Does someone know how can i do this? 回答1: Jawbone does not provide a way to access the raw accelerometer data. However, you can programmatically access the events (e.g., steps, sleep, heartrate) generated

Allowing both landscape options and accelerometer with libgdx

南楼画角 提交于 2019-12-24 10:53:45
问题 I've completed the SimpleApp tutorial for libgdx. I have changed the controls for the game to use the accelerometer instead of touch input, in the following way: In MainActivity.java cfg.useAccelerometer = true; In DropGame.java float acc = Gdx.input.getAccelerometerY(); bucket.x += acc * 120 * Gdx.graphics.getDeltaTime(); My question is, how do I allow both landscapes? I would like to be able to turn my device 180 degrees from one landscape orientation to the other, and have the game rotate