Questions tagged [cmmotionmanager]

Use for questions regarding CMMotionManager objects; an NSObject class in the Core Motion framework and MonoTouch.CoreMotion Namespace.

CMMotionManager is an NSObject class in the Core Motion framework and MonoTouch.CoreMotion Namespace.

A CMMotionManager instance provides access to motion services and data, including accelerometer and magnetometer data.

Motion services are not available on all devices -- the deviceMotionAvailable boolean property indicates whether or not motion services are available.

Resources

152 questions
0
votes
1 answer

CMMotionManager updateinterval not set

I'm using the CMMotionManager to gather accelerometer data. I am trying to set the update interval to every half second with the following: [_motionManager setDeviceMotionUpdateInterval:.5]; [_motionManager…
Apollo
  • 8,874
  • 32
  • 104
  • 192
0
votes
1 answer

How to access magnetometer data

Following the docs, here is my attempt to access magnetometer data. Needless to say, it doesn't work. I've gotten gyroscope and accelerometer data to work using the exact same approach, but for some reason, I get all zeroes in each axis using this…
michaelsnowden
  • 6,031
  • 2
  • 38
  • 83
0
votes
1 answer

Getting CMAccelerometer data in background

Currently I'm able to get updates from the accelerometer using CMAccelerometer _motionManager.accelerometerUpdateInterval = kUpdateInterval; [_motionManager startAccelerometerUpdatesToQueue:self.queue withHandler: ^(CMAccelerometerData…
Apollo
  • 8,874
  • 32
  • 104
  • 192
0
votes
0 answers

collecting accelerometer and location updates in separate threads

I have to get accelerometer and location updates and in separate threads but not on the main thread. Also, it should not interrupt one other or other UI tasks. Location updates and acclerometer updates should be run separately. How to run these two…
0
votes
1 answer

iOS CMStepCounter & CMMotionActivityManager

I am using CMStepCounter and CMMotionActivityManager. What I would like to do is work out my total walking time throughout the day, and from this, my average speed. However, looking at the data in CMMotionActivityManager, it is clear than a number…
NeilMortonNet
  • 1,500
  • 4
  • 16
  • 36
0
votes
1 answer

Operations in background

I was doing some research about reading accelerometer data while app is in background and I found that there is no pure solution for the problem. You can use some callback from other api-s like playing audio, recording audio, receiving location…
flatronka
  • 1,061
  • 25
  • 51
0
votes
1 answer

CoreMotion - way to determine if motion is disabled in iOS Settings?

On iOS 7 the user can choose disable device motion in Settings -> General -> Accessibility -> Reduce Motion. I am creating a UI effect based on UITableView scrolling, so I am not using CMMotionManager or the CoreMotion framework to create any motion…
runmad
  • 14,846
  • 9
  • 99
  • 140
0
votes
1 answer

ios cmmotionanager memory usage

I followed this tutorial: http://blogs.captechconsulting.com/blog/john-morrison/ios-getting-started-accelerometer-data to get my iPhone app to listen to the accelerometer. Added the CMMotionManager to my AppDelegate, and added a property to read…
0
votes
1 answer

Change frame in startDeviceMotionUpdatesToQueue

I'm trying to change my UIView's frame with value I get from CMMotionManager and its method - startDeviceMotionUpdatesToQueue:withHandler I wrote a draft like this : [_motionManager startDeviceMotionUpdatesToQueue:theQueue…
Pierre
  • 10,593
  • 5
  • 50
  • 80
0
votes
1 answer

CoreMotion wont give me roll, pitch and yaw

sBefore UIAccelerometer was deprecated from iOS I used the data from x, y and z from this class to calculate pitch, roll and yaw. I also had to do some filtering, but now I see that with the CoreMotion library I can get these data from the…
chwi
  • 2,752
  • 2
  • 41
  • 66
0
votes
1 answer

iOS dead reckoning

I'm working on an iOS project which needs me to do simple dead reckoning when GPS is not available. I've been given a bunch of measurement data from various phones which consists of the following: GPS data (x, y, z, course, speed) when…
Andy
  • 245
  • 5
  • 18
0
votes
1 answer

Can I rely on this "default" update interval (accelerometer) with this code?

-(void)play { CMMotionManager *motionManager = [[CMMotionManager alloc] init]; [motionManager startDeviceMotionUpdates]; while(!self.stopButtonPressed) { NSLog(@"Y-Axis acceleration is %f",…
user1073400
0
votes
1 answer

Finding distance using accelerometer in iPhone

Please suggest some beginning point in this process of finding distance displaced by an iPhone. The requirement of accuracy in current system is in cm, and displacement can be in 3D. What I have already done is 1. Tried using sound to calculated…
Amit Singh
  • 8,383
  • 4
  • 28
  • 31
-1
votes
1 answer

Swift: Constrain object to and point within a circular NSLayoutConstraint? Circle anchor?

Within a view controller, I have a UIView (backgroundCircle) and a UILabel. The UILabel is moving based on motionManager.startAccelerometerUpdates data. Using this data, I am animating the label.center point. However, I want to bound the movement…
nicksarno
  • 3,850
  • 1
  • 13
  • 33
-1
votes
1 answer

Accelerometer not working when setting Player.physicsBody!.dynamic = false in swift

I am new in spritekit and trying to develop a game with Acceleromotion restricting the SKSpritNode going outide the screen.It is working fine when I set the Player.physicsBody!.dynamic = true but same code is not working when setting this property…
1 2 3
10
11