Giter VIP home page Giter VIP logo

Comments (8)

mayakraft avatar mayakraft commented on July 30, 2024

yep, I understand. This will be very useful. I'm looking into it now..

from panorama.

autresphere avatar autresphere commented on July 30, 2024

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.

mayakraft avatar mayakraft commented on July 30, 2024

@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.

mayakraft avatar mayakraft commented on July 30, 2024

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.

autresphere avatar autresphere commented on July 30, 2024

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.

mayakraft avatar mayakraft commented on July 30, 2024

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.

autresphere avatar autresphere commented on July 30, 2024

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.

sassiwalid avatar sassiwalid commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.