Reputation: 153
I am developing augmented reality camera application in which nearby locations would be augmented on the camera screen. I need to find the orientation of device. I am using accelerometer sensor with magnetic sensor. And i am learning all these from the code which is on github.
I am unable to understand this matrix class. Can anyone please tell me what are a1,a2,.....c2,c3 ?
private volatile float a1=0f, a2=0f, a3=0f;
private volatile float b1=0f, b2=0f, b3=0f;
private volatile float c1=0f, c2=0f, c3=0f;
This is the SensorActivity where this matrix class is used.
Also tell me why do I need to use this 9 value matrix and which values need to pass to this matrix class.
For example in the SensorActivity why we are using angleX and angleY.
double angleX = Math.toRadians(-90);
double angleY = Math.toRadians(-90);
xAxisRotation.set( 1f,
0f,
0f,
0f,
(float) Math.cos(angleX),
(float) -Math.sin(angleX),
0f,
(float) Math.sin(angleX),
(float) Math.cos(angleX));
So, what is angleX and angleY. What are all these parameters?
Upvotes: 0
Views: 243
Reputation: 3003
you should read this first: http://en.wikipedia.org/wiki/Rotation_matrix
go to Basic rotations in the above link to find exactly what you're looking for
in your specific example, if you compute the matrix you get the identity matrix http://en.wikipedia.org/wiki/Identity_matrix
Upvotes: 1