FACT++  1.0
void eraRv2m ( double  w[3],
double  r[3][3] 
)

Definition at line 3 of file rv2m.c.

Referenced by eraFk5hip(), eraFk5hz(), eraHfk5z(), palDav2m(), and t_rv2m().

32 {
33  double x, y, z, phi, s, c, f;
34 
35 
36 /* Euler angle (magnitude of rotation vector) and functions. */
37  x = w[0];
38  y = w[1];
39  z = w[2];
40  phi = sqrt(x*x + y*y + z*z);
41  s = sin(phi);
42  c = cos(phi);
43  f = 1.0 - c;
44 
45 /* Euler axis (direction of rotation vector), perhaps null. */
46  if (phi > 0.0) {
47  x /= phi;
48  y /= phi;
49  z /= phi;
50  }
51 
52 /* Form the rotation matrix. */
53  r[0][0] = x*x*f + c;
54  r[0][1] = x*y*f + z*s;
55  r[0][2] = x*z*f - y*s;
56  r[1][0] = y*x*f - z*s;
57  r[1][1] = y*y*f + c;
58  r[1][2] = y*z*f + x*s;
59  r[2][0] = z*x*f + y*s;
60  r[2][1] = z*y*f - x*s;
61  r[2][2] = z*z*f + c;
62 
63  return;
64 
65 }

+ Here is the caller graph for this function: