title: Calculation of Yaw, Pitch and Roll from Acceleration
body: <p>I'm using an expensive equipment which measures and records the following data when I was on a ship and did some sailing:</p>
  <p>GpsTime, GyroX, GyroY, GyroZ, AccX, AccY, accZ, Heading, Pitch, Roll, Latitude Longitude, Heave, V_East, V_North, V_UP.</p>
  <p><strong>What I'm trying to do:</strong> I'm trying to predict the Roll, Pitch and Yaw from AccX, AccY, AccZ.</p>
  <p><strong>What I've tried:</strong> After reading some tutorials I found that the following equations are wrong and I'm not sure why, any ideas which equations will work?</p>
  <pre><code>pitch = 180 * atan2(accelX, sqrt(accelY*accelY + accelZ*accelZ))/PI;
  
  roll = 180 * atan2(accelY, sqrt(accelX*accelX + accelZ*accelZ))/PI;
  </code></pre>