isrot_c |

Table of contents## Procedureisrot_c ( Indicate whether a matrix is a rotation matrix ) SpiceBoolean isrot_c ( ConstSpiceDouble m [3][3], SpiceDouble ntol, SpiceDouble dtol ) ## AbstractIndicate whether a 3x3 matrix is a rotation matrix. ## Required_ReadingROTATION ## KeywordsERROR MATRIX ROTATION ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- m I A matrix to be tested. ntol I Tolerance for the norms of the columns of m. dtol I Tolerance for the determinant of a matrix whose columns are the unitized columns of m. The function returns the value SPICETRUE if and only if m is a rotation matrix. ## Detailed_Inputm is a 3x3 matrix to be tested. ntol is the tolerance for the norms of the columns of m. dtol is the tolerance for the determinant of a matrix whose columns are the unitized columns of m. ## Detailed_OutputThe function returns the value SPICETRUE if and only if m is found to be a rotation matrix. The criteria that m must meet are: 1) The norm of each column of m must satisfy the relation 1. - ntol < || column || < 1. + ntol. - - 2) The determinant of the matrix whose columns are the unitized columns of m must satisfy 1. - dtol < determinant < 1. + dtol. - - ## ParametersNone. ## Exceptions1) If either of `ntol' or `dtol' is negative, the error SPICE(VALUEOUTOFRANGE) is signaled. ## FilesNone. ## ParticularsThis routine is an error checking "filter"; its purpose is to detect gross errors, such as uninitialized matrices. Matrices that do not pass the tests used by this routine hardly qualify as rotation matrices. The test criteria can be adjusted by varying the parameters ntol and dtol. A property of rotation matrices is that their columns form a right-handed, orthonormal basis in 3-dimensional space. The converse is true: all 3x3 matrices with this property are rotation matrices. An ordered set of three vectors V1, V2, V3 forms a right-handed, orthonormal basis if and only if 1) || V1 || = || V2 || = || V3 || = 1 2) V3 = V1 x V2. Since V1, V2, and V3 are unit vectors, we also have < V3, V1 x V2 > = 1. This quantity is the determinant of the matrix whose columns are V1, V2 and V3. When finite precision numbers are used, rotation matrices will usually fail to satisfy these criteria exactly. We must use criteria that indicate approximate conformance to the criteria listed above. We choose 1) | || Vi || - 1 | < ntol, i = 1, 2, 3. - 2) Let Vi Ui = ------ , i = 1, 2, 3. ||Vi|| Then we require | < U3, U1 x U2 > - 1 | < dtol; - equivalently, letting U be the matrix whose columns are U1, U2, and U3, we insist on | det(U) - 1 | < dtol. _ ## Examples1) We have obtained an instrument pointing matrix C from a C-kernel, and we wish to test whether it is in fact a rotation matrix. We can use ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) H.A. Neilan (JPL) ## Version-CSPICE Version 1.0.1, 03-AUG-2021 (JDR) Edited the header to comply with NAIF standard. -CSPICE Version 1.0.0, 16-AUG-1999 (NJB) (HAN) ## Index_Entriesindicate whether a matrix is a rotation matrix |

Fri Dec 31 18:41:08 2021