Added the docu for the forgotten pprz_simple_matrix.h - file.

This commit is contained in:
Martin Dieblich
2010-09-21 17:11:50 +00:00
parent 6e86a18f70
commit 8b1cacd2ad
2 changed files with 23 additions and 0 deletions
Binary file not shown.
+23
View File
@@ -71,6 +71,8 @@ d_{00} & 0 & 0 \\
\mat C = \mat A - \mat B
\end{equation}
\inHfile{RMAT\_DIFF(c, a, b)}{pprz\_algebra}
For bigger matrices you have to spezify the number of rows (\texttt{i}) and the number of columns (\texttt{j}).
\inHfile{MAT\_SUB(i, j, C, A, B)}{pprz\_simple\_matrix}
@@ -89,6 +91,16 @@ and with the inverse matrix
\end{equation}
\inHfile{INT32\_RMAT\_COMP\_INV(m\_a2b, m\_a2c, m\_b2c)}{pprz\_algebra\_int}
\inHfile{FLOAT\_RMAT\_COMP\_INV(m\_a2b, m\_a2c, m\_b2c)}{pprz\_algebra\_float}
Multiplication is also possible with bigger matrices
\begin{equation}
\mat C_{i \cross j} = \mat A_{i \cross k} \multiplication \transp{\mat B_{j \cross k}}
\end{equation}
\inHfile{MAT\_MUL\_T(i, k, j, C, A, B)}{pprz\_simple\_matrix}
or
\begin{equation}
\mat C_{i \cross j} = \mat A_{i \cross k} \multiplication \mat B_{k \cross j}
\end{equation}
\inHfile{MAT\_MUL(i, k, j, C, A, B)}{pprz\_simple\_matrix}
\subsection{Transformation from a Matrix}
@@ -125,3 +137,14 @@ Calculates the Frobenius Norm of a matrix
\norm{\norm{\mat M}}_F = \sqrt{\sum_{i=1}^3 \sum_{i=1}^3 m_{ij}^2 }
\end{equation}
\inHfile{FLOAT\_RMAT\_NORM(m)}{pprz\_algebra\_float}
\subsection*{$\inv{\mat A} $ Inversion}
The inversion of a 3-by-3 matrix is made using the adjugate matrix and the determinant:
\begin{equation}
\inv{\mat A} = \frac{adj(\mat A)}{det(\mat A} = \frac{1}{det{\mat A}} \begin{pmatrix}
a_{22}a_{33}-a_{23}a_{32}&a_{13}a_{32}-a_{12}a_{33}&a_{12}a_{23}-a_{13}a_{22}\\
a_{23}a_{31}-a_{21}a_{33}&a_{11}a_{33}-a_{13}a_{31}&a_{13}a_{21}-a_{11}a_{23}\\
a_{21}a_{31}-a_{22}a_{31}&a_{12}a_{31}-a_{11}a_{32}&a_{11}a_{22}-a_{12}a_{21}
\end{pmatrix}
\end{equation}
\inHfile{MAT\_INV33(invS, S)}{pprz\_simple\_matrix}