47#ifdef SAF_ENABLE_TRACKER_MODULE
50#define SAF_LOG_2PI ( logf(2.0f*SAF_PI) )
53typedef struct _kf_update6 {
73static double lngamma(
double x,
double* sgngam);
179 cblas_scopy(p1->
nTargets*6, (
float*)p1->
M->M, 1, (
float*)p2->
M->M, 1);
180 cblas_scopy(p1->
nTargets*6*6, (
float*)p1->
P->P, 1, (
float*)p2->
P->P, 1);
209 int i, j, k, n, nDead, isDead, ind;
211 float dt0, dt1, p_death, rand01, distance_diff;
214#ifdef TRACKER_VERY_VERBOSE
215 char c_event[256], tmp[256];
216 printf(
"%s\n",
"Prediction step");
222 for (i=0; i<tpars->
Np; i++){
229#ifdef TRACKER_VERY_VERBOSE
230 memset(c_event, 0, 256*
sizeof(
char));
241 dt1 = dt0 + S->
dt * (float)Tinc;
253 distance_diff = (S->
M[j].m0 - S->
M[k].m0) * (S->
M[j].m0 - S->
M[k].m0) +
254 (S->
M[j].m1 - S->
M[k].m1) * (S->
M[j].m1 - S->
M[k].m1) +
255 (S->
M[j].m2 - S->
M[k].m2) * (S->
M[j].m2 - S->
M[k].m2);
256 distance_diff = sqrtf(distance_diff);
257 if (distance_diff < tpars->forceKillDistance && S->
Tcount[j] <= S->
Tcount[k])
265 if (rand01 < p_death){
267 dead =
realloc1d(dead, nDead*
sizeof(
float));
275 for(n=0; n<nDead; n++)
285 if ( (nDead==0) || (j != dead[0]) )
292 for(j=0; j<nDead; j++){
303 memmove(&S->
M[ind], &S->
M[ind+1], (S->
nTargets-ind)*
sizeof(
M6));
304 memmove(&S->
P[ind], &S->
P[ind+1], (S->
nTargets-ind)*
sizeof(
P66));
310 for(k=0; k<nDead; k++)
313#ifdef TRACKER_VERY_VERBOSE
314 sprintf(tmp,
" Target %d died ", ind);
315 strcat(c_event, tmp);
330 memmove(&S->
M[ind], &S->
M[ind+1], (S->
nTargets-ind)*
sizeof(
M6));
331 memmove(&S->
P[ind], &S->
P[ind+1], (S->
nTargets-ind)*
sizeof(
P66));
336#ifdef TRACKER_VERY_VERBOSE
337 sprintf(tmp,
", Target %d died ", ind);
338 strcpy(c_event, tmp);
344#ifdef TRACKER_VERY_VERBOSE
345 sprintf(S->evstr,
"MCS: %d, W: %.7f, IDs: [", i, S->
W);
348 strcat(S->evstr, tmp);
350 strcat(S->evstr,
"] ");
351 strcat(S->evstr, c_event);
352 printf(
"%s\n", S->evstr);
365 int i, j, k, ss, n_events, count, cidx, unique, j_new, ev;
370#ifdef TRACKER_VERY_VERBOSE
372 printf(
"%s\n",
"Update step");
376 for (i=0; i<tpars->
Np; i++){
389#ifdef TRACKER_VERBOSE
390 memset(pData->evt, 0, n_events*256*
sizeof(
char));
397#ifdef TRACKER_VERBOSE
398 strcpy(pData->evt[cidx],
"Clutter");
400 pData->
evta[cidx] = -1;
402 pData->
evl[cidx] = tpars->
cd;
411 cblas_sscal(3, 1.0f/
L2_norm3(M), M, 1);
415#ifdef TRACKER_VERBOSE
416 sprintf(pData->evt[cidx],
"Target %d ", S->
targetIDs[j]);
420 pData->
evl[cidx] = LH;
423 cblas_scopy(6, (
float*)M, 1, (
float*)S_event->
M[j].M, 1);
424 cblas_scopy(6*6, (
float*)P, 1, (
float*)S_event->
P[j].P, 1);
426 S_event->
Tcount[k] += Tinc;
435 cblas_sscal(3, 1.0f/
L2_norm3(M), M, 1);
454#ifdef TRACKER_VERBOSE
455 sprintf(pData->evt[cidx],
"New Target %d ", j);
457 pData->
evta[cidx] = j;
459 pData->
evl[cidx] = LH;
463 cblas_scopy(6, (
float*)M, 1, (
float*)S_event->
M[j].M, 1);
464 cblas_scopy(6*6, (
float*)P, 1, (
float*)S_event->
P[j].P, 1);
471 norm = 1.0f/
sumf(pData->
evp, count);
472 cblas_sscal(count, norm, pData->
evp, 1);
474 norm = 1.0f/
sumf(pData->
imp, count);
475 cblas_sscal(count, norm, pData->
imp, 1);
477 saf_assert(ev!=-1,
"Falied to randomly select an event");
481 S->
W *= (pData->
evl[ev] * pData->
evp[ev]/ pData->
imp[ev]);
484#ifdef TRACKER_VERY_VERBOSE
485 sprintf(S->evstr,
"MCS: %d, W: %.7f, IDs: [", i, S->
W);
488 strcat(S->evstr, tmp);
490 strcat(S->evstr,
"] ");
491 strcat(S->evstr, pData->evt[ev]);
492 printf(
"%s\n", S->evstr);
511 for(i=0; i<pData->
tpars.
Np; i++){
538 pn[i] = ((
MCS_data*)SS[i])->W*(float)NP;
539 memset(s, 0, NP*
sizeof(
int));
543 for (i=0; i<NP; i++){
552 if (k<NP && c>=r[k]){
574 sumW2 += (S->
W * S->
W);
590 for (i=0; i<NP; i++){
594 for (i=0; i<NP; i++){
609 float AM[6], AP[6][6], APAT[6][6];
612 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 6, 1, 6, 1.0f,
616 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 6, 6, 6, 1.0f,
620 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 6, 6, 6, 1.0f,
626 memcpy(M, AM, 6*
sizeof(
float));
668 float yIM[3], IM[3], IS[3][3], HP[3][6], HPHT[3][3], PHT[6][3], K[6][3], K_yIM[6], KIS[6][3];
671 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 3, 1, 6, 1.0f,
675 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 3, 6, 6, 1.0f,
679 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 3, 3, 6, 1.0f,
683 IS[0][0] = HPHT[0][0] + R[0][0]; IS[0][1] = HPHT[0][1] + R[0][1]; IS[0][2] = HPHT[0][2] + R[0][2];
684 IS[1][0] = HPHT[1][0] + R[1][0]; IS[1][1] = HPHT[1][1] + R[1][1]; IS[1][2] = HPHT[1][2] + R[1][2];
685 IS[2][0] = HPHT[2][0] + R[2][0]; IS[2][1] = HPHT[2][1] + R[2][1]; IS[2][2] = HPHT[2][2] + R[2][2];
686 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 6, 3, 6, 1.0f,
690 ISnd_sum = IS[0][1] + IS[0][2] + IS[1][2] + IS[1][0] + IS[2][0] + IS[2][1];
691 if(ISnd_sum<0.00001f){
692 K[0][0] = 1.0f/IS[0][0] * PHT[0][0];
693 K[0][1] = 1.0f/IS[1][1] * PHT[0][1];
694 K[0][2] = 1.0f/IS[2][2] * PHT[0][2];
695 K[1][0] = 1.0f/IS[0][0] * PHT[1][0];
696 K[1][1] = 1.0f/IS[1][1] * PHT[1][1];
697 K[1][2] = 1.0f/IS[2][2] * PHT[1][2];
698 K[2][0] = 1.0f/IS[0][0] * PHT[2][0];
699 K[2][1] = 1.0f/IS[1][1] * PHT[2][1];
700 K[2][2] = 1.0f/IS[2][2] * PHT[2][2];
701 K[3][0] = 1.0f/IS[0][0] * PHT[3][0];
702 K[3][1] = 1.0f/IS[1][1] * PHT[3][1];
703 K[3][2] = 1.0f/IS[2][2] * PHT[3][2];
704 K[4][0] = 1.0f/IS[0][0] * PHT[4][0];
705 K[4][1] = 1.0f/IS[1][1] * PHT[4][1];
706 K[4][2] = 1.0f/IS[2][2] * PHT[4][2];
707 K[5][0] = 1.0f/IS[0][0] * PHT[5][0];
708 K[5][1] = 1.0f/IS[1][1] * PHT[5][1];
709 K[5][2] = 1.0f/IS[2][2] * PHT[5][2];
712 utility_sglslvt(h->hLinSolveT, (
float*)PHT, 6, (
float*)IS, 3, (
float*)K);
716 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 6, 1, 3, 1.0f,
718 (
float*)yIM, 1, 0.0f,
720 X_out[0] = X[0] + K_yIM[0];
721 X_out[1] = X[1] + K_yIM[1];
722 X_out[2] = X[2] + K_yIM[2];
723 X_out[3] = X[3] + K_yIM[3];
724 X_out[4] = X[4] + K_yIM[4];
725 X_out[5] = X[5] + K_yIM[5];
726 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 6, 3, 3, 1.0f,
730 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 6, 6, 3, 1.0f,
734 cblas_sscal(6*6, -1.0f, (
float*)P_out, 1);
735 cblas_saxpy(6*6, 1.0f, (
float*)P, 1, (
float*)P_out, 1);
752 return (
float)(
incompletegamma((
double)gam, (
double)x)/tgamma((
double)x));
770 float** L_Qc, **L_Qc_LT, **Phi, **ZE, **B, **AB, **AB1_T, **AB2_T, **Q_T;
774 L =
calloc1d(len_N*len_Q,
sizeof(
float));
775 for(i=0; i<
SAF_MIN(len_N, len_Q); i++)
781 Qc =
calloc1d(len_Q*len_Q,
sizeof(
float));
784 Fdt =
malloc1d(len_N*len_N*
sizeof(
float));
787 for(i=0; i<len_N*len_N; i++)
789 gexpm(Fdt, len_N, 0, A);
792 L_Qc = (
float**)
malloc2d(len_N, len_Q,
sizeof(
float));
793 L_Qc_LT = (
float**)
malloc2d(len_N, len_N,
sizeof(
float));
794 Phi = (
float**)
calloc2d(len_N*2, len_N*2,
sizeof(
float));
795 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, len_N, len_Q, len_Q, 1.0f,
799 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, len_N, len_N, len_Q, 1.0f,
803 for(i=0; i<len_N; i++){
804 for(j=0; j<len_N; j++){
805 Phi[i][j] = F[i*len_N+j];
806 Phi[i][j+len_N] = L_Qc_LT[i][j];
807 Phi[i+len_N][j+len_N] = -F[j*len_N+i];
811 ZE = (
float**)
calloc2d(len_N*2, len_N,
sizeof(
float));
812 for(i=0; i<len_N; i++)
813 ZE[i+len_N][i] = 1.0f;
814 B = (
float**)
malloc2d(len_N*2, len_N*2,
sizeof(
float));
815 AB = (
float**)
malloc2d(len_N*2, len_N,
sizeof(
float));
817 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, len_N*2, len_N, len_N*2, 1.0f,
821 AB1_T = (
float**)
malloc2d(len_N, len_N,
sizeof(
float));
822 AB2_T = (
float**)
malloc2d(len_N, len_N,
sizeof(
float));
823 Q_T = (
float**)
malloc2d(len_N, len_N,
sizeof(
float));
824 for(i=0; i<len_N; i++){
825 for(j=0; j<len_N; j++){
826 AB1_T[j][i] = AB[i][j];
827 AB2_T[j][i] = AB[i+len_N][j];
833 for(i=0; i<len_N; i++)
834 for(j=0; j<len_N; j++)
835 Q[i*len_N+j] = Q_T[j][i];
855#if defined(LITTLE_ENDIAN) && 0
856static float expf_fast(
float a) {
857 union {
float f;
int x; } u;
859 u.x = (int) (12102203 * a + 1064866805);
863static float logf_fast(
float a) {
864 union {
float f;
int x; } u = { a };
865 return (u.x - 1064866805) * 8.262958405176314e-8f;
880 float DX[3], S_DX[3];
885 Snd_sum = S[0][1] + S[0][2] + S[1][2] + S[1][0] + S[2][0] + S[2][1];
886 if(Snd_sum<0.00001f){
887 S_DX[0] = 1.0f/S[0][0] * DX[0];
888 S_DX[1] = 1.0f/S[1][1] * DX[1];
889 S_DX[2] = 1.0f/S[2][2] * DX[2];
892 utility_sslslv(h->hLinSolve, (
float*)S, 3, (
float*)DX, 1, (
float*)S_DX);
894 E += DX[1] * S_DX[1];
895 E += DX[2] * S_DX[2];
898#if defined(LITTLE_ENDIAN) && 0
900 logf_fast(S[0][0] * (S[1][1] * S[2][2] - S[2][1] * S[1][2])-S[1][0] * (S[0][1] * S[2][2] - S[2][1] * S[0][2])+S[2][0] * (S[0][1] * S[1][2] - S[1][1] * S[0][2]));
901 return expf_fast(-E);
903 E = E + 1.5f *
SAF_LOG_2PI + 0.5f * logf(S[0][0] * (S[1][1] * S[2][2] - S[2][1] * S[1][2])-S[1][0] * (S[0][1] * S[2][2] - S[2][1] * S[0][2])+S[2][0] * (S[0][1] * S[1][2] - S[1][1] * S[0][2]));
918 cblas_scopy(len_P, P, 1, Ptmp, 1);
921 norm = 1.0f/(
sumf(Ptmp, len_P) + 2.23e-10f);
922 cblas_sscal(len_P, norm, Ptmp, 1);
923 for(i=1; i<len_P; i++)
924 Ptmp[i] += Ptmp[i-1];
926 rand01 =
SAF_MIN(rand01, 0.9999f);
927 for(i=0; i<len_P; i++)
945 double a, b, c, p, q, u, w, z, logpi, ls2pi, tmp, result;
949 *sgngam = (double)(1);
950 logpi = 1.14472988584940017414;
951 ls2pi = 0.91893853320467274178;
956 i = (int)floor(p+0.5);
958 *sgngam = (double)(-1);
960 *sgngam = (double)(1);
967 result = logpi-log(z)-w;
974 while(u>=(
double)3) {
985 *sgngam = (double)(-1);
989 *sgngam = (double)(1);
990 if( u==(
double)(2) ) {
996 b = -1378.25152569120859100;
997 b = -38801.6315134637840924+x*b;
998 b = -331612.992738871184744+x*b;
999 b = -1162370.97492762307383+x*b;
1000 b = -1721737.00820839662146+x*b;
1001 b = -853555.664245765465627+x*b;
1003 c = -351.815701436523470549+x*c;
1004 c = -17064.2106651881159223+x*c;
1005 c = -220528.590553854454839+x*c;
1006 c = -1139334.44367982507207+x*c;
1007 c = -2532523.07177582951285+x*c;
1008 c = -2018891.41433532773231+x*c;
1013 q = (x-0.5)*log(x)-x+ls2pi;
1014 if( x>(
double)(100000000) ) {
1020 q = q+((7.9365079365079365079365*0.0001*p-2.7777777777777777777778*0.001)*p+0.0833333333333333333333)/x;
1022 a = 8.11614167470508450300*0.0001;
1023 a = -5.95061904284301438324*0.0001+p*a;
1024 a = 7.93650340457716943945*0.0001+p*a;
1025 a = -2.77777777730099687205*0.001+p*a;
1026 a = 8.33333333333331927722*0.01+p*a;
1039 double igammaepsilon, igammabignumber, igammabignumberinv, result;
1040 double ans, ax, c, yc, r, t, y, z, pk, pkm1, pkm2, qk, qkm1, qkm2, tmp;
1042 igammaepsilon = 0.000000000000001;
1043 igammabignumber = 4503599627370496.0;
1044 igammabignumberinv = 2.22044604925031308085*0.0000000000000001;
1045 if((x<=(
double)(0))|| (a<=(
double)(0)) ) {
1046 result = (double)(1);
1049 if( (x<(
double)(1))||(x<a) ) {
1053 ax = a*log(x)-x-
lngamma(a, &tmp);
1054 if( (ax<-709.78271289338399) ) {
1055 result = (double)(0);
1072 pk = pkm1*z-pkm2*yc;
1073 qk = qkm1*z-qkm2*yc;
1074 if( !(qk==(
double)(0)) ) {
1076 t = fabs((ans-r)/r);
1085 if( (fabs(pk)>igammabignumber) ) {
1086 pkm2 = pkm2*igammabignumberinv;
1087 pkm1 = pkm1*igammabignumberinv;
1088 qkm2 = qkm2*igammabignumberinv;
1089 qkm1 = qkm1*igammabignumberinv;
1092 while((t>igammaepsilon));
1103 double igammaepsilon, ans, ax, c, r, tmp, result;
1105 igammaepsilon = 0.000000000000001;
1106 if( (x<=(
double)(0))||(a<=(
double)(0)) ) {
1107 result = (double)(0);
1110 if( (x>(
double)(1))&&(x>a) ) {
1114 ax = a*log(x)-x-
lngamma(a, &tmp);
1115 if( (ax<-709.78271289338399) ) {
1116 result = (double)(0);
1128 while((c/ans>igammaepsilon));
#define saf_assert(x, message)
Macro to make an assertion, along with a string explaining its purpose.
void utility_svvmul(const float *a, const float *b, const int len, float *c)
Single-precision, element-wise vector-vector multiplication i.e.
#define SAF_MAX(a, b)
Returns the maximum of the two values.
#define SAF_PId
pi constant (double precision)
void utility_sglslvt(void *const hWork, const float *A, const int dim, float *B, int nCol, float *X)
General linear solver (the other way): single precision, i.e.
void rand_0_1(float *vector, int length)
Generates random numbers between 0 and 1 and stores them in the input vector.
void utility_sglslv(void *const hWork, const float *A, const int dim, float *B, int nCol, float *X)
General linear solver: single precision, i.e.
void gexpm(float *D, int sizeD, int m1, float *Y)
Numerically solves first-order, linear, homogeneous differential equation systems,...
void utility_sglslvt_destroy(void **const phWork)
De-allocate the working struct used by utility_sglslvt()
void utility_sslslv_destroy(void **const phWork)
De-allocate the working struct used by utility_sslslv()
#define SAF_MIN(a, b)
Returns the minimum of the two values.
float sumf(float *values, int nValues)
Returns the sum of all values.
void utility_sslslv_create(void **const phWork, int maxDim, int maxNCol)
(Optional) Pre-allocate the working struct used by utility_sslslv()
void utility_svvadd(const float *a, const float *b, const int len, float *c)
Single-precision, vector-vector addition, i.e.
void utility_sglslvt_create(void **const phWork, int maxDim, int maxNCol)
(Optional) Pre-allocate the working struct used by utility_sglslvt()
void utility_sslslv(void *const hWork, const float *A, const int dim, float *B, int nCol, float *X)
Linear solver for SYMMETRIC positive-definate 'A': single precision, i.e.
float L2_norm3(float v[3])
Returns the L2 (Euclidean) norm of a 3-element vector.
void utility_svsmul(float *a, const float *s, const int len, float *c)
Single-precision, multiplies each element in vector 'a' with a scalar 's', i.e.
void ** malloc2d(size_t dim1, size_t dim2, size_t data_size)
2-D malloc (contiguously allocated, so use free() as usual to deallocate)
void * malloc1d(size_t dim1_data_size)
1-D malloc (same as malloc, but with error checking)
void * calloc1d(size_t dim1, size_t data_size)
1-D calloc (same as calloc, but with error checking)
void * realloc1d(void *ptr, size_t dim1_data_size)
1-D realloc (same as realloc, but with error checking)
void ** calloc2d(size_t dim1, size_t dim2, size_t data_size)
2-D calloc (contiguously allocated, so use free() as usual to deallocate)
#define FLATTEN2D(A)
Use this macro when passing a 2-D dynamic multi-dimensional array to memset, memcpy or any other func...
void * voidPtr
Void pointer (just to improve code readability when working with arrays of handles)
Particle filtering based 3D multi-target tracker (SAF_TRACKER_MODULE)
void tracker3d_update(void *const hT3d, float *Y, int Tinc)
Prediction update.
void tracker3d_particleDestroy(void **phPart)
Destroys an instance of a particle / Monte-Carlo Sample.
float gamma_cdf(float x, float gam, float beta, float mu)
Cumulative density function of a Gamma distribution.
void kf_update6(void *const hUp6, float X[6], float P[6][6], float y[3], float H[3][6], float R[3][3], float X_out[6], float P_out[6][6], float *LH)
Kalman Filter update step.
void tracker3d_particleReset(void *hPart)
Resets a particle structure to defaults.
int categ_rnd(float *P, int len_P)
Draws samples from a given one dimensional discrete distribution.
void kf_update6_create(void **const phUp6)
Creates helper structure for kf_update6()
void tracker3d_particleCopy(void *hPart1, void *hPart2)
Copies particle structure "hPart1" into structure "hPart2".
static double lngamma(double x, double *sgngam)
Natural logarithm of gamma function.
static double incompletegammac(double a, double x)
Complemented incomplete gamma integral.
void tracker3d_predict(void *const hT3d, int Tinc)
Prediction step.
void lti_disc(float *F, int len_N, int len_Q, float *opt_L, float *opt_Qc, float dt, float *A, float *Q)
LTI_DISC Discretize LTI ODE with Gaussian Noise.
int tracker3d_getMaxParticleIdx(void *const hT3d)
Returns the index of the most important particle.
void tracker3d_particleCreate(void **phPart, float W0, float dt)
Creates an instance of a particle / Monte-Carlo Sample.
void normalise_weights(voidPtr *SS, int NP)
Normalises the weights of the given particles.
float gauss_pdf3(void *const hUp6, float X[3], float M[3], float S[3][3])
Multivariate Gaussian PDF.
float eff_particles(voidPtr *SS, int NP)
Estimate the number of effective particles.
void kf_update6_destroy(void **const phUp6)
Destroys helper structure for kf_update6()
static double incompletegamma(double a, double x)
Incomplete gamma integral.
void kf_predict6(float M[6], float P[6][6], float A[6][6], float Q[6][6])
Perform Kalman Filter prediction step.
#define SAF_LOG_2PI
log(2pi)
void resampstr(voidPtr *SS, int NP, int *s)
Stratified resampling - returns a new set of indices according to the probabilities P.
Particle filtering based 3D multi-target tracker (SAF_TRACKER_MODULE)
#define TRACKER3D_MAX_NUM_EVENTS
Maximum number of possible events during update.
#define TRACKER3D_MAX_NUM_TARGETS
Spits out tracker status info to the terminal.
#define TRACKER3D_MAX_NUM_PARTICLES
Maximum number of particles.
Union struct for 3-D mean values.
Monte-Carlo Sample (particle) structure.
P66 * P
Current target variances; nTargets x ([6][6])
float dt
Elapsed time between each observation/measurement.
float W
Importance weight.
int * targetIDs
Unique ID assigned to each target; nTargets x 1.
float W0
PRIOR importance weight.
int nTargets
Number of targets being tracked.
int * Tcount
Time elapsed since birth of target (Tcount * dt); nTargets x 1.
float W_prev
Previous importance weight.
M6 * M
Current target means; nTargets x ([6])
Union struct for 3-D variance values.
Data structure for kf_update6()
User parameters for tracker3d.
float M0[6]
[0,1,2] Position of sound source PRIORs (x,y,z), [3,4,5] Mean velocity PRIORs (x,y,...
float cd
PRIOR probability of noise.
float init_birth
PRIOR probability of birth [0 1].
int ALLOW_MULTI_DEATH
FLAG whether to allow for multiple target deaths in the same tracker prediction step.
int FORCE_KILL_TARGETS
FLAG force kill targets that are too close to one another.
float P0[6][6]
Diagonal matrix, [0,1,2] Variance PRIORs of estimates along the x,y,z axes; [3,4,5] Velocity PRIORs o...
int maxNactiveTargets
Maximum number of simultaneous targets permitted.
int ARE_UNIT_VECTORS
1: if the Cartesian coordinates are given as unit vectors, 0: if not
float beta_death
Coefficient influencing the likelihood that a target will die; always >= 1.
float alpha_death
Coefficient influencing the likelihood that a target will die; always >= 1.
int Np
Number of Monte Carlo samples/particles.
float noiseLikelihood
Likelihood of an estimate being noise/clutter between [0..1].
Main structure for tracker3d.
float Q[6][6]
Discrete Process Covariance.
tracker3d_config tpars
User parameters struct.
float R[3][3]
Diagonal matrix, measurement noise PRIORs along the x,y,z axes.
int evta[TRACKER3D_MAX_NUM_EVENTS]
Event targets.
voidPtr str[TRACKER3D_MAX_NUM_EVENTS]
Structure after each event.
float evl[TRACKER3D_MAX_NUM_EVENTS]
Event likelhoods.
voidPtr * SS
The particles; tpars.Np x 1.
float A[6][6]
Transition matrix.
float evp[TRACKER3D_MAX_NUM_EVENTS]
Event priors.
float H[3][6]
Measurement matrix.
float imp[TRACKER3D_MAX_NUM_EVENTS]
Event distributions.
void * hKF6
kf_update6 handle