Home

OpenCRG User Manual

image

Contents

1. Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead Table of Contents UPTTOCUIG TIO Mes os feta cis setety eaten ay 5 a e Eeo AE A E E E E E 5 1 2 The OpDencBG DSAPIS sse ecl nctactesascictsantynsoeands coal ontaoin atwstsecsaemnanaizsidbaladtaionecind ponesttedtheu 5 1 2 1 cup occ ccatentic EE 5 122 StatUS n 5 1 3 The OpenCRG Matlab Tools tette tette tents 5 1 3 1 Siu 5 TA Ponto COMACE siia iens e serie bac tere aca geh eL eng etas subtus Lo ddr ese bean EAEE tenes 6 EE SU ritu Pt TURPITER E 7 2 1 MOTIVATION Em 7 ZERO tede c 7 2 3 Reference Line Data Representation sssssssssseseeeee eene nennen nnne 7 2 3 1 Reference Line Path Integration c ce ceeeeseeceeeenneeeeeeneeeeeeaaeeeeeeaaeeeseeaaeeeseeaeeeeeenaeeeeneaaes 7 B ODE Cp 21 lt u cameron tc Obr debba NM OS PIC Ee Sn TU UE 9 3 1 Mci tricst TIT 9 3 2 COMMONS tenere eorpore erii renean uina rnxrid esed Perieg feres pu s EREA aS 10 3 3 The Sections in Detail etr retire mean E eec knee bbs Pea pee RE n se ERR EN Ryu RAE 10 3 3 1 Header MO Mato Me E 10 3 3 2 intere duin 11 3 3 3 BEIM m 12 3 3 4 Modifiers and Options sssssssssssessssesee ener enne adaa nennen nns naana 13 3 3 5 File REIGrenCe ee c RR 13 3 3 6 Hoad Datarcc seio ter iter
2. Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy default settings Example 11 options file border mode V dCrgBorderModeE OpenCRG managing the road surface ahead flect handmade_vtest crg unmodified data crgPlotData txt tettt4 4 4 B 4 6 n E ttt 4 B A A orenen wano option settings reflect data in v direction crgPlotData txt x ou 0 x Oe Example 12 options border mode V dCrgBorderModeExRepeat border offset V 1 m file handmade_vtest crg default settings option settings eciried dete repeat data in v direction with offset crePlotData txt crgPlotData txt 6 7 44444444444 6 5 5 4 4 3 S 3 2 Ld 2 1 1 0 ttt t eee 6G 9 x y 0 x ou Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page V12009 050 M 37 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 8 2 Smoothing Zones In order to provide a smooth on set and or off set of z data the begin and end of the data including slope and bank may be scaled linearly from zero to full size within a user defined range at either end of the core area Again core area is the original data extent defined in the data file which is not subjec
3. Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 4 2 7 4 Scaling of Elevation Data OpenCRG managing the road surface ahead Various properties influencing the elevation of the data set may be scaled These are listed in the following table A scale value of 0 will lead to ignoring the respective property C API data file symbolic constant data type values name values dCrgModScaleZ double SCALE Z dCrgModScaleSlope double SCALE SLOPE dCrgModScaleBank double SCALE BANK Example 1 modifier z scale 10 0 file handmade straight crg original data set unmodified data crgPlotData txt Example 2 modifier slope scale 10 0 file handmade_sloped crg original data set unmodified data crgPlotData txt x 0 y modified data set z scale 10 0 crgPlotData txt 7 Ou 9 modified data set slope scale 10 0 crgPlotData txt 14 12 10 onan Date April 08 2015 Title OpenCRG User Manua Name various Document No Issue Page VI2009 050 M 26 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy Example 3 modifier file bank scale 10 0 handmade_banked crg original data set D i abkornw unmodified data crgPlotlata txt OpenCRG managing the road surface
4. Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 2 OpenCRG 2 1 Motivation OpenCRG is a complete open source project including a tool suite for the creation modification and evaluation of road surfaces and an open file format specification CRG curved regular grid Its objective is to standardize a detailed road surface description and it may be used for applications like tire vibration or driving simulation 2 2 The CRG Idea A curved regular grid CRG represents road elevation data close to an arbitrary road centre line The reference line may be complemented by slope or superelevation and is defined by consecutive heading angles Lateral CRG cuts are orthogonal to the reference line figures Rauh all 2008 s 4 The regular grid defines the elevation in proximity of the reference line Columns are longitudinal cuts that are parallel to the reference line Each row represent a lateral cut which is orthogonal to the reference line 2 3 Reference Line Data Representation The curved reference line is defined by a high precision start position and low precision heading angles A potential drift due to path integration is prevented by redundant high precision end location of the reference line Rauh all 2008 s 6 Curved Reference Line x u y u 2 3 1 Reference Line Path Integration High precision
5. 4 2 8 1 Border Modes in u and v Directions The border modes influence per direction the z value returned when the original definition area i e within the min and max u and v co ordinates is exceeded by a query For each border the following behaviors may be defined e return NaN error i e refuse the query set the value to zero keep the last value repeat the core area data reflect the core area data In order to mark the border itself a z offset may be applied when the border is crossed in either direction The interface for defining the respective modes is as follows default values are highlighted C API data file symbolic constant data values name values type dCrgCpOptionBorderModeU int dCrgBorderModeNone BORDER MODE U 0 dCrgBorderModeExZero 1 dCrgBorderModeExKeep 2 dCrgBorderModeRepeat 3 dCrgBorderModeReflect 4 dCrgCpOptionBorderModeV int dCrgBorderModeNone BORDER MODE V 0 dCrgBorderModeExZero 1 dCrgBorderModeExKeep 2 dCrgBorderModeRepeat 3 dCrgBorderModeReflect 4 dCrgCpOptionBorderOffsetU double BORDER OFFSET U dCrgCpOptionBorderOffsetV double BORDER OFFSET U Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page V12009 050 M 31 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead Example 1 options
6. 54 5 3 1 3 Sim EET 54 5 3 1 4 etidm 54 5 3 1 5 Coherence of azimuth direction angle alteration curve radius and clothoid parameter 55 Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 4 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead Introduction 1 1 Scope This document provides an overview of the APIs C Matlab which can be used for evaluating and manipulating OpenCRG data sets It also contains a brief description of data formats used for storing OpenCRG data 1 2 The OpenCRG C API The OpenCRG C API consists of a library and a set of tools The latter also serves as a collection of examples for the usage of the library All routines are provided in full source code The library can be used for reading modifying and evaluating OpenCRG data sets The API may be used free of charge in accordance with the licensing terms listed at the beginning of this document 1 2 1 Platforms The OpenCRG C API is written in ANSI C and is supposed to be independent of hard and software platforms It was successfully tested in the following environments e Linux on PC e MS Windows XP on PC e rix on sgi workstations Big and little endian encoding of a given processor is detected automatically in the API 1 2 2 St
7. C API data file symbolic constant data type value name value dCrgModRefPointUFrac double 0 0 REFPOINT U FRACTION 0 0 dCrgModRefPointUOffset double 0 0 REFPOINT U OFFSET 0 0 dCrgModRefPointVFrac double 0 0 REFPOINT V FRACTION 0 0 dCrgModRefPointVOffset double 0 0 REFPOINT V OFFSET 0 0 dCrgModRefPointX double 0 0 REFPOINT X 0 0 dCrgModRefPointY double 0 0 REFPOINT Y 0 0 dCrgModRefPointZ double 0 0 REFPOINT Z 0 0 dCrgModRefPointPhi double 0 0 REFPOINT PHI 0 0 dCrgModGridNaNMode int dCrgGridNaNKeepLast GRID NAN MODE 2 Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page V12009 050 M 23 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 4 2 7 2 Transforming Data by Reference Point The data set may be re located by defining a reference point in the u v grid and an inertial target position and orientation O penCRG managing the road surface ahead The reference point may be defined using explicit u v values C API data file section CRG_MODS symbolic constant data type values name values dCrgModRefPointU double REFPOINT_U dCrgModRefPointV double REFPOINT V It may also be defined using relative u v values and explicit offsets in m from these relative positions or by mixing the former position mode with the current one C API data file symbolic constant data type va
8. data If you re looking for tools for creating data sets please refer to the Matlab routines also available via the OpenCRG website The base library is contained completely in the subdirectory baselib of the OpenCRG software package It has the following structure inc all include files obj objects and library resulting from compilation src all source files makefile the makefile for compiling the library Once compiled with the provided makefiles the library is stored as archive in the directory lib below the OpenCRG root directory 4 2 2 Include Files The API comes with two include files baselib inc crgBaseLib h baselib inc crgBaseLibPrivate h The first include file will typically be used when writing own applications featuring the OpenCRG library The second include file is used internally by the library s components and therefore can be ignored in most cases It includes itself the first library so when working with the private header you don t have to include the public header explicitly 4 2 8 Source Files The library is composed of the following source files which are located in baselib src crgMgr c overall data management crgMsg c message data log handling crgStatistics c calculation of data set statistics crgContactPoint c contact point management crgEvalxy2uv c routines for evaluating x y gt u v crgEvaluv2xy c routines for evaluating u v gt x y crgEvalz
9. Document No Issue Page VI2009 050 M 58 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 3 1 2 Curvature Curvature can be divided into sections independent of banking and slope It is described by a polynomial of grade 2 The following represents a possible curvature matrix definition c LC1 1 Ris 1 Rte 1 R1s LC1 LC2 1 R2s 1 R2e 1 R2s LC2 LC1 LC2 section length R1s R2s section starting radius Rie R2e section ending radius See also crg test gen csb2crgO 5 3 1 3 Slope Slope can be divided into sections independent of banking and curvature It is described by a polynomial of grade 2 The following represents a possible slope matrix definition s LS1 Sts Ste Sts LS1 LS2 S2s S2e S2s LS2 LS1 LS2 section length S1s S2s section starting slope S1e S2e section ending slope See also crg test gen csb2crgO 5 3 1 4 Banking Banking can be divided into sections independent of slope and curvature It is described by a polynomial of grade 2 or grade 3 The following represent possible slope matrix definitions b LB1 Bis Bte B1s LB1 LB2 B2s B2e B2s LlB2 IP or non linear for section LB2 b LB1 Bis Ble B1s LB1 LB2 B2_a B2_b B2 c B2_d Jos IP LB1 LB2 section length B1s B2s section
10. Name yarious Document No Issue Page VI2009 050 M 33 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead Example 5 options border mode U dCrgBorderModeExReflect file handmade_sloped crg default settings option settings default settings reflect data in u direction crgPlotData txt crgPlotData txt 1 4 1 2 0 8 0 6 0 4 0 2 9 a Example 6 options border mode U dCrgBorderModeExRepeat border offset U 1 m file handmade sloped crg default settings option settings default settings repeat data in u direction with offset crgPlotData txt crgPlotData txt Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 34 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy Example 7 options file default settings oR Nw ko border mode V dCrgBorderModeNone handmade_vtest crg unmodified data crgPlotData txt tettt4 4 4 B 4 6 n E Het e eter A A A Ou 0 Example 8 options file default settings o e wm Ww ko border mode V dCrgBorderModel handmade vtest crg unmodified data crgPlotata txt Het tee e tate He teeter B AAA oeren wa aoo OpenC
11. agreed to in writing software distributed under the License is distributed on an AS IS BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied See the License for the specific language governing permissions and limitations under the License More Information on OpenCRG open file formats and tools can be found at http www opencrg org SLA RR A kk kkk kk kk k k k kk k KC k k k k k k k k k k k k KC KC k k k k k kk k k k kk k k k GG k Note that in the example the header information block is terminated by the character in the bottom line The character labels all following characters to be treated as comment and thus to be ignored by the data loader They have just been added for user readability of the data file Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 10 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 3 3 2 Road Parameters The road parameter section defines various parameters for the reference line and the overall configuration of the longitudinal sections The minimum content that must be defined is the distance between lateral cross sections REFERENCE_LINE_INCREMENT All other parameters are optional A complete road parameter list including MATLAB API equivalents and descriptions is listed at ma
12. border mode U dCrgBorderModeNone file handmade_sloped crg default settings option settings default settings refuse query exceeding u dimensions of data crgPlotData txt ergPlotData txt 1 4 1 2 1 S 0 8 ix SS Example 2 options border mode U dCrgBorderModeExZero border mode V dCrgBorderModeExZero border offset U 1 m file handmade_sloped crg default settings option settings default settings set elevation to zero when exceeding u and v dimensions of data apply 1 0m offset for u crgPlotData txt crgPlotData txt 1 5 1 0 5 1 4 ag 0 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 32 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy Example 3 options file border mode U dCrgBorderModel handmade sloped crg default settings default settings crgPlotData txt OpenCRG managing the road surface ahead ExKeep option settings keep last value when exceeding u dimensions of data crgPlotData txt Example 4 options file border mode U dCrgBorderModel handmade sloped crg default settings default settings crgPlotData txt ou 0 ExRepeat option settings repeat data in u direction crgPlotData txt Date April 08 2015 Title OpenCRG User Manual
13. ecco all source files required for the tool eSCERDOS sedane all include files required for the tool except for BaseLib includes I MeO gekacece te the resulting object files t Makefile the makefile for compilation of the tool Once a tool is compiled its executable file will be located in Tools bin 4 3 2 Simple This is a very simple example for the usage of the C API executable crgSimple command line crgSimple options CRG data file gt options h show online help 4 83 8 Reader Read a file and print some debug information executable crgReader command line crgReader options CRG data file gt options h show online help 4 3 4 Co ordinate conversion x y and u v Perform a series of conversions between x y and u v co ordinate and check for consistency The routines adapt automatically to the contents i e extents of the data file executable crgEvalxyuv command line crgEvalxyuv options CRG data file gt options h show online help Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 41 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 3 5 Evaluation of z Data Perform a series of z data queries The routines adapt automatically to the contents i e extents of the data
14. is used for defining options and modifiers see below and the actual data is contained in a separate file A typical application for referring to other files is shown in the following figure master file included file Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 9 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 3 2 Comments Comments may be defined in two ways e the character at the beginning of a line makes the entire line a comment e the character within a line will cause all following characters to be treated as comment until the end of the line 3 3 The Sections in Detail 3 3 1 Header Information Each data file MUST start with a comment block header information giving some information about the file s contents preferably etc The keyword is SCT Example CT comment text block CRG file example for road surface description width 3m length 22m with sloped referenceline and grid of 0 25m 1 0m x 1 0m Copyright 2005 2014 OpenCRG Daimler AG Jochen Rauh Licensed under the Apache License Version 2 0 the License you may not use this file except in compliance with the License You may obtain a copy of the License at http www apache org licenses LICENSE 2 0 Unless required by applicable law or
15. noue nae Erano Er eE PE ae y Ped au EXE a dae abad 40 4 2 8 5 History Manipulatlon 5 icis eid a ei denne peek iee e reple rir tds 40 4 2 8 6 History Search Criteria 02 2 ceccececeesecceeeeneeeesaeeeecaeeeeeeeseaeeeeaaeseaaeseeeeeeaaeseeaaeseeeaeeaes 40 CIE T 41 4 3 1 eul P 41 4327 Io eR TEE 41 4 3 3 pile CEP 41 4 3 4 Co ordinate conversion x y and UV ssssssssssssseseeeeeen enne nnns nnne nens 41 4 3 5 Evaluation of Z Dala ec e reta itte qe Innen Ee ERE eR XR ERE eed tke pee nga En SUPR aai 42 4 3 6 X Application of Options and Modifiers essen 42 5 The OpenCRG Matlab TOUS vsceiniaauidscscnssisuincratoninusssivectvcsisandctneunsisendancaynauewsidsbancsbietane teretes des 43 5 1 Getting Started EAE 43 5 1 1 Downloading the Software PackagQe cc ccccscceceeeeeeeeceeeeseeeeesaeeeeaaeeeeeeeeseaeeeeaeeeeneeees 43 5 1 2 Release Notes isuria EUER 43 5 1 3 Contents of the Package ssssssssssssssssesesteee enne entren nentes i tnnt rennen nns 43 5 1 4 Working with OpenCRG Matlab Tools tenens 44 5 1 4 1 rum m 44 5 1 4 2 er unelal c E 44 5 1 5 Formatting M File Comments sessssssssseseseseeeeen enne en nennen rnnt nnne 44 5 1 6 DEMOS coke tee e ORKNNEARERN EE KRE Fu ca tugs e VERAS sndanhs FUE YABRNIR
16. shall only be stated that the keywords are Options SROAD CRG OPTS Modifiers ROAD_CRG_MODS Example SSROAD_CRG_OPTS crg runtime evaluation options BORDER MODE U 0 return NaN BORDER MODE U 1 set zero BORDER MODE U 2 keep last default BORDER MODE U 3 repeat BORDER OFFSET U 1 0 z offset beyond border default 0 BORDER MODE V 0 return NaN BORDER MODE V 1 set zero BORDER MODE V 2 keep last default BORDER MODE V 3 repeat BORDER OFFSET V 1 0 z offset beyond border default 0 SU kCkCkCk kk Ck kk kk kk Ck Ck kk kk kk Ck kk Ck kk Ck ko kk Ck kk Ck Ck kk Ck ko kk kk Ck kk kk kk kc ke kk ko kk ke ke ke ke NOTE In the API routines default modifiers and options are defined Options provided in an individual data file may alter the default values of the respective options Defining a modifier block in the data file will trigger the removal of ALL default modifiers The user defined modifiers will be set according to the information provided in the data file If the user provides an empty sroap_crc_mops block then no modifiers will remain at all for default modifiers see also 4 2 7 1 3 3 5 File Reference OpenCRG files may contain references to other files typically containing the actual data In the master file conventions for modifiers and options will typically be defined File references may contain absolute or relative paths and environment variables The k
17. start position ending position and consecutively heading angles allow to determine accurate reference line position data x u y u Insufficient data precision leads to locally bad curvature representations achieved by simple 3 point evaluations Rauh all 2008 s6 Both OpenCRG tools suite APIs operate with a backward forward integration to determine reference line position data The given high precision start and end positions are compared to the integration results to determine whether the input describes a smooth track Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 7 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead Dr Rauh J Schindler H Lothar W Dr Kersten T Zipperer W OpenCRG A unified approach to represent 3D road data in tyre simulation Presentation from the AK 6 1 3 Tire Models for Vehicle Dynamics Ride Comfort and Uneven Roads 11 12 2008 Slide 4 6 Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 8 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 3 OpenCRG Data Files 3 1 The Basics OpenCRG data files co
18. starting banking B1e B2e section ending banking B2 a B2 b B2 c B2 d section polynomial coefficients See also crg test gen csb2crgO Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 54 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 3 1 5 Coherence of azimuth direction angle alteration curve radius and clothoid parameter Based on Dr Klaus Muller Daimler AG considerations to calculate sensible parameter for road construction y alignment axis L L L Ao 4 44 2R R 2R with R radius L length clothoid 1 L length circular arc L5 length clothoid 2 common in road construction 1 R lt SL lt R 3 1 RSL SR 3 hence Lio 2 f5 R choose 0 lt fi yields to L L 1 Ades n d P Ab f f 2 R 2 R 2 Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 55 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy
19. the function CRG elevation grid border modes in u and v directions bdmu at beginning and end default 2 bdmv at left and right side default 2 0 return NaN 1 set zero 2 keep last 3 repeat 4 reflect bdou z offset beyond border default 0 bdov z offset beyond border default 0 bdss smoothing zone length at start bdse smoothing zone length at end CRG reference line continuation rflc how to extrapolate default 0 0 follow linear extrapolation 1 close track CRG reference line search strategy sfar far value default 1 5 scls close value default sfar 5 CRG message options wmsg warning messages default 1 wevl local curvature limit exceeded d 1 wcvg global curvature limit exceeded d 1 lmsg log messages default 1 leva evaluation inputs and results default 20 levf how often default 1 lhst refline search history default 1 lhsf how often default 100000 lsta evaluation statistics default 1 lstf how often default 100000 CRG check options ceps expected min accuracy default 1e 6 cinc expected min increment default 1e 3 ctol expected abs tolerance default 0 1 cinc 5 3 Tools 5 8 1 crg gen csb2crg0 Generate synthetic roads cerg gen csb2crgO allows to simple generate crg files including slope s banking b and curvature c in MATLAB crg_gen_csb2crg0 inc u v c s b The minimal input parameter are increment inc and length information in u
20. tools suite uses one structure which shall be briefly explained here For further explanation run crg_intro data sce se see oe ele 6 wow ws variable name heaQd ieicie 9 oe es es struct array of data scalars SeccmoOSss Sd A Sele iere ec data which defines further CRG modifiers O S ILLE RA eee a A A ee data which defines further CRG processing options SSE ES eyes iusserit igneis EG cell array of comment text required for file output c dGSU EUDEb ls ne eELbeRRee optional cell array of further structured data used IEEE for file output may contain opts data for later CRG pa I file processing cC T SI Sadat haar ae tetas bius name of read crg data file us PN P Ic array nu nv of z height values single aa LEUR EORR Te Te ee vector of v values single SSSH Die s a eae de ease d rae a optional vector of banking values single SSS cde cee ce eee AO AR NO ACA vector of u values single SSE R optional vector of phi values single Si PAD RN ERA C E optional vector of slope values single Not all structure fields are required and some are derived by crg check routines A minimum CRG content consist of struct fields u v and z All necessary extended data can than be derived by the crg_check routine data struct empty struct data z single repmat 0 01 peaks 101 2 1 z values data u 2 01 set u space data v 0 255 set v space data crg check data crg s
21. v direction data crg gen csb2crgO 1 0 5 100 2 Please also see crg test gen csb2crgO crg test gen road crg demo gen sl and cerg demo gen syntheticStraight for additional examples handling synthetic road generation Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 52 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 3 1 1 Cross sections Creating non equidistant cross sections v is up to the developer Nevertheless the OpenCRG Matlab Api provides several demonstrations crg_demo_gen_sl how a readable v profile could be set up The task is devided into two steps AF Create readable profiles yourself 2 Generate v profile for crg_gen_csb2crg0 m crg_check_uv_descript m 5 3 1 1 1 Create profile s The next example shows one possibility to create profiles Please note the comments for explanation STEP 1 create longitudinal and lateral profile s like this u gt coordinate begin middle sections coordinate left origin left hand side right hand side width of whole road gt center of road profile gt raughness gt name_sect gt name_prof offset or amplitude to origin ubeg width sections a 3 so width sect ones size vwp road sect uwp roa
22. 015 Title OpenCRG User Manua Name yarious Document No Issue Page VI2009 050 M 21 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead If a user wants to perform custom message handling a callback may be defined which is invoked instead of the internal print routines The syntax for setting the callback is printf syntax via crgMsgSetCallback int func int level char message An example for custom message handling is given in the demo EvalOptions src main c Look for the method myMsgHandler 4 2 7 Modifiers As mentioned above the OpenCRG data set stored in memory may be globally modified by means of so called modifiers The C API provides a series of methods for defining querying and printing modifiers of a data set These are described in further detail in the header file crgBaseLib h and are following the naming pattern crgDataSetModifierxxx dataSetId The following tables and figures give an overview of all applicable modifiers with their respective definitions within OpenCRG data files and with their addressing from the API All examples have been computed using the test tool located in Too1s EvalOptions via the script testModifiers shin Tools bin 4 2 7 1 Default Modifiers The C API similar to the Matlab API defines a set of default modifiers which are app
23. NE SERES RUN E SR we RAN IRE ONKN AAA 44 5 1 7 SEHEN 44 5 1 8 Publishing script Iles sarsa Pete DOR IE REESE a ind eno ARE RR 44 5 1 8 1 Extensible stylesheet language XSI eeeene n 44 5 1 8 2 Publish to pdf EMUX isis edere ceperit teen te eene eren ated bec ee Re 45 5 1 8 3 Hint on memory limitations eccna nene enne 45 52 The Base AN ri Em 46 5 2 1 GNI M E M 46 5 2 2 Demo HHLIrf EE 46 B23 dglncee CE 46 D24 Library Files e C C 46 5 2 4 1 LUCI EIER HE 46 5 2 4 2 A Vuleniie c cf ccicehteaweds ded cas si aneedinec cea vec taabendel caavs ia aaa aa ai aE 47 5 2 4 3 Generalin OOS PLE 47 5 2 4 4 Modification tool EHE 47 5 2 4 5 JO TIESTOOIS EE 47 5 2 4 6 Visualization tools saninin aaa ert ER REIR a a anaa E Ea a 48 5625 Working with Data Files tci tota Ete aia KERNA SARGA 49 5 2 5 1 Simple Use Case ER 49 5 2 5 2 CRG data Structure is iscccieacetteadscaciatasstieivassccteaasedtiadaasiiis RAN ARANEAE KENAA ARNES 49 5 2 5 3 Modifiers and Options iit Ce naian aeaa aaaea aaah 50 5 2 6 iiselirgm m aiina aaa a ua alte a a aaa aaa a aaa 51 52 OPUONS ER 52 AP MEI eL 52 5 3 1 crg gen csb2crg0 Generate synthetic roads ssssssssssseeeeee 52 5 3 1 1 CIOSS SOCLONS ROME 53 5 3 1 1 1 Create profile S erinnerte iria aa altri dcn at 53 5 3 1 1 2 Create profile vector entente nnne nennen snnt entrent 53 5 3 1 2 NEU E
24. OpenCRG managing the road surface ahead Project OpenCRG Document No Issue Title User Manual VI2009 050 M Date April 08 2015 no of pages 53 Issuing Party VIRES Simulationstechnologie GmbH Author various Distribution List public Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page V12009 050 M 1 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead OpenCRG Licensing The following license terms apply to this document the OpenCRG tools and libraries Copyright 2015 VIRES Simula Licensed under the Apache tionstechnologie GmbH License Version 2 0 the License you may not use this file except in compliance with the License You may obtain a copy of t http www apache org Unless required by applica he License at licenses LICENSE 2 0 ble law or agreed to in writing software distributed under the License is distributed on an AS IS BASIS WITHOUT WARRANTIES OR COND TIONS OF ANY KIND either express or implied See the License for the specific language governing permissions and limitations under the License Printed in Germany April 2015 Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 2 of 55
25. RG managing the road surface ahead option settings refuse query exceeding v dimensions of data ExZero oF Nw amp oco option settings crePlotData txt set elevation to zero when exceeding v dimensions of data Fete tte 6 n n tebe tee n n n crePlotData txt E ues B x ou 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 35 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy Example 9 options border mode V dCrgBorderModeExKeep file handmade_vtest crg default settings unmodified data crgPlotData txt tettt4 4 6 B 4 6 n E o e m ow ko oD tet e eter A A A o e Nw ko OpenCRG managing the road surface ahead option settings keep last value when exceeding v dimensions of data ttt A B AAA x Our o x 0 y 0 Example 10 options border mode V dCrgBorderModeExRepeat file handmade_vtest crg default settings unmodified data ergPlotData txt ttt eee AAA o NW RO OD Fete tee 6 4 6 n option settings repeat data in v direction crgPlotData txt crgPlotData txt x y 0 x Ou 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 36 of 55
26. able data set for constantly elevated road handmade sloped crg user readable data set for sloped data set handmade sloped opt crg user readable data set for sloped data set w options handmade straight crg user readable data set for straight refline handmade straight double crg user readable data set for st refline in double prec handmade straight minimalist crg data set for minimalist straight refline handmade vtest crg user readable data set for tests relating to v options testOptionBorderMode crg master file including data file and setting options Available as additional sample at www opencrg org download htm Other files may be added to the data directories without further notice or explicit description in this documentation Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 14 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 The OpenCRG C API 4 1 Getting Started 4 1 1 Downloading the Software Package The latest stable version of the OpenCRG C API may be retrieved via the website www opencrg org Go to the Downloads area and look for the section Packages and Tools There you will find a package containing the C API MATLAB routines documentati
27. ad 5 1 8 2 Publish to pdf Linux A simple makefile is provided to generate pdf s from Matlab files in path to OpenCRG docsrc make Publish your scripts to latex output using the OpenCRG extensible stylesheet language file path to OpenCRG docsrc xsl openCRG mxdom21atex xsl Make sure you select jpg as image type Copy the makefile into your destination folder and execute it by make function name pdf The Makefile will copy the pdf in a subdirectory pdf Make sure pdflatex is installed Use make clean to delete all latex generated files beside the Makefile 5 1 8 3 Hint on memory limitations With 32bit Matlab available memory is sometimes rather limited especially on WIN32 systems see Matlab help on memory On a typical WIN32 installation with 4GB only 440MB of continuous memory was available use feature memstats to show on your system This allows to work on 220MB CRG files with e g 1cm x 1cm resolution 4m with and 1 4km length On Linux32 at least double file sizes can be handled On all 64bit installations there is virtually no limitations in CRG size Date April 08 2015 Title OpenCRG User Manua Name yarious Document No Issue Page VI2009 050 M 45 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 5 2 The Base Library 5 2 1 Overview The base library contains a large set of rou
28. ahead modified data set bank scale 10 0 crgPlotlata txt 4 mb onm x Our 0 0 y 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 27 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 7 5 Scaling of Data Set Extents The length and width of the data set may be scaled Only values greater than zero are valid C API data file symbolic constant data type values name values dCrgModScaleLength double 0 0 SCALE_LENGTH 0 0 dCrgModScaleWidth double 0 0 SCALE WIDTH 0 0 Example 1 modifier length scale 10 0 file handmade_sloped crg original data set modified data set unmodified data length scale 10 0 crgPlotData txt crgPlotData txt xe y 0 Example 2 modifier width scale 2 0 file handmade banked crg original data set modified data set unmodified data vidth scale 2 0 crgPlotData txt orgPlotData txt x ou 0 x 0 y 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 28 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 7 6 Scaling of Curvature The refere
29. atus The OpenCRG C API is in release status This implies that e all available routines were tested on simplified examples e performance optimization is in advanced state 1 8 The OpenCRG Matlab Tools The OpenCRG Matlab Tools are provided on any system distributions including Matlab R14 or higher No Toolbox or additional extensions are required It is successfully tested in the following environments e Linux on PC incl Matlab R 14 or higher e MS Windows XP on PC incl Matlab R 14 or higher 1 83 1 Status The OpenCRG Matlab Tools are in release status This implies that e all available routines were tested on simplified examples Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 5 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 1 4 Point of Contact Further assistance concerning OpenCRG and the C API is provided via the OpenCRG website www opencrg org via email opencrg opencrg org and via the classic style of direct contact with human beings VIRES Simulationstechnologie GmbH Grassinger Strasse 8 83043 Bad Aibling Germany phone 49 8061 939093 0 fax 49 8061 939093 13 Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 6 of 55
30. c routines for evaluating x y gt Z u v gt Z crgEvalpk c routines for evaluating x y phi kappa u v phi kappa crgLoader c data file decoder and data loader crgOptionMgmt c management of options and modifiers crgPortability c collection of routines which might be subject to portability issues e g when integrating the library within FORTRAN Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 18 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead The interface to the methods in all source files is given in the include files listed in the previous chapter The actual location of a method within the set of source files is irrelevant to the standard use of the library 4 2 4 Working with Data Files 4 2 4 4 Simple Use Case There are many operations that may be applied to OpenCRG data sets However the simple way of using OpenCRG data files is split into just three stages 1 load the file 2 create a contact point 3 call the evaluation methods This use case is shown in a programming example which is located at demo Simple 4 2 4 2 Data Sets and Contact Points This document and the entire C API use two terms which shall be explained here Data Set a data set is the instance of data read from an OpenCRG file into memory It is identif
31. contact point level using the methods crgContactPointOptionSetInt contactPoint crgContactPointOptionSetDouble contactPoint 4 2 4 5 Sequence of Actions The following figure gives an overview of the sequence of actions that may be performed when working with OpenCRG data files File s API Contact Point Data Set Options Modifiers gt i i gt e first the user loads a file the file may already contain definitions for evaluation options and data set modifiers e upon reading the file a data set with a unique ID returned by the loader method is created where actual OpenCRG data is stored as well as modifiers and options defined within the file e after reading the file the modifiers of the data set may be replaced deleted extended by means of API calls referring to the data set Date April 08 2015 Title OpenCRG User Manua Name yarious Document No Issue Page VI2009 050 M 20 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead e inorder to evaluate data of the data set the user needs to create a so called contact point this contact point is dedicated to a given data set the library creates and returns a unique ID for each contact point e the contact point inherits all evaluation options from the respective data set e the user may specif
32. ctions limits long sections UVZ map XYZ map curvature plot elevation plot heading plot slope and banking plot XY map and curv plot XY overview map plot XYZ map 3D plot refpoint distance plot road UVZ map road XYZ map UVZ map XYZ map visualizer elevation grid 2D visualizer elevation grid 3D surface visualizer comparison of two crg_files data core visualizer read text info visualizer peak and_refline m crg_show_road_surface m crg show road uv2surface m crg surf m visualizer 3D surface plot road refline elevation visualizer road refline map visualizer road refpnts and refline visualizer road 3D surface visualizer road 3D surface visualizer by u v grid Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 48 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 2 5 Working with Data Files 5 2 5 4 Simple Use Case There are many operations that may be applied to OpenCRG data sets However a simple way of using OpenCRG data files is shown in just 2 stages T load a crg file As call the evaluation methods crg demo if not done before once data crg_read demol crg load crg file pz crg eval uv2z data 100 0 z elevation on u v 100 0 5 2 5 2 CRG data structure This Matlab
33. cy OpenCRG managing the road surface ahead 3 3 3 Data Definition The data definition block defines the data format ASCII binary and the sequence of data which is to be expected in the trailing data block Each definition starts with a p identifier Reference line and grid data may be defined within the data definition block again depending on the contents of the actual data block Further details can be retrieved from the Matlab routines available for writing OpenCRG data The keyword is S KD Definition Example 1 sloped dataset with seven longitudinal sections SKD Definition data definition block LRFI one of the men readable IPLOS formats D reference line slope m m longitudinal slope D long section at v 1 500 m 1 50m right of reference line D long section at v 1 250 m 1 25m right of reference line D long section at v 1 000 m 1 00m right of reference line D long section at v 0 000 m on reference line D long section at v 1 000 m 1 00m left of reference line D long section at v 1 250 m 1 25m left of reference line D long section at v 1 500 m 1 50m left of reference line SPA A kk Ck Ck Ck kk kk kk Ck Ck kk kk kk k kk Ck Ck kk kk kk Ck kk Ck Ck kk koc kk kc ke kk ko kk k ke kk k k ke k k k k k k k k k Example 2 curved data set with heading angle defined as first item of each data entry S KD Definition LDFI D reference line phi rad heading angle pi lt phi lt pi D l
34. d sect uwp road prof vwp road sect vwp road prof wow Ww od ubeg le sections 1 1 H 5 P 1 E 0 6 0 6 0 8 0 8 ulp lane sect ulp lane prof vlp lane sect vlp lane prof ow w od ulr lane sect 0 10 i left lane ulr lane prof ud 0 8 vlr lane sect X o vlr lane prof left lane ow gw gd nes size vlr lane sect ubeg 30 right lane sections 3 1 right lane sect 1 urp_lane_sect urp_lane_prof vrp_lane_sect vrp_lane_prof tobe dw gd mode one Profile Random Ignore u section u profile v section v profile valid only for random profile s psen Profile uwp road sect uwp road prof vwp road sect vwp road prof Random ulr_lane_sect ulr_lane_prof vlr lane sect vlr lane prof Profile ulp lane sect ulp lane prof vlp lane sect vlp lane prof Profile urp lane sect urp lane prof vrp lane sect vrp lane prof v smooth random in range 0 1 u_smooth random in range 0 1 max amplithude random min amplithude random initialize state of random generator end of user settings STEP 2 create and check lateral profile vector v crg check uv descript uv mue Ignore Profile Random 5 3 1 1 2 Create profile vector OpenCRG provides a functionality to extract the cross section vector defined above For further details see crg_check_uv_descript m Date April 08 2015 Title OpenCRG User Manual Name yarious
35. echanism no library is explicitly created from the baselib files 4 1 4 8 Method C command line If you don t like makefiles and our scripts you may just write your own simple compile instruction at command line level For this purpose please note the following hints In order to compile a demo set your include file search path to baselib inc Always compile in combination with all c files in baselib src Example For the compilation of EvalXYnUV use cc lm o EvalXYnUV I baselib inc demo EvalXYnUV src main c baselib src c 4 1 5 Basic Tests On machines providing a shell environment and gnuplot e g Linux systems a series of very brief tests can be run These are also used for acceptance tests of the C API and have generated the figures in this document showing the various options and modifiers In order to run all tests for evaluation options use the script testOptions sh In order to run all tests for data set modifiers use the script testModifiers sh Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 17 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 The Base Library 4 2 1 Overview As mentioned above the base library contains a large set of routines for reading modifying evaluating OpenCRG
36. elative u default 0 or rptu absolute u with optional rpou default 0 rptv absolute v default 0 or rpfv relative v with optional rpov default 0 position x y z and orientation phi in inertial frame rptx target position default 0 rpty target position default 0 rptz target position default 0 rptp target orientation default 0 Modifiers are evaluated by the crg mods routine The mods are evaluated in sequence as they appear below and are cleared after they are applied An empty mods array inhibits any default settings Make sure that you create a new struct for a new modifier set The example below shows how to set up a modification data crg_read demol crg read crg file data mods struct create new struct data mods gnan dus set modifier data crg mods data apply mods on crg data Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page V12009 050 M 51 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 2 7 Options As mentioned above the OpenCRG data struct contains also the so called options which are applied during evaluation not globally All modifier functionalities are equal to the C API and explained there Further details about the Matlab API are located in crg_intro or in the help content of
37. erence line u position evaluate index iu iv of distance u v transform point in uv to xy evaluate z at grid position uv transform point in xy to uv evaluate z at position xy generate HTML file to show wgs info in Google maps evaluate distance and bearing between WGS84 positions calculate WGS84 position by distance and bearing set WGS84 end coordinate generate url string to show wgs info transform point in xy to WGS84 using 2 references transform point in xy to WGS84 creates a cross section v profile generate synthetically crg data generate refline heading out of polynomial generates smooth polynomial through ref points add cell array to surface data appends two crg data sets add banking to z values of crgdata Separate a crg file extract banking extract slope filter crg data flips the crg contents finds and generates sloope and banking limit crg data map crg data in uv inertial mapping apply modifiers on data re render crg data add slope to z values of crg data base check class check fix and complement data verifies crg struct head data verifies crg struct modification data verifies crg struct options data single type check of core data read crg file single type conversion of core data re wraps heading angles to pi range road file writer IPLOS write read demonstration IPLOS file reader IPLOS file writer structured data file block add structured data file block cut convert nu
38. eyword is S ROAD CRG FILE Example SROAD CRG FILE crg file reference The file name may be split to multiple lines which must not contain leading trailing blanks or to be considered as part of the name Each line length must not exceed 72 characters If a relative path is given it is evaluated relative to the current directory of the reader process If the first character is a subsequent characters will be replaced by the contents of the equivalent environment variable home name crg files handmade straight crg absolute path home name crg files hand absolute path made straight crg split in 2 lines gt crgpath handmade straight crg replace crgpath by gt it s envvar contents hand look in current dir made straight opts crg look in current dir QC L A A K A A kk Ck Ck kk Ck Ck kk kk Ck Ck A kk Ck Ck kk Ck Ck kk Ck kk kk kk Ck Ck kk kk kk KA kk ck ke A k ke k k k k k k k k k Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 13 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 3 3 6 Road Data The road data section MUST ALWAYS be the last section of an OpenCRG data file It contains the actual road data typically elevation Its formatting depends on the data fo
39. ference line At first the rotation is applied before the reference line translation If not defined the default rotation center will be the starting position x y C API OpenCRG managing the road surface ahead data file symbolic constant data type values name values dCrgModRefLineRotCenter double REFLINE ROTCENTER X X dCrgModRefLineRotCenter double REFLINE ROTCENTER Y Y dCrgModRefLineOffsetPhi double REFLINE_OFFSET_PHI dCrgModRefLineOffsetX double REFLINE OFFSET X dCrgModRefLineOffsetY double REFLINE OFFSET Y dCrgModRefLineOffsetZ double REFLINE OFFSET Z Example 1 modifier translation of reference line by x 100 0 y 200 0 z 10 0 file handmade_straight crg original data set unmodified data ergPlotData txt is 4 0 03 0 02 0 01 0 01 0 02 0 03 0 04 x Our 0 Example 2 moditier file original data set unmodified data crgPlotlata txt x modified data set refline offset x y z 100 0 200 0 10 0 crePlotlata txt 10 04 10 03 10 02 10 01 10 9 99 3 38 3 97 9 96 ou o translation of reference line by x 100 0 y 100 0 z 100 0 rotation by 1 57 rad handmade_straight crg modified data set refline offset x y z phi 100 0 100 0 100 0 1 57 crgPlotlata txt ou 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No VI2009 050 Issue M Page 25 of 55
40. file executable crgEvalz command line crgEvalz options CRG data file gt options h show online help 4 3 6 Application of Options and Modifiers Perform a single test or series of tests involving data set modifiers or evaluation options This test program is used for acceptance tests before a new version of the C API is released executable crgEvalOpts command line crgEvalOpts options CRG data file gt options h show online help t n run the single test with the given number please check the source code for the numbers and the corresponding test routines p write the results x y z data into the file crgPlotFile txt which may be used as input to gnuplot or other data visualizers In order to facilitate the execution of various tests involving modifiers and options two scripts are provided in the Tools bin directory testOptions sh testModifiers sh These scripts run all available tests for modifiers and options asking the user for confirmation of each test The results are stored in a file named testReport txt The test tool used by the scripts is crgEvalOpts Date April 08 2015 Title OpenCRG User Manua Name yarious Document No Issue Page VI2009 050 M 42 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 The OpenCRG Mat
41. flers and Options it e ER ehe Do E ene e RR ERR ee D n EAEan 19 4 2 4 5 Sequence of ACIOnS inco ei ee ER e ET Ces E cta eet ee D n Eus AE Eaa EORR dedu 20 4 2 5 WWE NBri E 21 4 2 6 Message Printing iic tiet teint eee ette De Cos Ett Tae Lett teet tele Case d Uu tax A 21 4 2 7 MOGITIONS sacs EM E E E A A A E E E 22 4 2 7 1 Default MOGINETS ET 22 4 2 7 2 Transforming Data by Reference Point ssssssseeeeene en 24 4 2 7 3 Transforming Data by Offset Position sss 25 4 2 7 4 Scaling of Elevation Data sse nennen enne 26 4 2 7 5 Scaling of Data Set Extents ssssssssssssssssseeeeeeenneee ener nnne 28 4 2 7 6 Scaling Of CutVatule einiino aidean attic te duet teda Le dn eani 29 4 2 7 7 NaN handling in v Direction enne 30 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 3 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead ps MEME eyelets 31 4 2 8 1 Border Modes in u and v Directions sssseeeeeeeenenen 31 4 2 8 2 SMON poji 38 4 2 8 3 Continuation of Reference Line sssssssssssssseseneenenneneen enne nnne 39 4 2 8 4 Curvature Eval atiOr ses peine eto cites aes rae ee PEL
42. ful to look into crg demo to get some first examples how to use the OpenCRG Matlab functions and tools suite For quite all basic test it is necessary to generate the sample demos by crg demos 5 1 7 Basic Tests Several test scripts are provided under path to OpenCRG matlab tests A series of very brief tests can be run These are also used for acceptance tests of the OpenCRG Matlab Tools as well as benchmark tests for the C API CRG demo files are used to test the functionality Make sure all sample demos are generated by running crg demos crg demos if not done before onc crg test functionname 5 1 8 Publishing script files The OpenCRG Tool suites script files are written and comment in Matlab style for publishing This publishing functionality should be used to produce adequate output Since R2008a Matlab s publish configurations was introduced by Mathworks It allows to publish to latex doc and HTML style 5 1 8 1 Extensible stylesheet language xsl A sample xsl file is located in path to OpenCRG docsro xsl Publishing to latex using the xsl file produces the same formated output like the OpenCRG tool suite pdf s Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 44 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahe
43. how data get derived data display result o G o 5 CRG elevation grid UWZ map in uncurved UV grid CRG elevation grid XYZ map in curved XY grid gauti 0 08 0 06 0 04 Vim 0 02 Z im 0 02 U m 0 04 0 06 05 n0 X m Y Im Date April 08 2015 Tile OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 49 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 2 5 8 Modifiers and Options In simple cases data sets will be read from file and evaluations may take place immediately However the user may want to vary the way a specific data set is evaluated without having to modify the original data i e the data file itself For this purpose modifiers and options have been introduced e Modifiers modify a copy of OpenCRG data which is stored in memory and therefore provide the modified data for all subsequent evaluation requests e Options influence the way a specific query is performed without modifying any of the data stored in memory In the data struct modifiers are found in the substructure crg mods and options are found in crg opts The tool suite provides discrete calls for setting modifiers and options Evaluation methods take account if options are set Modifiers have to be executed by calling the crg mods routi
44. ied by a unique integer ID which is returned by the data loader method Contact Point a contact point is a tool to query data of a given data set The user must instantiate at least one contact point per data set in order to be able to query its contents Contact points are identified with unique integer IDs which are returned by the contact point creation method The number of contact points per data set is not limited 4 2 4 8 Multi Thread Applications To parallelize C API evaluation calls contact points MUST NOT be shared between threads Doing this will destroy history and other data stored within the contact point object 4 2 4 4 Modifiers and Options In simple cases data sets will be read from file and evaluations may take place immediately However the user may want to vary the way a specific data set is evaluated without having to modify the original data i e the data file itself For this purpose modifiers and options have been introduced e Modifiers modify the copy of OpenCRG data which is stored in memory and therefore provide the modified data for all subsequent evaluation requests e Options influence the way a specific query is performed without modifying any of the data stored in memory In the data files modifiers are found in the section CRG_MODS and options are found in CRG_OPTS The API provides discrete calls for setting modifiers directly and for applying them and the ones defined in the data file t
45. int dCrgGridNaNKeep GRID NAN MODE 0 dCrgGridNaNSetZero 1 dCrgGridNaNKeepLast 2 When using mode dCrgGridNankeep 0 the option dCrgCpOptionBorderModeV BORDER MODE V must also be set to dCrgBorderModeNone 0 Unless NaN is being kept an explicit offset may be applied to former NaN values in the grid C API data file symbolic constant datatype values name values dCrgModGridNaNOffset double GRID NAN OFFSET Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page V12009 050 M 30 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 8 Options As mentioned above the evaluation methods per contact point may be influenced by so called options This means that options are applied per evaluation not on a global level The C API provides a series of methods for defining querying and printing options of a contact point These are described in further detail in the header file crgBaseLib h and are following the naming pattern crgContactPointOptionxxx contactPointId The following tables and figures give an overview of all applicable options with their respective definitions within OpenCRG data files and with their addressing from the API All examples have been computed using the test tool located in Tools EvalOptions via the script testOptions sh in Tools bin
46. lab Tools 5 1 Getting Started 5 1 1 Downloading the Software Package The latest version of the OpenCRG Matlab Tools may be retrieved via the website www opencrg org Go to the Downloads area and look for the section Packages and Tools There you will find a package containing the C API MATLAB routines documentation and sample files Download this package and unpack it into a dedicated directory on your machine The Matlab Tools are located in the sub directory OpenCRG matlab The latest developer version may be retrieved via the OpenCRG project managing and issue tracking system You can reach this system by going to http tracking vires com registration required 5 1 2 Helease Notes The release notes are part of the software package and will not be transferred to this document Please look for the readme txt files in the root directory of the OpenCRG package and in the Matlab Tools sub directory 5 1 3 Contents of the Package The OpenCRG Matlab Tools are delivered as a zipped package which after unpacking provides the following file structure c6rq indt m 22i2 949 xc initializes the CRG Matlab environment crg LINE Oia esi a aeos neos introduction to the basic CRG concept and data structure 0emO vs wow ERES ERR demo sources explaining the usage of the basic library ED uidere e A Ru base library including functionality to read evaluate visualize analyse generate modifica
47. lied to the data set if no other modifiers have been defined in the OpenCRG data file However as pointed out above application of the modifiers must explicitly be triggered by calling the routine crgDataSetModifiersApply dataset The default modifiers may be altered and extended in the following ways e Block sroap_crc_mops in the OpenCRG data file Upon first occurrence of this block ALL default modifiers will be deleted i e even the ones you might have wished to keep These are replaced with the modifiers defined in the corresponding data block The removal of all modifiers by means of an OpenCRG data file is achieved by providing an empty block s amp oap cna wops e Calls to C API By explicitly setting removing modifiers via the C API routines crgDataSetModifierSetInt dataset crgDataSetModifierSetDouble dataset crgDataSetModifierRemoveAll dataset crgDataSetModifierSetDefault dataset the user may further customize the list of applicable modifiers e Combination of both methods Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 22 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead The default modifiers are details see below
48. lues name values dCrgModRefPointUFrac double 0 0 1 0 REFPOINT U FRACTION 0 0 1 0 dCrgModRefPointUOffset double REFPOINT U OFFSET dCrgModRefPointVFrac double 0 0 1 0 REFPOINT V FRACTION 0 0 1 0 dCrgModRefPointVOffset double REFPOINT V OFFSET The target position of the data set must be defined in inertial co ordinates and with absolute heading angle C API data file symbolic constant data type values name values dCrgModRefPointX double REFPOINT X dCrgModRefPointY double REFPOINT Y dCrgModRefPointZ double REFPOINT_Z dCrgModRefPointPhi double REFPOINT_PHI Example 1 modifier refpoint u 5 0 v 1 5 to position x 100 0 y 200 0 z 10 0 file handmade_straight crg original data set modified data set unmodified data refpoint u v 5 0 1 5 to x y z 100 0 200 0 10 0 crgPlotlata txt crgPlotData txt 0 04 10 03 0 03 10 02 0 02 10 01 0 01 10 0 9 99 0 01 9 98 0 02 9 97 0 03 9 96 0 04 9 95 x Ow 0 x Ou 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page V12009 050 M 24 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 4 2 7 3 Transforming Data by Offset Position Instead of defining a reference point and its target location the data set may be shifted and rotated using translation and angle offsets which are applied to the origin of the data set s re
49. mber to string of given length Date April 08 2015 Tile OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 47 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 5 2 4 6 Visualization tools copy ax2fig m crg figure m copy current axes object figure setup crg plot elgrid cross sect m plot crg plot elgrid limits m plot crg plot elgrid long sect m plot crg plot elgrid uvz map m plot crg plot elgrid xyz map m plot crg plot refline curvature m road crg plot refline elevation m road crg plot refline heading m road crg plot refline slope bank m road crg plot refline xy map and curv m road crg plot refline xy overview map m road crg plot refline xyz map m road crg plot refpnt distance m road crg plot road uv2uvz map m plot crg plot road uv2xyz map m plot crg plot road uvz map m road crg plot road xyz map m road crg show m road crg show elgrid cuts and limits m road crg show elgrid surface m road crg show isequal crg show info m crg show peaks m crg show refline elevation m crg show refline map m crg show refpnts m road elevation road elevation road elevation road elevation road elevation refline refline refline refline refline refline refline grid grid grid grid grid OpenCRG managing the road surface ahead to new figure cross se
50. mechanism 9 8r 0 4991 33 the library s sources compileScript sh Script for the compilation of all demos and tools based on simple compiler calls this is an alternative to using the make mechanism all files of the base library are also compiled with this script so there is no need for a separate compilation of the library files See EMO NC P demo sources showing the usage of the basic library S8 mple ie e ez a really simple application covering all basics of the API runs with fix data sample handmade straight crg EvalOptions a set of routines demonstrating the usage of various options eee Era ENUV S uu succus a set of routines for the evaluation of OpenCRG reference lines WyalZ e es 9e vs an advanced example for the evaluation of OpenCRG data Reader a sample application for a CRG file reader ce Hu crgSimple executable of the very simple example crgEvalxyuv executable of the reference line evaluator crgReader executable of the sample reader J 2 crgBEvalz executable of the complex z data evaluator crgEvalOpts executable of the option usage example makefile zieese4s makefile for all demos alternative to compileScript sh makefile readme txt test PerfTest eere test tool for evaluating the performance of the library 534i testModifiers sh script for performing a series of tests
51. nce line curvature may be scaled resulting in a modified end point Scaling by a value of zero will result in a straight reference line C API data file symbolic constant datatype values name values dCrgModScaleCurvature double SCALE CURVATURE Example 1 modifier curvature scale 0 50 file handmade arc crg original data set modified data set unmodified data curvature scale 0 50 crgPlotData txt crgPlotData txt 300 300 250 250 200 200 150 150 100 100 50 50 0 0 0 08 50 0 08 50 200 150 100 50 0 50 100 200 150 100 50 9 50 100 Example 2 modifier curvature scale 0 00 file handmade arc crg original data set modified data set unmodified data curvature scale 0 00 crgPlotData txt crgPlotlata txt 40 40 30 30 20 20 10 0 0 08 10 0 08 200 100 0 100 200 300 200 100 0 100 200 300 x y 0 Date April 08 2015 Tile OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 29 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 7 7 NaN handling in v Direction When preparing the data set for queries the v border values are checked for NaNs The mode of treating these values can be set by the user C API data file symbolic constant datatype values name values dCrgModGridNaNMode
52. ne which will affect the modifier settings on crg data Date April 08 2015 Title OpenCRG User Manual Name various Document No Issue Page VI2009 050 M 50 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 5 2 6 Modifiers OpenCRG managing the road surface ahead As mentioned above the OpenCRG data struct contains the so called modifiers which globally modify the crg data All modifier functionalities are equal to the C API and explained there Further details about the Matlab API are located in crg intro or in the help content of the function CRG scaling default no scaling scale elevation data szgd sslp sbkg scale refline data scale elevation grid scale slope information scale banking information resets refline position to origin slth scale u information swth scale v information SCrv scale reference line s curvature CRG elevation grid NaN handling gnan how to handle NaN values default 2 0 keep NaN 1 set zero 2 keep last value in cross section gnao z offset to be applied at NaN positions default 0 CRG re positioning refline by offset default by refpoint rlox translate by rlox rloy translate by rloy rloz translate by rloz rlop rotate by rlop around xbeg ybeg CRG re positioning refline by refpoint overwrites by offset position u v on reference line rpfu r
53. nsist of various sections which are each enclosed by a line containing the corresponding keyword and a line with a terminating character set Data files may contain road data in user readable i e ASCII format or as binary stream recommended for large data sets The keywords distinguishing the sections start with the character followed by the keyword itself Keywords must be placed at the beginning of a new line and must not be followed by any data but some sort of comment A section is terminated with a simple character at the beginning of a new line The possible sections within an OpenCRG data file are shown in the following figure SCT mandatory comment about file s contents SROAD_CRG information about centerline mandatory if file contains Data section SKD_Definition definition of individual channel parameters mandatory if file contains Data section SROAD_CRG_OPTS evaluation options SROAD_CRG_MODS data set modifiers SROAD_CRG_FILE references to other data files the actual OpenCRG data The sequence of the sections within an OpenCRG file is irrelevant except for the Comment block which has to be the first section within the file and the Data block which if present has to be the last However it is recommended to use the above scheme for the creation of new files for user readability An OpenCRG file may contain reference directives pointing to other files This is usually the case when a control file
54. nto o crt HM CE creer re 14 34 Sample Filesi nsc T 14 4 Theo Ra GPL asesdcatuticin died cbindscavtinsd ica citeand k atat 1 k idi sb Nau EN RU RDUM Duden 15 41 Getting Started scice aiid denied die m 15 4 1 1 Downloading the Software Package c ccccecceceeeeeseeeeeeeeceeeeeseaeeeeaaeeeeeeeeseaeeesaeeeeeeeees 15 4 1 2 Release Notes iiie Ehre eie dene Perte atid al agenda el DERE iene 15 4 1 8 Contents of the Package ccceccccceeeeceeeeeeeeee cee eeeaaeseeeeeceaeeeeaaeeeeaaeseaeeeseaeeeeaaaeseeneeseneess 16 4 1 4 Compiling the Package nennen nennen nennen nens 16 4 1 4 1 Method A makertlles iiiter tB ient eiie tee eb cer dienes 16 4 1 4 2 Method B SCript wieteavsietiat thie eerie A res pente te te Der EROR Bus 17 4 1 4 3 Method C command line esee entente nnns nentes 17 4 1 5 CEHIMEII cC 17 42 The Base Library eerie niece Ce eine re ERR Cea PL Ye esae ee EUR Te a ET er Pas 18 4 2 1 Shu Mr EEUU 18 4 2 2 Include FileSinis ec ETE 18 4 2 9 SOUCE Files ciet ptt e ERU iare Rt tpa eto enden erat aaee aa AEA 18 424 Working with Data Files iret terrere oe Cane pa dase EE tbt eee Caes Eco AREA 19 4 2 4 1 Simple USE Case EE 19 4 2 4 2 Data Sets and Contact Points sse 19 4 2 4 3 M lti Thread Applications ic nete ane EPee p dee ree te at Ea eee Coe Rec etu etta 19 4 2 4 4 Modi
55. o the data set For reasons of enhanced user control modifiers defined in a data file are NOT applied automatically to the data set It is the user s responsibility to apply them explicitly see below Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 19 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead The API also provides calls for setting options on a contact point level When setting an option its data type is taken into account resulting in different methods for double and integer modifiers options The set of available modifiers and options is defined as symbolic constants in the include file crgBaseLib h Modifiers are set on a data set level by means of the routines crgDataSetModifierSetInt dataset crgDataSetModifierSetDouble dataset After complete definition of all modifiers they must be applied explicitly to the data set using the method crgDataSetModifiersApply dataset NOTE This routine must also be called after reading the modifiers from a CRG file Only defining the section SROAD_CRG_MODS in a CRG files will NOT trigger the application of the modifiers to the data set In contrast to modifiers options are applied implicitly each time an evaluation is performed Therefore they only have to be defined on a
56. on and sample files Download this package and unpack it into a dedicated directory on your machine The C API is located in the sub directory OpenCRG c api The latest developer version may be retrieved via the OpenCRG project managing and issue tracking system You can reach this system by going to http tracking vires com registration required 4 1 2 Helease Notes The release notes are part of the software package and will not be transferred to this document Please look for the readme txt files in the root directory of the OpenCRG package and in the API s sub directory Date April 08 2015 Title OpenCRG User Manua Name yarious Document No Issue Page VI2009 050 M 15 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 1 8 Contents of the Package The OpenCRG C API is delivered as a zipped package which after unpacking provides the following file structure for additional updated contents see the readme txt file 5aseldgbe x5 ae ae me a OpenCRG basic library the core of the toolset AO ee sec andi ded ases location of the compiled OpenCRG library aia REDE include files providing the interface to the library makefile sample makefile for users preferring the make mechanism 27 0BD Fass di noon eons target directory for sources compiled with the make
57. ong section at v 1 500 m longitudinal cuts with position D long section at v 1 250 m D long section at v 1 000 m SSSS ss Example 3 longitudinal sections in fixed lateral spacing lateral spacing 0 1m surface width 3m this example also shows the interaction between the blocks CRG_ROAD and SKD_Definition SCRG_ROAD minimal header REFERENCE_LINE_INCREMENT 0 01 lcm spacing of lateral cuts LONG SECTION V RIGHT 1 50 right surface border LONG SECTION V LEFT 1 50 left surface border LONG SECTION V INCREMENT 0 10 10cm spacing of longitudinal cuts S KD Definition T LDFI D reference line phi rad heading angle pi lt phi lt pi D long section 1 m 1 5m right of reference line D long section 2 m 1 4m right of reference line D long section 31 m 1 5m left of reference line Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page V12009 050 M 12 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 3 83 4 Modifiers and Options As shown in the figure at the beginning of this chapter OpenCRG data files may also contain information about data evaluation options and data set modifiers Both may alternatively be defined in run time using the APIs The details of options and modifiers are described in the chapters below Here it
58. resenting a closed track the extrapolation of the u position may be achieved by trying to close the reference line and thus position the point again within the core area of the data set The parameters controlling this behavior are C API data file symbolic constant data values name values type dCrgCpOptionRefLineContinue int D e er REFLINE CONTINUATION 0 dCrgRefLineCloseTrack Example 1 options reference line continuation dCrgRefLineExtrapolate file handmade circle crg default settings option settings unmodified data unmodified data crgPlotlata txt crgPlotData txt 100 100 0 0 100 100 200 200 800 800 400 400 0 08 500 0 08 500 600 500 400 300 200 100 0 100 200 300 600 500 400 300 200 100 0 100 200 300 Example 2 options reference line continuation dCrgRefLineCloseTrack file handmade_circle crg default settings option settings unmodified data continuing closing reference line orgPlotData txt orgPlotData txt 100 100 200 300 400 0 08 E 600 500 400 300 200 100 0 100 200 300 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 39 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 8 4 Curvature Evaluation When computing the c
59. rmat defined in the Data Definition section see above Since OpenCRG files will typically be written using the Matlab routines a further discussion of the various data formats is omitted for the moment 3 4 Sample Files OpenCRG sample data files are located in the directories OpenCRG crg txt OpenCRG crg bin A distinction is made between human readable text files and binary data files Each type is located in its respective sub directory The following files are available qg bIXn belgian road crg binary data set for tests complex tests Gg ntry road Crqg v e nn a larger stretch of binary test data eeecagrEg bxtb Filwref crgllol s e ri ee ees user readable data set referring CRG file ofileref mods Cresta aas aaa sees user readable data set referring CRG file w modifier ef Tere Opts Orue ene as user readable data set referring CRG file w options handmade arc crg user readable data set for a 180deg arc handmade banked crg user readable data set for banked road data handmade circle crg user readable data set for closed refline 5 handmade curved crg user readable data set for curved refline handmade curved banked sloped crg data set for curved refline w opts mod handmade curved minimalist crg data set for minimalist curved refline handmade platform crg user read
60. t to the evaluation via one of the border modes described in the previous chapter The parameters of the smoothing zone may be defined via the following interfaces C API data file symbolic constant data values name values type dCrgCpOptionSmoothUBegin double 0 0 Umax BORDER SMOOTH UBEG 0 0 Umax dCrgCpOptionSmoothUEnd double 0 0 Umax BORDER SMOOTH UEND 0 0 Umax Example 1 options smoothing zone at begin 5 m file handmade platform crg default settings option settings default settings 10 0n smoothing zone at the begin crgPlotData txt crgPlotData txt x 0 y 0 Example 2 options smoothing zone at end 5 m file handmade_platform crg default settings option settings default settings 10 0m smoothing zone at the end crgPlotData txt crgPlotData txt 1 5 40 RO dco e o EET Apes on o o tt tt FF on M ox ou 0 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 38 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 2 8 8 Continuation of Reference Line For points whose u position exceeds the data set s valid range i e the original reference line the corresponding x y position is usually computed by extrapolating the reference line at the respective end However reference lines rep
61. te and write CRG data files aaa bi a REA ARA ae A ARA RAS test sources to validate the basic library Date April 08 2015 Title OpenCRG User Manua Name yarious Document No Issue Page V12009 050 M 43 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 5 1 4 Working with OpenCRG Matlab Tools 5 1 4 1 Initialization Start OpenCRG environment by running crg init m form the Matlab command line run path to OpenCRG matlab crg init To run the tests and demos it is recommended to change to the work directory for temporary data cd path to OpenCRG temp 5 1 4 2 Getting Help The OpenCRG Matlab files contain the Matlab specific help header as well a copyright notices Use helpto view declaration and explanation of the methods help OpenCRG method To get an overview on CRG data organization run the crg intro command crg intro 5 1 5 Formatting M File Comments OpenCRG uses the same formatting comments like Matlab does for publishing Please refer to the Matlab product help of Formatting M File Comments for Publishing for detailed information 5 1 6 Demos Several demo scripts are provided in path to OpenCRG matlab demo Running the crg demo command will generate some CRG data structures write them to disk read them again and optionally visualizes some contents It may be use
62. tines similar to the C API for e read ing e modifying e evaluating and is extended by methods to e visualize e generate e analyse OpenCRG data 5 2 2 Demo Files The Tool suite comes with basic script files mat mat Lab demo crg demo m Lab demo crg demo gen m OpenCRG managing the road surface ahead Run crg demo m to generate a set of simple crg files These are used to execute the test files The second set of demo files show how to generate a crg file with a smooth refline and surface data 5 2 3 Test Files A set of test files are provided to verify the functionality of the tool suite and are located in matlab test 5 2 crg_test_append m crg_test_continuesTrack m crg_test_eval_uv2iuiv m crg_test_ext_sb m crg_test_filter m crg test gen csb2crg m crg test gen road m crg test isequal m crg test limiter m crg test map uv2uvAxy2xy m crg test options m crg test peakfinder m crg test rerender m 4 Library Files concatenate two crg files road continuation cut crg file extract slope and or banking filter crg file additional synthetically generated crg files generate and write synthetically crg file compare two crg files if equal limits crg z values uv and inertial mapping add options find peaks re render crg file The library is composed of the following Matlab files which are located in matlab lib 5 2 4 1 Analysis tools crg isequal m comparison if
63. tlab lib crg_intro m see head section The keyword is SROAD_CRG Example 1 SROAD_CRG crg road parameters REFERENCE_LINE_START_U REFERENCE LINE START X REFERENCE LINE START Y REFERENCE LINE START PHI REFERENCE LINE END U REFERENCE LINE END PHI 0 REFERENCE LINE INCREMENT Ty LONG_SECTION_V_RIGHT 1 50 with explicit definition below LONG_SECTION_V_LEFT 1 50 with explicit definition below G L A A K A Ck AE E AE I Ck kk A k kk kk kk I I k k A k I A ko k I IK A k e k k k ke k k k k k k k k k k k k ONOCOOCO 0 0 0 0 2 0 mandatory content Example 2 To avoid potential problems in reference line reconstruction it is recommended to add start and end positions in the header SCRG ROAD REFERENCE LINE START X 0 0 REFERENCE LINE START Y 0 0 REFERENCE LINE END X 220 0 REFERENCE LINE END Y 324 0 Example 3 If GPS WGS84 co ordinates of the start and end position are available these should be provided additionally in the road parameter section not yet supported by C API CRG ROAD reference line start lon 9 12345 reference line start lat 4 98765 reference line end lon 9 22345 reference_line_end_lat 4 88765 Date April 08 2015 Tile OpenCRG User Manual Name various Document No Issue Page V12009 050 M 11 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license poli
64. tory the algorithm may simplify the search and thus return much faster with the correct result The parameters controlling this behavior are C API data file symbolic constant data values name values type dCrgCpOptionRefLineClose double default 0 3 REFLINE SEARCH CLOSE default 0 3 dCrgCpOptionRefLineFar double default 2 2 REFLINE SEARCH Far default 2 2 Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page V12009 050 M 40 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 3 The Tools 4 3 1 Overview In the Tools directory a set of samples for the usage of the C API is provided as source code The tools and their purposes are shown in the following list TOOIS ss ceesa eee aa collection of tools for an easy entry into the OpenCRG programming EvalOptions a set of routines demonstrating the usage of various options EvalXYAUV ss 400 0 a set of routines for the evaluation of OpenCRG reference lines BValZ sissase9es an advanced example for the evaluation of OpenCRG data t Reader a sample application for a CRG file reader Simple lcieress a really simple application covering all basics of the API Each tool s sub directory is of identical structure ToolName sub directory of a tool FRSC dak
65. two crg files are equal crg peakfinder m find peaks Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 46 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy 5 2 4 2 Evaluation tools 5 2 4 3 5 2 4 4 crg_eval_u2crv m crg eval u2phi m crg eval uv2iuiv m crg eval uv2xy m crg eval u crg eval xy2uv m crg eval x v2z m y2z m crg wgs84 crg2html m crg wgs84 dist m crg wgs84 invdist m crg wgs84 setend m crg wgs84 wgs2url m crg wgs84 wgsxy2wgs m crg wgs84 xy2wgs m Generation tools crg check uv descript m crg gen csb2crg0 m crg gen ppxy2phi m crg gen pxy2ppxy m crg perform2surface m crg append crg b2z m crg cut iu m iv m Modification tools crg_ext_banking m crg_ext_sl crg filter crg flip m ope m m crg generate sb m crg limite crg map uv crg map xy crg mods m crg rerend crg s2z m 5 2 4 5 lo files to r m 2uv m 2xy m er m ols crg check m crg check crg check data m head m m crg check mods crg check opts m crg check single m crg read m crg single crg wrap m In crg write m ipl demo m ipl read m ipl write m sdf add m sdf cut m str num2st rn m OpenCRG managing the road surface ahead evaluate curvature crv in reference line u position evaluate heading phi in ref
66. urvature at a given u v position the resulting value is per default the actual curvature at the position An option is available which when enabled returns the curvature at the corresponding reference line position instead of the curvature at the actual position The parameters controlling this behavior are C API data file symbolic constant data values name values type dCrgCpOptionCurvMode int dCrgCurvLateral n a dCrgCurvRefLine 4 2 8 5 History Manipulation The performance of data evaluation is increased by using internally a history of recently queried points It is assumed that new queries typically occur in the vicinity of previous queries If the user has more knowledge about the u positions of the reference line where the next queries will occur he may pre load the history with this information and thereby increase the performance of the next queries significantly The parameters controlling this behavior are C API data file symbolic constant data values name values type dCrgCpOptionRefLineSearchU double 0 0 Umax REFLINE_SEARCH_INIT_U 0 0 Umax dCrgCpOptionRefLineSearchUFrac double 0 0 1 0 REFLINE SEARCH INIT U FRACTION 0 0 1 0 4 2 8 6 History Search Criteria While evaluating history information the algorithms check for two distances of an actual position to a position stored in the history Depending on whether a point is within a close or a far range of a point in his
67. using the modifier mechanisms requires gnuplot testOptions sh script for performing a series of tests using the evaluation option mechanisms requires gnuplot crgPerfTest performance test tool may not run on all platforms cmakefile ilnsela aces makefile for all tests alternative to compileScript sh 4 1 4 Compiling the Package 4 1 4 1 Method A makefiles On machines with gcc and standard make environment just type make in the root directory This should result in a series of executable files in the directories demo bin test bin In addition a library containing all object files of the baselib sources is created in baselib lib Date April 08 2015 Title OpenCRG User Manual Name yarious Document No Issue Page VI2009 050 M 16 of 55 Refer to protection notice DIN ISO 16016 Use of this data is subject to the OpenCRG public license policy OpenCRG managing the road surface ahead 4 1 4 2 Method B script On machines having trouble with the provided makefiles either adapt those files or use the very basic fallback solution which is a compile script The script compileScript sh is located in the root directory OpenCRG c api Open the script set the compiler variable COMP to the name of your compiler re save the script and execute it The results should again be found in demo bin test bin In contrast to the makefile m
68. y further evaluation options modify existing ones or delete all evaluation options inherited from the data set e finally evaluation of data may begin 4 2 5 Evaluating Data Once a data set is loaded and a contact point is created data can be evaluated in various ways full prototypes of the referenced methods are in crgBaseLib h e compute the x y position of a given u v position crgEvaluv2xy e compute the u v position of a given x y position crgEvalxy2uv e compute the z value at a given u v position crgEvaluv2z e compute the z value at a given x y position crgEvalxy2z e compute heading angle and curvature at a given u v position crgEvaluv2pk 4 2 6 Message Printing The API provides a series of methods for controlling verbosity of the library Also the user may use these methods to provide control own messages which are to be printed to shell output here stderr The system knows the following message levels in increasing order which are controlled by symbolic constants in crgBaseLib h dCrgMsgLevelNone dCrgMsgLevelFatal dCrgMsgLevelWarn dCrgMsgLevelNotice dCrgMsgLevelInfo dCrgMsgLevelDebug The current message level is set by crgMsgSetLevel int level A message to be printed at or below a certain level is defined in standard printf syntax via crgMsgPrint int level const char format Date April 08 2

Download Pdf Manuals

image

Related Search

Related Contents

Acoustica MVS USB Manual  平成15年度サーベイランス改善班報告書 STI  lien - Ecole Libre Guy de Larigaudie de Musson  WS700G9.0 / WS700G13.0 Wippsäge mit Benzinmotor Bedienungs  lnstallation manual cateqorv AQ (aluminum mudguards)  HP 1020xi Fax  物件番号 管24−5 ・車種 ニッサン AD バン ・型式 R−VFY10  Fixapart EL-CONN041S  インドネシアにおける JCM 事業・調査の 実施段階での対応事項 ver1.0  2880 - Instructions - Electro  

Copyright © All rights reserved.
Failed to retrieve file