accelerometer

Detecting Acceleration in a car (iPhone Accelerometer)

时光毁灭记忆、已成空白 提交于 2019-11-27 05:13:39
问题 I am working on an iPhone app where we are trying to calculate the acceleration of a moving car. Similar apps have accomplished this (Dynolicious), but the difference is that this app is designed to be used during general city driving, not on a drag strip. This leads us to one big concern that Dynolicious was luckily able to avoid: hills. Yes, hills. There are two important stages to this: calibration, and actual driving. Our initial run was simple and suffered the consequences. During the

Moving an image using Accelerometer of android

孤人 提交于 2019-11-27 04:07:56
I have read articles/tutorial about accessing the phone's accelerometer (acceleration and orientation) values. I am trying to build a simple app where I can move a ball image using the these values. Here is my code: import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import

How to use Shake API in iPhone SDK 3.0?

你。 提交于 2019-11-27 03:52:06
Apple annonced Shake API in iPhone SDK 3.0. I can not find any information regarding this new feature. Who knows about how to use it? Any example, link will be good. The APIs you are looking for are in UIResponder : - (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event; - (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event; - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event; Generally you just implement this: - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event { if (event.type == UIEventSubtypeMotionShake) { //Your code

Android accelerometer not working when screen is turned off

ぃ、小莉子 提交于 2019-11-27 02:53:42
I'm developing an application for my final thesis on computer science, and I need to collect and log accelerometer data. I need to acquire it for a whole day long, so there are serious battery constraints (for instance, I cannot leave the screen on). Also, this isn't a market targeted application, so it is pretty acceptable to do some serious hacking, even low level C/C++ coding, if required. It is well known that on many devices the listeners for accelerometer events stop generating events when screen goes off (some links regarding this problem: http://code.google.com/p/android/issues/detail

Is there any way to access the accelerometer from the Apple Watch?

可紊 提交于 2019-11-27 02:37:06
问题 It doesn't look like WatchKit released today has such API included. 回答1: No. Direct access to the Apple Watch sensors (which include the accelerometer) is not possible. As always, if this is something you'd like, please file a request for it at https://bugreport.apple.com. 回答2: Sensor Data information is now available in Watchkit for watchOS 2.0 . You could check this information in the following session which is total 30 minutes presentation.If you do not want to watch entire session, then

Detect iPhone screen orientation

喜夏-厌秋 提交于 2019-11-27 02:00:38
问题 I'm wanting to detect the orientation of the iPhone at 45 degree increments. Ideally I'd like to be able to get the angle of orientation along any axis. The detection I need to do is similar to how Trism for the iPhone flashes an arrow towards the current bottom position of the screen when orientation changes. I have something coded up but really don't understand how the accelerometer readings work and could use a nudge in the right direction. My current code logs the current angle but even

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

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 01:53:01
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 position based on the accelerometer these phones generally come equip with? Specific examples would be good

Are there any well known algorithms to count steps based on the accelerometer?

旧时模样 提交于 2019-11-27 01:29:48
问题 I'm implementing an accelerometer-based pedometer, and I was wondering if there was any known algorithms to handle that. 回答1: You have probably found this: Enhancing the Performance of Pedometers Using a Single Accelerometer Anyhow, I am also interested in finding a good algorithm, I am curios what other answers you will get. :) 回答2: There is an app called Sensor data that you can uses to gather experimental data so you can then analyze it and try to find an algorithm. Its going to be quite

How can I find the velocity using accelerometers only?

旧城冷巷雨未停 提交于 2019-11-27 01:24:45
问题 Using only the phone's (Android) built in accelerometer, how would I go about finding its velocity? I have been tinkering with the maths of this but whatever function I come up with tends to lead to exponential growth of the velocity. I am working from the assumption that on startup of the App, the phone is at a standstill. This should definitely make finding the velocity (at least roughly) possible. I have a decent background in physics and math too, so I shouldn't have any difficulty with

how can we measure distance between object and android phone camera

橙三吉。 提交于 2019-11-27 01:11:17
问题 I want to calculate the distance between the camera and the recognized object.For this I tried a lot of methods, I tried to find the angle between the object and the camera using accelerometer and then use d = h * tan a h is height of from from the base generally which is 1.4 and i tried to calculate the angle by using get orientation method. Kindly let me know where am I doing wrong. Its been more than 2 days I have been struggling with this requirement. We have looked into various Camera