$darkmode
g1_fitting.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void g1_fit::calc_clothoid (double x0, double y0, double theta0, double x1, double y1, double theta1, double &k, double &dk, double &l)
 
void g1_fit::calc_std_fresnel_integral (double y, double &int_c, double &int_s)
 

Function Documentation

◆ calc_clothoid()

void g1_fit::calc_clothoid ( double  x0,
double  y0,
double  theta0,
double  x1,
double  y1,
double  theta1,
double &  k,
double &  dk,
double &  L 
)

Compute clothoid parameters from a start and an endpoint. The clothoid curve is defined as x(s) = x0 + \int_0^s cos( 0.5*dk*t^2 + k*t + theta0 ) dt y(s) = y0 + \int_0^s sin( 0.5*dk*t^2 + k*t + theta0 ) dt

Refer to Eq. 1 in https://arxiv.org/pdf/1209.0910.pdf.

Parameters
x0x(0) in equation above [m].
y0y(0) in equation above [m].
theta0Curve angle at s=0 [rad], theta(s)= 0.5*dk*t^2 + k*t + theta0.
x1x(L) in equation above [m].
y1y(L) in equation above [m].
theta1Curve angle at s=L [rad].
kCurvature at s=0 [1/m], see equation above.
dkCurvature change [1/m^2], see equation above.
LClothoid length [m] from (x0, y0) to (x1, y1).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_std_fresnel_integral()

void g1_fit::calc_std_fresnel_integral ( double  y,
double &  int_c,
double &  int_s 
)

Compute standard Fresnel integrals: c(y) = \int_0^y cos( (pi/2)*x^2 ) dx s(y) = \int_0^y sin( (pi/2)*x^2 ) dx

Refer to Eq. 14 in https://arxiv.org/pdf/1209.0910.pdf.

The present algorithm is described in Thompson, W. J., 1997. Atlas for Computing Mathematical Functions: An Illustrated Guide for Practitioners with Programs in C and Mathematica with CDrom, 1st Edition. John Wiley & Sons, Inc., New York, NY, USA,

using the modifications proposed by Venkata Sivakanth Telasula (2023). Fresnel Cosine and Sine Integral Function (https://www.mathworks.com/matlabcentral/fileexchange/9017-fresnel-cosine-and-sine-integral-function), MATLAB Central File Exchange.

Parameters
ySee equation above.
int_cFresnel cosine integral.
int_sFresnel sine integral.
Here is the call graph for this function:
Here is the caller graph for this function: