Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Finnaly i found the answer:</p> <p>The errors in the numbers are relative to float vars multiplication that is not the same as a double multyplication. <a href="https://stackoverflow.com/questions/8035566/android-big-fail-on-float-values-product/8039857#8039857">Here there is the solution.</a> This sums to the fact that <strong>rotation matrix isn't costant if the phone, even if with the same orientation, is accelerating</strong>. So is impossible translate acceleration vector to absolute coordinates during motion... It's hard but it's the reality.</p> <p>FYI the orientation vector is made from magnetomer data AND gravity vector. This cause a ciclic problem: convert relative acc needs oirentation needs magnetic field AND gravity, but we know gravity only if the phone is stop by relative acc..so we are return to begin.</p> <p>This is confirmed in <a href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float%5B%5D,%20float%5B%5D,%20float%5B%5D,%20float%5B%5D%29" rel="nofollow noreferrer">Android Developers where is explained</a> that rotation matrix give true result only when the phone isn't accelerate (e.g. they talk of free fall, infact there shouldn't be gravity mesaurement) or when it isn't in a non regulare magnetic field.</p> <blockquote> <p>The matrices returned by this function are meaningful only when the device is not free-falling and it is not close to the magnetic north. <strong>If the device is accelerating, or placed into a strong magnetic field, the returned matrices may be inaccurate.</strong></p> </blockquote> <p>In others world, fully un-useful... You can trust this thing doing simple experiment on the table with Android Senor or something like this..</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload