void ident_c ( SpiceDouble matrix[3][3] )
This routine returns the 3x3 identity matrix.
None.
MATRIX
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
matrix O is the 3x3 identity matrix.
None.
matrix is the 3x3 Identity matrix. That is MATRIX is
the following
_ _
| 1.0 0.0 0.0 |
| 0.0 1.0 0.0 |
| 0.0 0.0 1.0 |
- -
None.
Error free.
None.
This is a utility routine for obtaining the 3x3 identity matrix
so that you may avoid having to write the loop or assignments
needed to get the matrix.
Suppose that you need to construct the matrix sum
ident + omega
where omega is some matrix you have already computed.
The code fragment below shows how you could accomplish this
with this routine.
First get the Identity matrix
#include "SpiceUsr.h"
.
.
.
SpiceDouble ident[3][3];
ident_c ( ident );
vaddg_c ( ident, omega, 9, sum );
None.
None.
N.J. Bachman (JPL)
W.L. Taber (JPL)
-CSPICE Version 1.0.0, 1-JUN-1999 (NJB) (WLT)
Get the 3x3 identity matrix
Link to routine ident_c source file ident_c.c
|