Compute rotation matrix using the magnetic field
问题 In get rotation matrix value it contains public static boolean getRotationMatrix (float[] R, float[] I, float[] gravity, float[] geomagnetic) Here how can i calculate the float[] gravity ? I found a sample of code where it calculate the orientation using both Accelerometer and Magnetic field boolean success = SensorManager.getRotationMatrix( matrixR, matrixI, valuesAccelerometer, valuesMagneticField); if(success){ SensorManager.getOrientation(matrixR, matrixValues); double azimuth = Math