29 #include "fresnel.data" 31 #define PI 3.1415926535897932384 32 #define HALF_PI 1.5707963267948966192 33 #define TWO_PI 6.2831853071795864770 34 #define SQRT_PI 1.7724538509055160273 35 #define SQRT_PI_INV 0.56418958354775628695 36 #define SQRT_TWO_PI_INV 0.39894228040143267794 53 void polar(
double x,
double y,
double &r,
double &theta);
64 void fresnel(
double s,
double &S_f,
double &C_f);
74 double length,
double *x_f,
double *y_f,
double *theta_f,
double *kappa_f);
84 double *x_f,
double *y_f,
double *theta_f);
97 void global_frame_change(
double x,
double y,
double theta,
double local_x,
double local_y,
double *global_x,
101 void local_frame_change(
double x,
double y,
double theta,
double global_x,
double global_y,
double *local_x,
double get_epsilon()
Return value of epsilon.
int direction(bool forward, bool order)
double sgn(double x)
Return sign of a number.
void pointer_array_init(void *array[], int size)
Initialize an array with nullptr.
int array_index_min(double array[], int size)
Find index with minimal value in double array.
void fresnel(double s, double &S_f, double &C_f)
Fresnel integrals: S_f = int_0_s(sin(pi/2 u*u)du), C_f = int_0_s(cos(pi/2 u*u)du) approximated with C...
double twopify(double alpha)
Conversion of arbitrary angle given in [rad] to [0, 2*pi[.
void end_of_circular_arc(double x_i, double y_i, double theta_i, double kappa, double direction, double length, double *x_f, double *y_f, double *theta_f)
Computation of the end point on a circular arc x_i, y_i, theta_i: initial configuration kappa: curvat...
void polar(double x, double y, double &r, double &theta)
Computation of a point's polar coordinates.
void end_of_straight_line(double x_i, double y_i, double theta, double direction, double length, double *x_f, double *y_f)
Computation of the end point on a straight line x_i, y_i: initial configuration theta: angle of strai...
double pify(double alpha)
Conversion of arbitrary angle given in [rad] to [-pi, pi[.
void end_of_clothoid(double x_i, double y_i, double theta_i, double kappa_i, double sigma, double direction, double length, double *x_f, double *y_f, double *theta_f, double *kappa_f)
Computation of the end point on a clothoid x_i, y_i, theta_i, kappa_i: initial configuration sigma: s...
void double_array_init(double array[], int size, double value)
Initialize an array with a given value.
void global_frame_change(double x, double y, double theta, double local_x, double local_y, double *global_x, double *global_y)
Transformation of (local_x, local_y) from local coordinate system to global one.
double point_distance(double x1, double y1, double x2, double y2)
Cartesian distance between two points.
void local_frame_change(double x, double y, double theta, double global_x, double global_y, double *local_x, double *local_y)
Transformation of (global_x, global_y) from global coordinate system to local one.