public class Cotr extends Object
The static methods provided in this class all deal with coordinate transformations. All spherical coordinates are assumed to be expressed in DEGREES. No function is traced. The parameter mnemonics are:
Constructor and Description |
---|
Cotr() |
Modifier and Type | Method and Description |
---|---|
static void |
tr_Euler(double[] euler_angles,
double[][] R)
Compute the rotation matrix from Euler angles
(z, theta, zeta).
|
static void |
tr_oo(double[] o,
double[] o2,
double[][] R)
Rotate polar coordinates using an R rotation matrix (old to new frame)
and unit vectors.
|
static void |
tr_oo1(double[] o,
double[] o2,
double[][] R)
Rotate polar coordinates, using the inversed R matrix
(new to old frame).
|
static void |
tr_oR(double[] o,
double[][] R)
Creates the rotation matrix R[3][3].
|
static void |
tr_ou(double[] o,
double[] u)
Transformation from polar coordinates to Unit vector.
|
static void |
tr_RR(double[][] A,
double[][] B,
double[][] R)
Product of orthogonal matrices B = R * A.
|
static void |
tr_RR1(double[][] A,
double[][] B,
double[][] R)
Product of orthogonal matrices B = R^{-1} * A.
|
static void |
tr_uo(double[] u,
double[] o)
Computes angles from direction cosines.
|
static void |
tr_uR(double[] u,
double[][] R)
Creates the rotation matrix.
|
static void |
tr_uu(double[] u1,
double[] u2,
double[][] R)
Rotates the unit vector u1 to u2, as
u_2 = R * u_1 (old to new frame)
|
static void |
tr_uu1(double[] u1,
double[] u2,
double[][] R)
Rotates the unit vector u1 to u2, as
u_2 = R^{-1} * u_1 (new to old frame).
|
public static void tr_Euler(double[] euler_angles, double[][] R)
euler_angles
- IN: Euler angles (z, theta, zeta)R
- OUT: rotation matrixpublic static void tr_oo(double[] o, double[] o2, double[][] R)
o
- IN: Original angleso2
- OUT: rotated anglesR
- IN: Rotation matrixpublic static void tr_oo1(double[] o, double[] o2, double[][] R)
o
- IN: Original angleso2
- OUT: rotated anglesR
- IN: Rotation matrixpublic static void tr_oR(double[] o, double[][] R)
The resulting R matrix can then be used to get the components of a vector v in the local frame.
o
- IN: original anglesR
- OUT: rotation matrixpublic static void tr_ou(double[] o, double[] u)
o
- IN: angles ra + dec in degreesu
- OUT: dir cosinespublic static void tr_uo(double[] u, double[] o)
u
- IN: Dir cosineso
- OUT: Angles ra + dec in degreespublic static void tr_uR(double[] u, double[][] R)
For the poles,(|z|=1), the rotation axis is assumed be the y axis, i.e. the right ascension is assumed to be 0.
u
- IN: Original directionR
- OUT: Rotation matrixpublic static void tr_uu(double[] u1, double[] u2, double[][] R)
u1
- IN: Unit vectoru2
- OUT: Resulting unit vector after rotationR
- IN: rotation matrix (e.g. created by tr_oR)public static void tr_uu1(double[] u1, double[] u2, double[][] R)
u1
- IN: Unit vectoru2
- OUT: Resulting unit vector after rotationR
- IN: rotation matrix (e.g. created by tr_oR)public static void tr_RR(double[][] A, double[][] B, double[][] R)
A
- IN: First MatrixB
- OUT: Result MatrixR
- IN: Rotation Matrixpublic static void tr_RR1(double[][] A, double[][] B, double[][] R)
A
- IN: First MatrixB
- OUT: Result MatrixR
- IN: Rotation MatrixCopyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.