title: How to get initial orientation for calculations with gyroscope?
body: <p>My question is probably very simple but it could also be the case that I am completely wrong - therefore I decided to ask. In the end I will calculate my phone's orientation with the help of data from the gyroscope sensor. I know that I should use something like Kalman filter or complementary filter to cope with gyro drift. I will do this in a second step but the problem I am asking here is the same for both approaches. So, the real question is the following:</p>
  
  <p>From the gyroscope I only get angular changes (after integration). So what I need is some initial value, I can add the currently measured change to. But how do I get this starting point? Do I use accelerometer and magnetometer to determine the phone's orientation? Or this there any better way?</p>
  
  <p>If it matters, I use Android for this and have an implementation to determine the phone's orientation with the help of accelerometer and magnetometer but it is very inaccurate.</p>