33 #define eps 0.001//epsilon definition
39 #define ABS(x) (((x) > 0) ? (x) : (-(x)))
47 #define M_PI 3.14159265358979323846
84 for (
int k=0; k<code_length; k++)
89 double b=
M_PI*(4*sigma)*deltat;
97 k-round(code_length/2));
98 double tn=h*(s1+4*s4)/3;
99 double ta=tn+2*
eps*tn;
116 k-round(code_length/2+.5));
119 tn = h*(s1+2*s2+4*s4)/3;
123 sum_code=sum_code+code[k];
126 for (
int k=0; k<code_length; k++)
127 code[k]=code[k]/(deltat*sum_code);
162 return( pow(xi/(2*sin(xi/2)),0.5)*
164 pow(
gaussian_w(sigma,xi/deltat),0.25)*cos(k*xi));
200 double velocity_max=4*sigma;
201 if (
ABS(xi)>velocity_max*
M_PI)
return(0);
206 double b=velocity_max;
212 double tn=h*(s1+4*s4)/3;
213 double ta=tn+2*
eps*tn;
231 tn = h*(s1+2*s2+4*s4)/3;
265 return(exp(-velocity*velocity/(2*sigma*sigma))/
ABS(velocity));
double gaussian_integrand(double sigma, double deltat, double xi, int k)
Function to integrate in order to compute the a_k coefficient of the code; gaussian motion model...
void gaussian_optimiser(double *code, double sigma, int code_length, double deltat)
Computes the a_k coefficients of the code; gaussian motion model.
double gaussian_w(double sigma, double xi)
Computes the W() function; gaussian motion model. This is equation (15): W():={}^{4{ N}} ({{-v^2}{2{ ...
double gaussian_w_integrand(double velocity, double sigma, double xi)
Function to integrate in velocity to get the W function; gaussian motion model. This is the integrand...