laser_data_fisher.c
Go to the documentation of this file.
1 #include <math.h>
2 #include <egsl/egsl_macros.h>
3 
4 #include "csm_all.h"
5 
15  val fim = zeros(3,3);
16  int i;
17  for(i=0;i<ld->nrays;i++) {
18  double alpha = ld->true_alpha[i];
19  if(is_nan(alpha)) continue;
20 
21  double theta = ld->theta[i];
22  double beta = alpha-theta;
23 
24  double r = ld->readings[i];
25  double c = cos(alpha);
26  double s = sin(alpha);
27 
28  double z = 1 / cos(beta);
29  double t = tan(beta);
30 
31  double fim_k[9] ={
32  c*c*z*z, c*s*z*z, c*z *t*r,
33  c*s*z*z, s*s*z*z, s*z *t*r,
34  c*z*t*r, s*z*t*r, t*r *t*r
35  };
36 
37  egsl_push();
38  val k = egsl_vFda(3,3,fim_k);
39  add_to(fim, k);
40  egsl_pop();
41  }
42  return fim;
43 }
void egsl_pop()
Definition: egsl.c:89
Definition: egsl.h:12
#define add_to(v1, v2)
Definition: egsl_macros.h:25
double *restrict theta
Definition: laser_data.h:21
void egsl_push()
Definition: egsl.c:88
double *restrict true_alpha
Definition: laser_data.h:34
double *restrict readings
Definition: laser_data.h:24
val ld_fisher0(LDP ld)
int is_nan(double v)
Definition: math_utils.c:60
#define zeros(rows, cols)
Definition: egsl_macros.h:19
val egsl_vFda(size_t rows, size_t columns, const double *)


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23