title: Magnetic Fields, Rotation Matrix And global coordinates
body: <p>I think that i've read all the posts about this subject, but still i cant understand a few things:</p>
  
  <p>Q1:
  To get the magnetic field vector in global coords i need to multiply the inverted rotation matrix and the magnetic field vector, why do i need to invert the rotation matrix?</p>
  
  <p>Q2:
  Lets say that i have a device and i can calculate the azimuth based on the rotation along the Z-axis using getOrientation(...) method.
  can i use the rotation matrix or some other method to calculate the azimuth to magnetic north regardless to the phone attitude?
  So if i will rotate the phone the angle between me and the magnetic north will remain the same?</p>
  
  <p>Q3:
  When i multiply the magnetic vector(4th col is zero) with the inverted rotation matrix i get that x is very close to zero. i know that this is o.k from other posts but i cant understand why?</p>
  
  <p>Q4:
  In theory, lets say that i have two devices located 1 meter from each other, is it possible to make a spatial position of the two devices based only on their magnetic fields (in global coords)</p>
  
  <p>Thanks in advanced.</p>
  
  <p>P.S
  I've already read these posts:
  <a href="https://stackoverflow.com/questions/11772923/how-can-i-get-the-magnetic-field-vector-independent-of-the-device-rotation">Getting magnetic field values in global coordinates</a>, 
  <a href="https://stackoverflow.com/questions/11772923/how-can-i-get-the-magnetic-field-vector-independent-of-the-device-rotation">How can I get the magnetic field vector, independent of the device rotation?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15315129/convert-magnetic-field-x-y-z-values-from-device-into-global-reference-frame">Convert magnetic field X, Y, Z values from device into global reference frame</a></p>