Commit c621f50c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

lamrot_to_lam/phirot_to_phi: added support for negativ angle of rotation

parent 6f68559f
...@@ -32,9 +32,9 @@ double lamrot_to_lam(double phirot, double lamrot, double polphi, double pollam, ...@@ -32,9 +32,9 @@ double lamrot_to_lam(double phirot, double lamrot, double polphi, double pollam,
if ( lamrot > 180.0 ) lamrot -= 360.0; if ( lamrot > 180.0 ) lamrot -= 360.0;
zlamrot = DEG2RAD*lamrot; zlamrot = DEG2RAD*lamrot;
if ( polgam > 0 ) if ( fabs(polgam) > 0 )
{ {
zgam = DEG2RAD*polgam; zgam = -DEG2RAD*polgam;
zarg1 = sin(zlampol) * zarg1 = sin(zlampol) *
(- zsinpol*cos(zphirot) * (cos(zlamrot)*cos(zgam) - sin(zlamrot)*sin(zgam)) (- zsinpol*cos(zphirot) * (cos(zlamrot)*cos(zgam) - sin(zlamrot)*sin(zgam))
+ zcospol*sin(zphirot)) + zcospol*sin(zphirot))
...@@ -90,9 +90,9 @@ double phirot_to_phi(double phirot, double lamrot, double polphi, double polgam) ...@@ -90,9 +90,9 @@ double phirot_to_phi(double phirot, double lamrot, double polphi, double polgam)
if ( lamrot > 180.0 ) lamrot -= 360.0; if ( lamrot > 180.0 ) lamrot -= 360.0;
zlamrot = DEG2RAD*lamrot; zlamrot = DEG2RAD*lamrot;
if ( polgam > 0 ) if ( fabs(polgam) > 0 )
{ {
zgam = DEG2RAD*polgam; zgam = -DEG2RAD*polgam;
zarg = zsinpol*sin(zphirot) + zarg = zsinpol*sin(zphirot) +
zcospol*cos(zphirot)*(cos(zlamrot)*cos(zgam) - sin(zgam)*sin(zlamrot)); zcospol*cos(zphirot)*(cos(zlamrot)*cos(zgam) - sin(zgam)*sin(zlamrot));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment