Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 582a5120 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Correction of the TLV parametrization

parent 4868db2f
......@@ -178,7 +178,37 @@ void params::to_cartesian(const double* invec, params::input intype,
NOT_IMPLEMENTED();
break;
case RETRO_TL_TVL_PROJ_DPHI:
NOT_IMPLEMENTED();
{
const double theta_vl = sqrt(invec[1]*invec[1] + invec[2]*invec[2]);
const double cos_vl = cos(theta_vl);
const double sin_vl = sin(theta_vl);
const double cos_l = cos(invec[0]);
const double sin_l = sin(invec[0]);
const double cos_phi = invec[0] / theta_vl;
const double sin_phi = invec[1] / theta_vl;
// Compute the cosine of the outgoing vector using the
// spherical law of cosines
const double cos_v = cos_l*cos_vl + cos_phi*sin_l*sin_vl;
const double sin_v = sqrt(1.0 - cos_v*cos_v);
if(sin_v != 0.0)
{
const double sin_dphi = (sin_vl*sin_phi) / sin_v;
outvec[0] = sin_v * sqrt(1.0 - sin_dphi*sin_dphi);
outvec[1] = sin_v * sin_dphi;
}
else
{
outvec[0] = 0.0;
outvec[1] = 0.0;
}
outvec[2] = cos_v;
outvec[3] = sin(invec[0]);
outvec[4] = 0.0;
outvec[5] = cos(invec[0]);
}
break;
// 4D Parametrization
......@@ -372,7 +402,7 @@ void params::from_cartesian(const double* invec, params::input outtype,
else
{
outvec[0] = acos(cos_l);
outvec[1] = acos(cos_v);
outvec[1] = acos(cos_v) - acos(cos_l);
outvec[2] = 0.0;
}
}
......
Markdown is supported
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