ccc_gps2trackgeo
Custom Channel Configuration Function: ccc_gps2trackgeo
Description:
Calculates the track geometry from GPS data, such as:
- Distance to centerline (Vehicle (rear) center -> Track middleline)
- Distance to right boundaryline (Vehicle right edge -> Track boundary line right)
- Distance to left boundaryline (Vehicle left edge -> Track boundary line left)
- Curvature of centerline
WARNING: LANE CHANGES DURING THE MEASUREMENT CANNOT BE COVERED!
Syntax: [d2cl, d2rl, d2ll, curv] = ccc_gps2trackgeo(...
pLatFL,pLonFL,pLatFR,pLonFR,pLatRC,pLonRC,track)
Inputs:
pLatFL [1D double] Latitude coordinate of vehicle right edge
pLonFL [1D double] Longitude coordinate of vehicle right edge
pLatFR [1D double] Latitude coordinate of vehicle left edge
pLonFR [1D double] Longitude coordinate of vehicle left edge
pLatRC [1D double] Latitude coordinate of vehicle (rear) center
pLonRC [1D double] Longitude coordinate of vehicle (rear) center
track [char] Track name (according to road data, e.g. 'A7_S')
Outputs:
d2cl [1D double] Distance to centerline
d2rl [1D double] Distance to right boundaryline
d2ll [1D double] Distance to left boundaryline
curv [1D double] Curvature of centerline