rotation matrix - satellite control system

161 Views Asked by At

I am in charge with developping a satellie control system. There is something that I either understood incorrectly or either is wrong in the explanation. I am checking if I am able to get the values of epsilon, theta and phi trough the 3 last lines of mathematics. When I recheck my values they seem to be different from my input values! why?

inital values:

epsilon = 30; phi = 20; theta = 40;

rotation matrix setup:

firstRotMatrix[0][0] = (cos(epsilon)* cos(phi)) - (sin(epsilon) * cos(theta) * sin(phi));
firstRotMatrix[0][1] = (sin(epsilon) * cos(phi)) + (cos(epsilon) * cos(theta) * sin (phi));
firstRotMatrix[0][2] = sin(epsilon) * sin(phi);
firstRotMatrix[1][0] = ((-cos(epsilon)) * sin(phi)) - (sin(epsilon) * cos(theta) * cos(phi));
firstRotMatrix[1][1] = ((-sin(epsilon)) * sin(phi)) + (cos(epsilon) * cos(theta) * cos(phi));
firstRotMatrix[1][2] = sin(theta) * cos(phi);
firstRotMatrix[2][0] = sin(epsilon) * sin(theta);
firstRotMatrix[2][1] = (-cos(epsilon)) * sin(theta);
firstRotMatrix[2][2] = cos(theta);

controle:

theta = (cos(firstRotMatrix[2][2])*180.0)/3.14;

epsi = (-(firstRotMatrix[2][1])/sin(theta));
epsi = (cos(epsilon)*180.0)/3.14;

phi = ((firstRotMatrix[1][2])/sin(theta));
phi = (cos(phi)*180.0)/3.14;

result of calculation:

theta = 45.0412

epsi = 8.842440

phi = 23.393240

source: http://www.slideshare.net/tm_ssau/ss-25992855 slide 12 & 13