00001
00002 #ifndef DDF_DEFINITIONS_HPP
00003 #define DDF_DEFINITIONS_HPP
00004
00005 #include <BayesFilter/bayesFlt.hpp>
00006 #include "jmath/random.hpp"
00007 #include "ctime.hpp"
00008
00009 namespace jafar
00010 {
00012 namespace ddf
00013 {
00014
00015 #define PRED_NOISE_SIZE 4
00016
00017 #define TWOSIGMA_TO_VAR(ts) ((ts)*(ts)/4.0)
00018 #define SIGMA_TO_VAR(ts) ((ts)*(ts))
00019 #define VARPOS_TO_VARACC(varpos,h) (2.0 * (varpos)/ ((h)*(h)))
00020 #define VARPOS_TO_VARVEL(varpos,h) (2.0 *(varpos)/(h))
00021
00022 const char LOGSEP = '\t';
00023
00024 typedef enum{AXIS_X, AXIS_Y, AXIS_Z} AXIS_TYPE;
00025
00026 typedef Bayesian_filter_matrix::SymMatrix MSYM;
00027 typedef Bayesian_filter_matrix::Vec VEC;
00028 typedef Bayesian_filter_matrix::RowMatrix MROW;
00029 typedef Bayesian_filter_matrix::Matrix MAT;
00030 typedef ublas::matrix<double> MAT_UBLAS;
00031
00032 class ParametersGeneric
00033 {
00034 public:
00035 jafar::ddf::time h;
00036 };
00037
00038 struct SpeedUpInfoStruct
00039 {
00040 VEC v_sv;
00041 VEC v_sv_1;
00042 VEC v_z;
00043 MSYM MS_sv;
00044 MSYM MS_sv_1;
00045 MSYM MS_z;
00046 MAT M_sv_q_1;
00047 MAT M_sv_q_2;
00048 MAT M_sv_q_3;
00049 MAT M_sv_q_4;
00050 MAT M_sv_1;
00051 MAT M_sv_2;
00052 MAT M_q_1;
00053 MAT M_q_2;
00054 MAT M_q_3;
00055 MAT M_q_4;
00056 MROW M_sv_row;
00057
00058 SpeedUpInfoStruct(unsigned short sv_size, unsigned short z_size, unsigned short q_size = 1):
00059 v_sv(sv_size),
00060 v_sv_1(sv_size),
00061 v_z(z_size),
00062 MS_sv(sv_size,sv_size),
00063 MS_sv_1(sv_size,sv_size),
00064 MS_z(z_size,z_size),
00065 M_sv_q_1(sv_size, q_size),
00066 M_sv_q_2(sv_size, q_size),
00067 M_sv_q_3(sv_size, sv_size),
00068 M_sv_q_4(sv_size, sv_size),
00069 M_sv_1(sv_size, sv_size),
00070 M_sv_2(sv_size, sv_size),
00071 M_q_1(q_size,q_size),
00072 M_q_2(q_size,q_size),
00073 M_q_3(q_size,q_size),
00074 M_q_4(q_size,q_size),
00075 M_sv_row(sv_size,sv_size){
00076 v_sv.clear(); v_sv_1.clear(); v_z.clear(); MS_sv.clear(); MS_sv_1.clear(); MS_z.clear();
00077 M_sv_q_1.clear(); M_sv_q_2.clear(); M_sv_q_3.clear(); M_sv_q_4.clear();
00078 M_sv_1.clear(); M_sv_2.clear(); M_q_1.clear(); M_q_2.clear();
00079 M_q_3.clear(); M_q_4.clear(); M_sv_row.clear();}
00080 };
00081
00082
00083 }
00084 }
00085 #endif