aboutsummaryrefslogtreecommitdiff
path: root/attic/dave/main.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2018-04-15 17:43:12 -0400
committercnlohr <lohr85@gmail.com>2018-04-15 17:43:12 -0400
commit0ab91a6e9374f190c049a5d8ea1319b9b37529c1 (patch)
tree85398db4a4d5a40b3adec733fe1d1e183e13f3b8 /attic/dave/main.c
parentdd9936ef174746b73a688706de9c4a14fca2d58e (diff)
downloadlibsurvive-0ab91a6e9374f190c049a5d8ea1319b9b37529c1.tar.gz
libsurvive-0ab91a6e9374f190c049a5d8ea1319b9b37529c1.tar.bz2
Move things into attic and update Makefile to do dependnencies.
Diffstat (limited to 'attic/dave/main.c')
-rw-r--r--attic/dave/main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/attic/dave/main.c b/attic/dave/main.c
new file mode 100644
index 0000000..ff187aa
--- /dev/null
+++ b/attic/dave/main.c
@@ -0,0 +1,29 @@
+#include <stdio.h>
+#include "kalman_filter.h"
+
+int main()
+{
+ KAL_VEC(xhat_k_km1); /* OUTPUT: (S) Predicted state at time 'k' */
+ KAL_MAT(P_k_km1); /* OUTPUT: (S x S) Predicted covariance at time 'k' */
+ KAL_MAT(P_km1_km1); /* INPUT: (S x S) Updated covariance from time 'k-1' */
+ KAL_VEC(xhat_km1_km1); /* INPUT: (S) Updated state from time 'k-1' */
+ KAL_MAT(F_k); /* INPUT: (S x S) State transition model */
+ KAL_MAT(B_k); /* INPUT: (S x U) Control input model */
+ KAL_VEC(u_k); /* INPUT: (U) Control vector */
+ KAL_MAT(Q_k); /* INPUT: (S x S) Covariance of process noise */
+
+ KalmanPredict(
+ xhat_k_km1, /* OUTPUT: (S) Predicted state at time 'k' */
+ P_k_km1, /* OUTPUT: (S x S) Predicted covariance at time 'k' */
+ P_km1_km1, /* INPUT: (S x S) Updated covariance from time 'k-1' */
+ xhat_km1_km1, /* INPUT: (S) Updated state from time 'k-1' */
+ F_k, /* INPUT: (S x S) State transition model */
+ B_k, /* INPUT: (S x U) Control input model */
+ u_k, /* INPUT: (U) Control vector */
+ Q_k, /* INPUT: (S x S) Covariance of process noise */
+ 36, /* INPUT: Number of dimensions in state vector */
+ 36); /* INPUT: Size of control input vector */
+
+ return 0;
+}
+