pf_vector.h
Go to the documentation of this file.
1 //this package is based on amcl and has been modified to fit gmcl
2 /*
3  * Author: Mhd Ali Alshikh Khalil
4  * Date: 20 June 2021
5  *
6 */
7 
8 //amcl author clarification
9 /*
10  * Player - One Hell of a Robot Server
11  * Copyright (C) 2000 Brian Gerkey & Kasper Stoy
12  * gerkey@usc.edu kaspers@robotics.usc.edu
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27  *
28  */
29 /**************************************************************************
30  * Desc: Vector functions
31  * Author: Andrew Howard
32  * Date: 10 Dec 2002
33  * CVS: $Id: pf_vector.h 6345 2008-04-17 01:36:39Z gerkey $
34  *************************************************************************/
35 
36 #ifndef PF_VECTOR_H
37 #define PF_VECTOR_H
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 #include <stdio.h>
44 
45 // The basic vector
46 typedef struct
47 {
48  double v[3];
49 } pf_vector_t;
50 
51 
52 // The basic matrix
53 typedef struct
54 {
55  double m[3][3];
56 } pf_matrix_t;
57 
58 
59 // Return a zero vector
61 
62 // Check for NAN or INF in any component
64 
65 // Print a vector
66 void pf_vector_fprintf(pf_vector_t s, FILE *file, const char *fmt);
67 
68 // Simple vector addition
70 
71 // Simple vector subtraction
73 
74 // Transform from local to global coords (a + b)
76 
77 // Transform from global to local coords (a - b)
79 
80 
81 // Return a zero matrix
83 
84 // Check for NAN or INF in any component
86 
87 // Print a matrix
88 void pf_matrix_fprintf(pf_matrix_t s, FILE *file, const char *fmt);
89 
90 // Compute the matrix inverse. Will also return the determinant,
91 // which should be checked for underflow (indicated singular matrix).
92 //pf_matrix_t pf_matrix_inverse(pf_matrix_t a, double *det);
93 
94 // Decompose a covariance matrix [a] into a rotation matrix [r] and a
95 // diagonal matrix [d] such that a = r * d * r^T.
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif
pf_matrix_zero
pf_matrix_t pf_matrix_zero()
Definition: pf_vector.c:142
pf_vector_add
pf_vector_t pf_vector_add(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:88
pf_vector_t
Definition: pf_vector.h:46
pf_vector_finite
int pf_vector_finite(pf_vector_t a)
Definition: pf_vector.c:59
pf_matrix_fprintf
void pf_matrix_fprintf(pf_matrix_t s, FILE *file, const char *fmt)
Definition: pf_vector.c:170
pf_vector_coord_sub
pf_vector_t pf_vector_coord_sub(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:128
pf_matrix_unitary
void pf_matrix_unitary(pf_matrix_t *r, pf_matrix_t *d, pf_matrix_t a)
Definition: pf_vector.c:230
pf_vector_zero
pf_vector_t pf_vector_zero()
Definition: pf_vector.c:46
pf_matrix_t
Definition: pf_vector.h:53
pf_vector_sub
pf_vector_t pf_vector_sub(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:101
pf_vector_coord_add
pf_vector_t pf_vector_coord_add(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:114
pf_vector_fprintf
void pf_vector_fprintf(pf_vector_t s, FILE *file, const char *fmt)
Definition: pf_vector.c:72
pf_matrix_finite
int pf_matrix_finite(pf_matrix_t a)
Definition: pf_vector.c:156


gmcl
Author(s): Mhd Ali Alshikh Khalil, adler1994@gmail.com
autogenerated on Wed Mar 2 2022 00:20:14