Comments (8)
yep, I understand. This will be very useful. I'm looking into it now..
from panorama.
I've asked Apple Technical support about this weird behavior, they answered this was a bug but unfortunately did not give any workaround.
Do you have any idea on how we could solve this?
from panorama.
@autresphere I develop on an iPod Touch, I had to dig up my old iPhone 4. I substituted this one line:
[motionManager startDeviceMotionUpdates]
with this:
[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
and I get a behavior which looks like it's working. It boots into default position (facing center of image), ignoring magnometer data, then after 0.5 - 2 seconds immediately rotates through the zenith to a compass-oriented azimuthal alignment.
I tested by booting the app with phone facing different directions, and after the first second, the landmarks were compass aligned in the same way.
Am I describing your issue correctly? My iPhone 4 is running iOS 7.1.1, not iOS 8. Unfortunately I can't do any kind of comparison, this is my only iOS device with a magnetometer on which to test.
from panorama.
If I got this correctly, and this is an iOS 8 bug, perhaps there's some data you can ask me to log, and we can compare logs?
from panorama.
I'm actually not sure about this anymore. Sometimes, it seems to be always aligned in the same way (as you're saying), and sometimes it seems to be a little bit misaligned by several degrees, but the number of degrees seems far less important than what I could see. In the meantime, I've updated to iOS 8.1.3, maybe it did fix some inaccuracy.
from panorama.
hi @autresphere , I've been doing some work on this, I've run into another issue. Let's say the device is facing north when you boot, and you run 2 different builds - one with startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical
and one with just startDeviceMotionUpdates
in both cases no further transformations are applied.
these result in 2 different orientation matrices, both have Z as the up vector orthogonal to Earth's ground (which I'm considering making into the new standard), but in the case of the reference frame, you have the forward vector XYZ (1,0,0), and with no reference frame XYZ (0,1,0). There becomes a 90deg discrepancy between where the center of the image is in both cases.
though in the case of a reference frame, during the split second after orientation begins but before the magnetometer boots up, they are both forward Y facing (0,1,0)
this would be easy to reconcile if there was a flag that flipped when the deviceMotion began incorporating magnetometer too, but none exist from what I've found (let me know if you find one), which leads me faced with rolling out my own code to apply magnetometer to deviceMotion.attitude, which maybe isn't too difficult, just not as elegant of a solution as I hoped.
from panorama.
Hi @robbykraft, it seems you can check whether the magnetometer is active through CMDeviceMotion. magneticField.accuracy
. A CMMagneticFieldCalibrationAccuracyUncalibrated
value should tell you magnetometer is not yet incorporated. What do you think?
from panorama.
i think that [Motion Manger startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical] can resolve the pb of the orientation of the device with the orientation of the 360° image ???
from panorama.
Related Issues (20)
- Just detect touch Swift 3 HOT 1
- How do i get same woking of lockPanToHorizon with landscape mode in device HOT 3
- Set Image directly instead of name/path HOT 1
- adapting image orientation with device orientation HOT 2
- How can I set the current viewing direction to the center of the image? HOT 2
- How to Use the Panorama View for UIView? HOT 1
- Camera Features Support HOT 3
- setImage and setImageWithName not working when I try to set it from directory or bundle directory HOT 2
- Large Image not loading. HOT 2
- Tiny planet effect by zooming out HOT 1
- EXC_BAD_ACCESS on iOS 11 HOT 4
- how to set image size for scale 16:9 HOT 1
- Unable to build pod in swift project HOT 2
- Library for Android
- iOS black screen HOT 1
- Control Zooming
- Its not working on iOS
- Migrate to Swift and Metal?
- How to use pitch and yaw to place hotspots ?
- Port to Swift/Metal is available: dhoerl/Panorama
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panorama.