-
Notifications
You must be signed in to change notification settings - Fork 1
EquivalentEulerAngles
Adrian Quintana edited this page Dec 11, 2017
·
1 revision
To compute equivalent Euler angles use the following program
#include <data/geometry.h>
#include <data/args.h>
#include <iostream>
int main(int argc, char **argv)
{
double rot= textToFloat(argv[1]);
double tilt=textToFloat(argv[2]);
double psi= textToFloat(argv[3]);
std::cout << "(" << rot << "," << tilt << "," << psi << ") Initial\n";
double newrot, newtilt, newpsi;
Euler_mirrorY(rot, tilt, psi, newrot, newtilt, newpsi);
Euler_another_set(newrot, newtilt, newpsi, newrot, newtilt, newpsi);
std::cout << "(" << realWRAP(newrot,0,360) << ","
<< realWRAP(newtilt,-180,180) << ","
<< realWRAP(newpsi,0,360) << ") Mirror Y; Another set\n";
Euler_mirrorX(rot, tilt, psi, newrot, newtilt, newpsi);
Euler_another_set(newrot, newtilt, newpsi, newrot, newtilt, newpsi);
std::cout << "(" << realWRAP(newrot,0,360) << ","
<< realWRAP(newtilt,-180,180) << ","
<< realWRAP(newpsi,0,360) << ") Mirror X; Another set\n";
Euler_mirrorXY(rot, tilt, psi, newrot, newtilt, newpsi);
Euler_another_set(newrot, newtilt, newpsi, newrot, newtilt, newpsi);
std::cout << "(" << realWRAP(newrot,0,360) << ","
<< realWRAP(newtilt,-180,180) << ","
<< realWRAP(newpsi,0,360) << ") Mirror XY; Another set\n";
Euler_mirrorY(rot, tilt, psi, newrot, newtilt, newpsi);
std::cout << "(" << realWRAP(newrot,0,360) << ","
<< realWRAP(newtilt,-180,180) << ","
<< realWRAP(newpsi,0,360) << ") Mirror Y\n";
Euler_mirrorX(rot, tilt, psi, newrot, newtilt, newpsi);
std::cout << "(" << realWRAP(newrot,0,360) << ","
<< realWRAP(newtilt,-180,180) << ","
<< realWRAP(newpsi,0,360) << ") Mirror X\n";
Euler_mirrorXY(rot, tilt, psi, newrot, newtilt, newpsi);
std::cout << "(" << realWRAP(newrot,0,360) << ","
<< realWRAP(newtilt,-180,180) << ","
<< realWRAP(newpsi,0,360) << ") Mirror XY\n";
Euler_another_set(rot, tilt, psi, rot, tilt, psi);
std::cout << "(" << realWRAP(rot,0,360) << ","
<< realWRAP(tilt,-180,180) << ","
<< realWRAP(psi,0,360) << ") Initial; Another set\n";
return 0;
}
Call it as
./equivalentAngles 10 90 100
-- Main.CoSS - 08 Aug 2008