MotionManager only works when Location services are on. Why?


#1

MotionManager::getRotation method works only when Location Services are enabled on the iOS device.

This seems to be unnecessary limitation.

For example, Facebook 360 VR Video Player works regardless of Location Services.

Just saying.

–8


#2

My guess is that its using compass calibration to align magnetic north with 0,0,-1 (or 0,0,1?).
Since location service available since 3GS maybe its good enough, no?


#3

While asking people to test this functionality, I discovered that the first two had the Location Services turned off. However, Facebook VR Video Player worked even in that state.

–8


#4

I’m having trouble finding specifics on my phone, but it may be how you configure the manager, specifically whether you use a reference frame that requires the gps or compass to calibrate. Have you tried configuring it differently?


#5

@heisters : There is a way to only enable the Gyroscope (needed for 360 videos) in MotionManager. However it gets disabled if one disables Location Services (Settings -> Privacy -> Location Services).

–8


#6

Can you post your initialization code?


#7

@heisters Here you go.


#8

oh, gotcha. Now I see what you’re saying. I haven’t used Cinder’s interface to this, and was thinking of the underlying CMMotionManager API. Anyway, Cinder uses a configuration that relies on location services if it’s available. It doesn’t look like Cinder allows you to use a different configuration. One way or another, I think if you use one of the arbitrary reference frames (eg. CMAttitudeReferenceFrameXArbitraryCorrectedZVertical), it should work without location services.


#9

@heisters You are right. If I hardcode

[mMotionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXArbitraryCorrectedZVertical];

the 360 movie viewer works without Location Services.

Thanks!

–8