Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Problem with compass degrees flipping.

Discussion in 'iOS and tvOS' started by KristoE, Nov 26, 2013.

  1. KristoE

    KristoE

    Joined:
    Oct 13, 2012
    Posts:
    90
    The problem is that when I flip my phone, the compass flips too, but I don't want it to. I would like it to give the same reading no matter what the pitch or roll of the device is. What I need this for is to calibrate the gyroscope. Overall the gyroscope is quite accurate, but over time it drifts on the yaw axis and I would like to use the compass to calibrate it, but when at the time of calibration the device is upside down it would calibrate the gyroscope to point in exactly the opposite direction.
    I tried searching the internet for how to handle the raw data, but failed to find anything that I could wrap my head around.

    What would be the best way of dealing with this problem?

    Thanks in advance.
     
    AlexeySeverin and Deixell like this.
  2. AlexeySeverin

    AlexeySeverin

    Joined:
    Oct 6, 2016
    Posts:
    12
    Hey @KristoE , I know it's been looong time ago, but have you found a solution to the flipping compass?