|
@@ -0,0 +1,8325 @@
|
|
|
+/*
|
|
|
+** IPGRoad - Version 10.0
|
|
|
+** Copyright (C) IPG Automotive GmbH
|
|
|
+** Bannwaldallee 60, D-76185 Karlsruhe, Germany
|
|
|
+** Tel. +49 (0)721 98520-0, Fax +49 (0)721 98520-99
|
|
|
+*/
|
|
|
+
|
|
|
+#ifndef ROAD_H__
|
|
|
+#define ROAD_H__
|
|
|
+
|
|
|
+#ifdef __cplusplus
|
|
|
+extern "C" {
|
|
|
+#endif
|
|
|
+
|
|
|
+/** \file road.h
|
|
|
+ * This header file mainly contains the functions, structs, enumerations and
|
|
|
+ * macros that are used to evaluate a road scenario.
|
|
|
+ */
|
|
|
+
|
|
|
+
|
|
|
+/** \cond
|
|
|
+ */
|
|
|
+#if !defined(__GNUC__)
|
|
|
+# if !defined(__inline__)
|
|
|
+# if defined(_MCCPPC)
|
|
|
+# define __inline__ inline
|
|
|
+# else
|
|
|
+# define __inline__ /**< nothing
|
|
|
+ */
|
|
|
+# endif
|
|
|
+# endif
|
|
|
+# if !defined(__attribute__)
|
|
|
+# define __attribute__(x) /**< nothing
|
|
|
+ */
|
|
|
+# endif
|
|
|
+#endif /* end Global.h */
|
|
|
+
|
|
|
+extern char RoadLibVersion[];
|
|
|
+extern char RoadLibArch[];
|
|
|
+extern char RoadLibCompileDate[];
|
|
|
+extern char RoadLibCompileTime[];
|
|
|
+extern char RoadLibCompileFlags[];
|
|
|
+extern char RoadLicSerialNo[16];
|
|
|
+extern char RoadLibVersionMajor;
|
|
|
+extern char RoadLibVersionMinor;
|
|
|
+extern int RoadLicExpiration;
|
|
|
+
|
|
|
+typedef struct tRoad tRoad;
|
|
|
+typedef struct tRoadEval tRoadEval;
|
|
|
+typedef struct tRoadMarkerEval tRoadMarkerEval;
|
|
|
+typedef struct tRoadRouteSpeedEval tRoadRouteSpeedEval;
|
|
|
+typedef struct tRoadTrackEval tRoadTrackEval;
|
|
|
+typedef struct tRoadTrfSignEval tRoadTrfSignEval;
|
|
|
+typedef struct tRoadLimEval tRoadLimEval;
|
|
|
+typedef struct tRoadPath tRoadPath;
|
|
|
+
|
|
|
+typedef struct tSpline tSpline;
|
|
|
+typedef struct tSpline2D tSpline2D;
|
|
|
+typedef struct tSpline3D tSpline3D;
|
|
|
+
|
|
|
+/** \endcond
|
|
|
+ */
|
|
|
+/** \addtogroup ObjectsEdit
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+
|
|
|
+/*** Object id ***/
|
|
|
+
|
|
|
+/** Error code: Invalid object id\n
|
|
|
+ * Used to flag invalid object ids of type #tObjId.
|
|
|
+ */
|
|
|
+#define ROAD_InvalidObjId -1
|
|
|
+/** Datatype tObjId:\n
|
|
|
+ * Object ids are of type <em>int</em>, but the negative numbers aren't used.
|
|
|
+ */
|
|
|
+#define tObjId int
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* === General ============================================================== */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup General
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Lateral references:\n
|
|
|
+ * The lateral position of an object is given relative to a specific position
|
|
|
+ * on the <em>Link</em>.
|
|
|
+ */
|
|
|
+typedef enum tRoadLatRef {
|
|
|
+ RLR_RMAX = -32,/**< <b>-32</b> Maximum number of right
|
|
|
+ * <em>Lanes</em> starting with the center line
|
|
|
+ * (negative sign for right <em>Lanes</em>)
|
|
|
+ */
|
|
|
+ RLR_R29 = -31,/**< <b>-31</b> Middle of the thirtieth
|
|
|
+ * <em>Lane</em> right of the <em>Reference line</em>
|
|
|
+ */
|
|
|
+ RLR_R28 = -30,/**< <b>-30</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R27 = -29,/**< <b>-29</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R26 = -28,/**< <b>-28</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R25 = -27,/**< <b>-27</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R24 = -26,/**< <b>-26</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R23 = -25,/**< <b>-25</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R22 = -24,/**< <b>-24</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R21 = -23,/**< <b>-23</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R20 = -22,/**< <b>-22</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R19 = -21,/**< <b>-21</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R18 = -20,/**< <b>-20</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R17 = -19,/**< <b>-19</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R16 = -18,/**< <b>-18</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R15 = -17,/**< <b>-17</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R14 = -16,/**< <b>-16</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R13 = -15,/**< <b>-15</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R12 = -14,/**< <b>-14</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R11 = -13,/**< <b>-13</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R10 = -12,/**< <b>-12</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R9 = -11,/**< <b>-11</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R8 = -10,/**< <b>-10</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R7 = -9,/**< <b>-9</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R6 = -8,/**< <b>-8</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R5 = -7,/**< <b>-7</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R4 = -6,/**< <b>-6</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R3 = -5,/**< <b>-5</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R2 = -4,/**< <b>-4</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R1 = -3,/**< <b>-3</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_R0 = -2,/**< <b>-2</b> Middle of the first <em>Lane</em>
|
|
|
+ * right of the <em>Reference line</em>
|
|
|
+ */
|
|
|
+ RLR_Right = -1,/**< <b>-1</b> Right <em>Road border</em>
|
|
|
+ */
|
|
|
+ RLR_Center = 0,/**< <b>0</b> Center line: divides left and
|
|
|
+ * right <em>Lanes</em>
|
|
|
+ */
|
|
|
+ RLR_Left = 1,/**< <b>1</b> Left <em>Road border</em>
|
|
|
+ */
|
|
|
+ RLR_L0, /**< <b>2</b> Middle of the first <em>Lane</em>
|
|
|
+ * left of the <em>Reference line</em>
|
|
|
+ */
|
|
|
+ RLR_L1, /**< <b>3</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L2, /**< <b>4</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L3, /**< <b>5</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L4, /**< <b>6</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L5, /**< <b>7</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L6, /**< <b>8</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L7, /**< <b>9</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L8, /**< <b>10</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L9, /**< <b>11</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L10, /**< <b>12</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L11, /**< <b>13</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L12, /**< <b>14</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L13, /**< <b>15</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L14, /**< <b>16</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L15, /**< <b>17</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L16, /**< <b>18</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L17, /**< <b>19</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L18, /**< <b>20</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L19, /**< <b>21</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L20, /**< <b>22</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L21, /**< <b>23</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L22, /**< <b>24</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L23, /**< <b>25</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L24, /**< <b>26</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L25, /**< <b>27</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L26, /**< <b>28</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L27, /**< <b>29</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L28, /**< <b>30</b>      . . .
|
|
|
+ */
|
|
|
+ RLR_L29, /**< <b>31</b> Middle of the thirtieth
|
|
|
+ * <em>Lane</em> left of the <em>Reference line</em>
|
|
|
+ */
|
|
|
+ RLR_LMAX, /**< <b>32</b> Maximum number of left
|
|
|
+ * <em>Lanes</em> starting with the center line
|
|
|
+ * (positive sign for left <em>Lanes</em>)
|
|
|
+ */
|
|
|
+
|
|
|
+ RLR_Pole0 = 98,/**< <b>98</b> Lateral position relative to
|
|
|
+ * <em>Pole 0</em> of a gantry
|
|
|
+ */
|
|
|
+ RLR_Pole1 = 99,/**< <b>99</b> Lateral position relative to
|
|
|
+ * <em>Pole 1</em> of a gantry
|
|
|
+ */
|
|
|
+ RLR_RefLine = 100,/**< <b>100</b> Lateral position relative to the
|
|
|
+ * <em>Reference line</em>
|
|
|
+ */
|
|
|
+ RLR_PosUnknown = -99,/**< <b>-99</b> Unknown position
|
|
|
+ * \deprecated See \ref RLR_RefUnknown.
|
|
|
+ */
|
|
|
+ RLR_RefUnknown = -99/**< <b>-99</b> Unknown lateral reference
|
|
|
+ * \note Internal use only.
|
|
|
+ */
|
|
|
+} tRoadLatRef;
|
|
|
+
|
|
|
+/** Longitudinal references:\n
|
|
|
+ * The longitudinal position of an object is given relative to a specific
|
|
|
+ * position on the <em>Link</em>.
|
|
|
+ * \note This enumeration is also used for <em>Reference lines</em>,
|
|
|
+ * <em>Segments</em>, <em>Lane sections</em>, <em>Lanes</em> and
|
|
|
+ * <em>Paths</em>. In these cases, #RLR_Node0 refers to the starting point
|
|
|
+ * and #RLR_Node1 to the end point of the respective reference object, the
|
|
|
+ * other two options are not allowed.
|
|
|
+ */
|
|
|
+typedef enum tRoadLonRef {
|
|
|
+ RLR_Node0 = 0, /**< <b>0</b> Starting point <em>Node0</em> of
|
|
|
+ * the <em>Link</em>
|
|
|
+ */
|
|
|
+ RLR_Node1 = 1, /**< <b>1</b> End point <em>Node1</em> of the
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+ RLR_JE0 = 2, /**< <b>2</b> Entry of the <em>Junction</em> at
|
|
|
+ * <em>Node0</em>
|
|
|
+ */
|
|
|
+ RLR_JE1 = 3 /**< <b>3</b> Entry of the <em>Junction</em> at
|
|
|
+ * <em>Node1</em>
|
|
|
+ */
|
|
|
+} tRoadLonRef;
|
|
|
+
|
|
|
+/** Kinds of positions:\n
|
|
|
+ * A distinction is made not only between on and off the road: It is also
|
|
|
+ * differentiated whether the vehicle has left the entire road or is still on
|
|
|
+ * the left or right <em>Road side</em>.
|
|
|
+ */
|
|
|
+typedef enum tRoadPosKind {
|
|
|
+ RPK_OffRoad = 0, /**< <b>0</b> Off the road
|
|
|
+ */
|
|
|
+ RPK_OnRoad, /**< <b>1</b> On the road
|
|
|
+ */
|
|
|
+ RPK_LeftMargin, /**< <b>2</b> On the left road side
|
|
|
+ */
|
|
|
+ RPK_RightMargin /**< <b>3</b> On the right road side
|
|
|
+ */
|
|
|
+} tRoadPosKind;
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Initialization Functions +++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup Init
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to generate and initialize a new instance of the road
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> handle of the new road instance\n
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadDelete() \see RoadSetApplication()
|
|
|
+ */
|
|
|
+tRoad *RoadNew(void);
|
|
|
+/** Function to delete an instance of the road
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \see RoadNew()
|
|
|
+ */
|
|
|
+void RoadDelete(tRoad *road);
|
|
|
+
|
|
|
+/** IPG application:\n
|
|
|
+ * The application IPGRoad is used with may have an influence on its behaviour.
|
|
|
+ * Currently, the only effect occurs in the context of <em>Traffic lights</em>:
|
|
|
+ * If the IPGRoad library is used with \ref RA_CarMaker "CarMaker", only the
|
|
|
+ * <em>Traffic light controllers</em> actually referenced by a <em>Traffic
|
|
|
+ * light</em> are considered by \ref RoadCtrlGetAllCtrlTL().
|
|
|
+ */
|
|
|
+typedef enum tRoadApplication {
|
|
|
+ RA_ScenarioEditor = 1, /**< <b>1</b> Scenario Editor
|
|
|
+ */
|
|
|
+ RA_CarMaker, /**< <b>2</b> CarMaker
|
|
|
+ */
|
|
|
+ RA_Movie, /**< <b>3</b> Movie
|
|
|
+ */
|
|
|
+ RA_Roadutil /**< <b>4</b> Roadutil
|
|
|
+ */
|
|
|
+} tRoadApplication;
|
|
|
+
|
|
|
+/** Function to set the IPG application using the IPGRoad library
|
|
|
+ * \note The IPG application must be set directly after calling \ref RoadNew().
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] app IPG application
|
|
|
+ * \see RoadNew()
|
|
|
+ */
|
|
|
+void RoadSetApplication(tRoad *road, tRoadApplication app);
|
|
|
+
|
|
|
+/** Function to get the prefix of the error messages of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> prefix of the error messages\n
|
|
|
+ * <tr><td> In case of failure: <td> ""
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetErrorMsgPrefix()
|
|
|
+ * \see ErrMsg
|
|
|
+ * \warning Do not free the returned pointer!
|
|
|
+ */
|
|
|
+char *RoadGetErrorMsgPrefix(tRoad *road);
|
|
|
+/** Function to set the prefix for the error messages of a road instance\n
|
|
|
+ * Default: "Road: "
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages chosen
|
|
|
+ * \see RoadGetErrorMsgPrefix()
|
|
|
+ * \see ErrMsg
|
|
|
+ */
|
|
|
+void RoadSetErrorMsgPrefix(tRoad *road, const char *errMsgPre);
|
|
|
+
|
|
|
+/** Function to set a list of search directories for the road data
|
|
|
+ * \param[in] dirs List of search directories: The first entry has the highest
|
|
|
+ * priority, the last entry has to be the NULL pointer.
|
|
|
+ */
|
|
|
+void RoadSetDataDirectories(const char **dirs);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Path Mode ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup PathMode
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Path mode:\n
|
|
|
+ * The <em>Path mode</em> determines the position and the direction of the
|
|
|
+ * automatically generated <em>Lane paths</em> on the road.
|
|
|
+ */
|
|
|
+typedef enum tRoutePathMode {
|
|
|
+ RPM_Right = -1, /**< <b>-1</b> Driving on the right-hand side of
|
|
|
+ * the road (default)
|
|
|
+ */
|
|
|
+ RPM_Center = 0, /**< <b>0</b> Driving in the center of the road,
|
|
|
+ * e.g. for race courses
|
|
|
+ */
|
|
|
+ RPM_Left = 1, /**< <b>1</b> Driving on the left-hand side of
|
|
|
+ * the road
|
|
|
+ */
|
|
|
+ RPM_Unknown = -99 /**< <b>-99</b> Unknown <em>Path mode</em>
|
|
|
+ */
|
|
|
+} tRoutePathMode;
|
|
|
+
|
|
|
+/** Function to get the <em>Path mode</em> of an instance of the road
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> <em>Path mode</em> of the road instance
|
|
|
+ * <tr><td> In case of failure: <td> \ref RPM_Unknown "unknown Path mode"
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetPathMode()
|
|
|
+ */
|
|
|
+int RoadGetPathMode(tRoad *road);
|
|
|
+/** Function to set the <em>Path mode</em> of an instance of the road\n
|
|
|
+ * Default: \ref RPM_Right "driving on the right-hand side of the road"
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] mode <em>Path mode</em> of the road instance
|
|
|
+ * \see RoadGetPathMode()
|
|
|
+ */
|
|
|
+void RoadSetPathMode(tRoad *road, tRoutePathMode mode);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Country Settings ++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup Country
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to get the country of the country-specific <em>Traffic signs</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> short cut of the country:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - AUT ↔ Austria
|
|
|
+ * - CHN ↔ China
|
|
|
+ * - DEU ↔ Germany
|
|
|
+ * - FRA ↔ France
|
|
|
+ * - GBR ↔ Great Britain
|
|
|
+ * - JPN ↔ Japan
|
|
|
+ * - KOR ↔ Korea
|
|
|
+ * - USA ↔ United States of America
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetCountry() \see RoadGetCountryFB()
|
|
|
+ */
|
|
|
+char* RoadGetCountry (tRoad *road);
|
|
|
+/** Function to set the country for the country-specific <em>Traffic signs</em>
|
|
|
+ * \n Default: DEU
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] country Short cut of the country:
|
|
|
+ * - AUT ↔ Austria
|
|
|
+ * - CHN ↔ China
|
|
|
+ * - DEU ↔ Germany
|
|
|
+ * - FRA ↔ France
|
|
|
+ * - GBR ↔ Great Britain
|
|
|
+ * - JPN ↔ Japan
|
|
|
+ * - KOR ↔ Korea
|
|
|
+ * - USA ↔ United States of America
|
|
|
+ * \see RoadGetCountry() \see RoadSetCountryFB()
|
|
|
+ */
|
|
|
+void RoadSetCountry (tRoad *road, char *country);
|
|
|
+
|
|
|
+/** Function to get the country from which <em>Traffic signs</em> not existing
|
|
|
+ * in the chosen \ref RoadGetCountry() "country" are taken
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> short cut of the fallback country:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - AUT ↔ Austria
|
|
|
+ * - CHN ↔ China
|
|
|
+ * - DEU ↔ Germany
|
|
|
+ * - FRA ↔ France
|
|
|
+ * - GBR ↔ Great Britain
|
|
|
+ * - JPN ↔ Japan
|
|
|
+ * - KOR ↔ Korea
|
|
|
+ * - USA ↔ United States of America
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetCountryFB() \see RoadGetCountry()
|
|
|
+ */
|
|
|
+char* RoadGetCountryFB(tRoad *road);
|
|
|
+/** Function to set the country from which <em>Traffic signs</em> not existing
|
|
|
+ * in the chosen \ref RoadGetCountry() "country" are taken
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] country Short cut of the fallback country:
|
|
|
+ * - AUT ↔ Austria
|
|
|
+ * - CHN ↔ China
|
|
|
+ * - DEU ↔ Germany
|
|
|
+ * - FRA ↔ France
|
|
|
+ * - GBR ↔ Great Britain
|
|
|
+ * - JPN ↔ Japan
|
|
|
+ * - KOR ↔ Korea
|
|
|
+ * - USA ↔ United States of America
|
|
|
+ * \see RoadGetCountryFB() \see RoadSetCountry()
|
|
|
+ */
|
|
|
+void RoadSetCountryFB(tRoad *road, char *country);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Road dependent GCS +++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup RDGCS
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** GCS Projection Mode:\n
|
|
|
+ * Used for the conversion of geocoded road data from WGS84 to the
|
|
|
+ * IPGRoad internal (x,y,z)-coordinate system.
|
|
|
+ */
|
|
|
+typedef enum tGCSMode {
|
|
|
+ GCS_FlatEarth = 0, /**< <b>0</b> Projection assuming the earth being
|
|
|
+ * flat
|
|
|
+ */
|
|
|
+ GCS_GaussKrueger, /**< <b>1</b> Gauss-Krueger projection
|
|
|
+ */
|
|
|
+ GCS_Unknown, /**< <b>2</b> Unknown projection mode
|
|
|
+ */
|
|
|
+ GCS_Count /**< <b>3</b> Number of projection modes
|
|
|
+ * including #GCS_Unknown
|
|
|
+ */
|
|
|
+} tGCSMode;
|
|
|
+
|
|
|
+/** Function to get the default GCS projection mode of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> default GCS projection mode
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetGCSDefaultMode()
|
|
|
+ */
|
|
|
+tGCSMode RoadGetGCSDefaultMode(tRoad *road);
|
|
|
+/** Function to set the default GCS projection mode of a road instance\n
|
|
|
+ * Default: <em>\ref GCS_FlatEarth "FlatEarth"</em>.
|
|
|
+ * \note This function must be called before the first <em>\ref SegmentsEdit
|
|
|
+ * "Segment"</em> of type <em>File</em> containing (lat,long,elev)-data is
|
|
|
+ * added.In case it is called after a call of RoadSetGCS() with a different
|
|
|
+ * GCS projection mode, it returns <em>#ROAD_GCSError</em>.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] mode GCS projection mode chosen as default mode
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetGCSDefaultMode()
|
|
|
+ */
|
|
|
+int RoadSetGCSDefaultMode(tRoad *road, tGCSMode mode);
|
|
|
+
|
|
|
+/** Function to get the GCS projection mode and the reference position of the
|
|
|
+ * GCS module of a road instance in IPGRoad and WGS84 coordinates
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[out] mode GCS projection mode
|
|
|
+ * \param[out] xyz Reference position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates [m,m,m]
|
|
|
+ * \param[out] lle Reference position in WGS84:
|
|
|
+ * (lat,lon,elev)-coordinates [deg, deg, m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetGCS() \see RoadDeleteGCS()
|
|
|
+ */
|
|
|
+int RoadGetGCS (tRoad *road, tGCSMode *mode, double xyz[3], double lle[3]);
|
|
|
+/** Function to initialize the GCS module of a road instance\n
|
|
|
+ * This function sets the GCS projection mode and the reference position of the
|
|
|
+ * GCS module of a road instance in IPGRoad and WGS84 coordinates. There is
|
|
|
+ * only one global GCS module concerning the conversion of all positions from
|
|
|
+ * xyz to lle or vice versa using the current valid GCS module settings.\n
|
|
|
+ * \note Resetting the GCS module is allowed, but it only causes the conversion
|
|
|
+ * of files read in the future.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] mode GCS projection mode
|
|
|
+ * \param[in] xyz Reference position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates [m,m,m]
|
|
|
+ * \param[in] lle Reference position in WGS84:
|
|
|
+ * (lat,lon,elev)-coordinates [deg, deg, m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetGCS() \see RoadDeleteGCS()
|
|
|
+ */
|
|
|
+int RoadSetGCS (tRoad *road, tGCSMode mode, double xyz[3], double lle[3]);
|
|
|
+/** Function to delete the GCS module of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \see RoadGetGCS() \see RoadSetGCS()
|
|
|
+ */
|
|
|
+void RoadDeleteGCS(tRoad *road);
|
|
|
+
|
|
|
+/** Function to convert a given position in WGS84 to the corresponding position
|
|
|
+ * in the IPGRoad coordinate system using the internal GCS module of a road
|
|
|
+ * instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] lle Position in WGS84:
|
|
|
+ * (lat,lon,elev)-coordinates [deg,deg,m]
|
|
|
+ * \param[out] xyz Position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates [m,m,m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see Roadxyz2lle()
|
|
|
+ */
|
|
|
+int Roadlle2xyz (tRoad *road, double lle[3], double xyz[3]);
|
|
|
+/** Function to convert a given position in the IPGRoad coordinate system to the
|
|
|
+ * corresponding position in WGS84 using the internal GCS module of a road
|
|
|
+ * instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] xyz Position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates [m,m,m]
|
|
|
+ * \param[out] lle Position in WGS84:
|
|
|
+ * (lat,lon,elev)-coordinates [deg,deg,m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see Roadlle2xyz()
|
|
|
+ */
|
|
|
+int Roadxyz2lle (tRoad *road, double xyz[3], double lle[3]);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Road Speed Types +++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup Speed
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Unlimited speed:\n
|
|
|
+ * Macro used to indicate that there is no speed limit on a certain type of
|
|
|
+ * road.
|
|
|
+ */
|
|
|
+#define ROAD_SPEED_UNLIMITED -1
|
|
|
+
|
|
|
+/** Road speed types:\n
|
|
|
+ * Used to define general speed limits.
|
|
|
+ */
|
|
|
+typedef enum tRoadSpeedType {
|
|
|
+ RST_Urban, /**< <b>0</b> Urban: default speed limit 50km/h
|
|
|
+ */
|
|
|
+ RST_Countryroad, /**< <b>1</b> Country: default speed limit
|
|
|
+ * 100km/h
|
|
|
+ */
|
|
|
+ RST_Motorway, /**< <b>2</b> Motorway: default speed unlimited
|
|
|
+ */
|
|
|
+ RST_Roundabout, /**< <b>3</b> Roundabout: default speed limit
|
|
|
+ * 30km/h
|
|
|
+ */
|
|
|
+ RST_Ramp, /**< <b>4</b> Ramp: default speed limit 70km/h
|
|
|
+ */
|
|
|
+ RST_Dirttrack, /**< <b>5</b> Dirt-track: default speed limit
|
|
|
+ * 30km/h
|
|
|
+ */
|
|
|
+ RST_User, /**< <b>6</b> User defined: default speed
|
|
|
+ * unlimited
|
|
|
+ */
|
|
|
+ RST_Undefined, /**< <b>7</b> Undefined: default speed unlimited
|
|
|
+ */
|
|
|
+ RST_Count /**< <b>8</b> Number of <em>Road speed types</em>
|
|
|
+ * including #RST_Undefined
|
|
|
+ */
|
|
|
+} tRoadSpeedType;
|
|
|
+
|
|
|
+/** Function to get the unit of the speed limits for the different <em>Road
|
|
|
+ * speed types</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> unit of the speed limits for the <em>Road speed types</em>:
|
|
|
+ * <em>kmh</em> and <em>mph</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetSpeedByTypeUnit()
|
|
|
+ */
|
|
|
+char *RoadGetSpeedByTypeUnit(tRoad *road);
|
|
|
+/** Function to set the unit for the speed limits for the different <em>Road
|
|
|
+ * speed types</em>
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] unit Unit chosen for the speed limits for the <em>Road speed
|
|
|
+ * types</em>: Supported units are <em>kmh</em> and <em>mph</em>.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetSpeedByTypeUnit()
|
|
|
+ */
|
|
|
+int RoadSetSpeedByTypeUnit(tRoad *road, const char *unit);
|
|
|
+
|
|
|
+/** Function to get the <em>Road speed type</em> of a <em>Link</em> or
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the <em>Link</em> or <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> <em>Road speed type</em> of the <em>Link</em> or <em>Junction</em>
|
|
|
+ * <tr><td><td> default: \ref RST_Undefined "Undefined"
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetSpeedType()
|
|
|
+ */
|
|
|
+tRoadSpeedType RoadGetSpeedType(tRoad *road, tObjId objId);
|
|
|
+/** Function to set the <em>Road speed type</em> of a <em>Link</em> or
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the <em>Link</em> or <em>Junction</em>
|
|
|
+ * \param[in] rst <em>Road speed type</em> chosen for the <em>Link</em> or
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetSpeedType()
|
|
|
+ */
|
|
|
+int RoadSetSpeedType(tRoad *road, tObjId objId, tRoadSpeedType rst);
|
|
|
+
|
|
|
+/** Function to get the speed limit of a given <em>Road speed type</em> in the unit
|
|
|
+ * chosen by the user
|
|
|
+ * \note Internally the speed is saved in m/s.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rst <em>Road speed type</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> speed limit of the given <em>Road speed type</em>
|
|
|
+ * <tr><td><td> special value: -1 ↔ no speed restriction
|
|
|
+ * <tr><td> In case of failure: <td> 0.0
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetSpeedByTypeMS() \see RoadSetSpeedByType()
|
|
|
+ */
|
|
|
+double RoadGetSpeedByType (tRoad *road, tRoadSpeedType rst);
|
|
|
+/** Function to get the speed limit of a given <em>Road speed type</em> in the
|
|
|
+ * unit m/s
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rst <em>Road speed type</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> speed limit of the given <em>Road speed type</em>
|
|
|
+ * <tr><td><td> special value: -1.0 ↔ no speed restriction\n
|
|
|
+ * <tr><td> In case of failure: <td> 0.0
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetSpeedByType() \see RoadSetSpeedByType()
|
|
|
+ */
|
|
|
+double RoadGetSpeedByTypeMS(tRoad *road, tRoadSpeedType rst);
|
|
|
+/** Function to set the speed limit of a given <em>Road speed type</em>
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] rst <em>Road speed type</em>
|
|
|
+ * \param[in] speed Speed limit in the unit chosen by the user
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetSpeedByType() \see RoadGetSpeedByTypeMS()
|
|
|
+ */
|
|
|
+int RoadSetSpeedByType (tRoad *road, tRoadSpeedType rst, double speed);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Movie Settings +++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+/** \addtogroup Movie
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+//! Movie settings
|
|
|
+/** Struct for the <em>Visualization parameters</em> of a road instance
|
|
|
+ */
|
|
|
+typedef struct tRoadMovie {
|
|
|
+ double ds; /**< Step size in longitudinal direction in
|
|
|
+ * meters
|
|
|
+ */
|
|
|
+ double dt; /**< Step size in lateral direction in meters
|
|
|
+ */
|
|
|
+ double maxErr; /**< Maximum viewing error: absolute value in
|
|
|
+ * x- and y-direction
|
|
|
+ */
|
|
|
+ double bWidth[2]; /**< Shown road side width left/right in meters
|
|
|
+ */
|
|
|
+ double bSlope[2]; /**< Shown slope angle left/right in percentage
|
|
|
+ */
|
|
|
+ char *bgGeoFName; /**< Name of the TclGeo file included in order
|
|
|
+ * to change the environment in the background
|
|
|
+ */
|
|
|
+ char *bgGeoOptions; /**< Options for the TclGeo file
|
|
|
+ */
|
|
|
+ char *terrainFName; /**< Name of the <em>.obj</em> file used for the
|
|
|
+ * representation of the landscape in IPGMovie
|
|
|
+ */
|
|
|
+} tRoadMovie;
|
|
|
+
|
|
|
+/** Function to get the general movie settings of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[out] movie Pointer to a struct for the movie settings
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetMovie() \see RoadGetLinkMovie()
|
|
|
+ */
|
|
|
+int RoadGetMovie(tRoad *road, tRoadMovie *movie);
|
|
|
+/** Function to set the general movie settings of a road instance\n
|
|
|
+ * Default: \ref tRoadMovie::ds "ds" = 0.2, \ref tRoadMovie::dt "dt" = 1.0,
|
|
|
+ * \ref tRoadMovie::maxErr "maxErr" = 0.01, \ref tRoadMovie::bWidth "bWidth"
|
|
|
+ * = [1.5,1.5], \ref tRoadMovie::bSlope "bSlope" = [1.0,1.0]
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] movie Struct with the movie settings
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMovie() \see RoadSetLinkMovie()
|
|
|
+ */
|
|
|
+int RoadSetMovie(tRoad *road, tRoadMovie movie);
|
|
|
+/** Function to get a <em>Link's</em> individual movie settings
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] lObjId Object id of the <em>Link</em>
|
|
|
+ * \param[out] movie Pointer to a struct for the <em>Link's</em> individual
|
|
|
+ * movie settings
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetLinkMovie() \see RoadGetMovie()
|
|
|
+ */
|
|
|
+int RoadGetLinkMovie(tRoad *road, tObjId lObjId, tRoadMovie *movie);
|
|
|
+/** Function to set a <em>Link's</em> individual movie settings
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] lObjId Object id of the <em>Link</em>
|
|
|
+ * \param[in] movie Struct with the movie settings
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetLinkMovie() \see RoadSetMovie()
|
|
|
+ */
|
|
|
+int RoadSetLinkMovie(tRoad *road, tObjId lObjId, tRoadMovie movie);
|
|
|
+
|
|
|
+/** Movie object types:\n
|
|
|
+ * There are different types of objects relevant for the movie, which are for
|
|
|
+ * example used to set the standard texture for objects.
|
|
|
+ */
|
|
|
+typedef enum tRoadMovieObjectType {
|
|
|
+ RMOT_Road = 0, /**< <b>0</b> Road surface area
|
|
|
+ */
|
|
|
+ RMOT_Terrain, /**< <b>1</b> Terrain
|
|
|
+ */
|
|
|
+ RMOT_Max, /**< <b>2</b> Number of movie object types
|
|
|
+ */
|
|
|
+} tRoadMovieObjectType;
|
|
|
+
|
|
|
+/** Function to set the movie standard texture of all objects of a certain
|
|
|
+ * movie object type\n
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] type Movie object type
|
|
|
+ * \param[in] texture Name of the image file to use for the texture
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMovieTexture()
|
|
|
+ */
|
|
|
+int RoadSetMovieTexture(tRoad *road, tRoadMovieObjectType type,
|
|
|
+ const char *texture);
|
|
|
+/** Function to get the movie standard texture of all objects of a certain
|
|
|
+ * movie object type
|
|
|
+ * \note The user is responsible to free the memory allocated by this function.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] type Movie object type
|
|
|
+ * \param[in] texture Pointer to a string with the name of the image file to use
|
|
|
+ * for the texture
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMovieTexture()
|
|
|
+ */
|
|
|
+int RoadGetMovieTexture(tRoad *road, tRoadMovieObjectType type,
|
|
|
+ char **texture);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ IO Functions +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup IO
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+struct tInfos;
|
|
|
+
|
|
|
+/** Function to read the info data struct of a TestRun or an <em>.rd5</em>
|
|
|
+ * InfoFile and store the information in a road handle
|
|
|
+ * \param[out] road Handle of the road instance
|
|
|
+ * \param[in] inf Pointer to the info data struct
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadWriteInf() \see RoadReadInfoFile()
|
|
|
+ */
|
|
|
+int RoadReadInf (tRoad *road, struct tInfos *inf);
|
|
|
+/** Function to read a TestRun or an <em>.rd5</em> InfoFile and store the
|
|
|
+ * information in a road handle
|
|
|
+ * \param[out] road Handle of the road instance
|
|
|
+ * \param[in] infoFName Name of the InfoFile
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadWriteFile() \see RoadReadInf()
|
|
|
+ */
|
|
|
+int RoadReadInfoFile(tRoad *road, char *infoFName);
|
|
|
+
|
|
|
+/** Function to write the information about a road instance to an info data
|
|
|
+ * struct of a TestRun or an <em>.rd5</em> InfoFile
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[out] inf Pointer to the info data struct
|
|
|
+ * \param[in] prefix Prefix "Road" in case the information about the road is
|
|
|
+ * written to the info data struct of a TestRun InfoFile
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadReadInf() \see RoadWriteFile()
|
|
|
+ */
|
|
|
+int RoadWriteInf (tRoad *road, struct tInfos *inf, const char *prefix);
|
|
|
+/** Function to write the information about a road instance to a TestRun or an
|
|
|
+ * <em>.rd5</em> InfoFile
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] fName Name of the InfoFile the information should be written to
|
|
|
+ * \param[in] prefix Prefix "Road" in case the information about the road is
|
|
|
+ * written to a TestRun InfoFile
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadReadInfoFile() \see RoadWriteInf()
|
|
|
+ */
|
|
|
+int RoadWriteFile(tRoad *road, char *fName, const char *prefix);
|
|
|
+
|
|
|
+/** Function to import an OpenDRIVE<sup>®</sup> road definition to IPGRoad
|
|
|
+ * \note Because of the differences between the internal structures of IPGRoad
|
|
|
+ * and OpenDRIVE<sup>®</sup>, there are certain limitations to the import,
|
|
|
+ * which are described in the CarMaker User's Guide.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] fname Name of the <em>.xodr</em> file containing the road
|
|
|
+ * definition
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadReadInfoFile() \see RoadOpenDRIVELane2Path()
|
|
|
+ */
|
|
|
+int RoadReadOpenDRIVE (tRoad *road, const char *fname);
|
|
|
+/** Function to determine the object id of the corresponding <em>Path</em> and
|
|
|
+ * the offset on this <em>Path</em> from the identifier of a certain road in an
|
|
|
+ * OpenDRIVE<sup>®</sup> road definition, the offset on this road and the
|
|
|
+ * lane identifier\n
|
|
|
+ * \note In OpenDRIVE<sup>®</sup> junctions also consist of roads with
|
|
|
+ * lanes. These lanes are imported to IPGRoad as <em>Connector paths</em>.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] odrRoadId Identifier of the OpenDRIVE<sup>®</sup> road
|
|
|
+ * \param[in] odrLaneId OpenDRIVE<sup>®</sup> lane identifier
|
|
|
+ * \param[in] odrS Offset in s-direction on the OpenDRIVE<sup>®</sup> road
|
|
|
+ * \param[out] pathObjId Object id of the corresponding <em>Path</em>
|
|
|
+ * \param[out] sPathRef Offset in s-direction on the <em>Path</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadReadOpenDRIVE()
|
|
|
+ */
|
|
|
+int RoadOpenDRIVELane2Path(tRoad *road, int odrRoadId, int odrLaneId,
|
|
|
+ double odrS, tObjId *pathObjId, double *sPathRef);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* --- Compatibility to Road 4.5 -------------------------------------------- */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+/** \addtogroup Format45
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to check whether the road definition uses the former road 4.5
|
|
|
+ * format
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> flag indicating the format of the road definition:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - 0 ↔ current road format
|
|
|
+ * - 1 ↔ former road 4.5 format
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetDefIs45()
|
|
|
+ */
|
|
|
+int RoadDefIs45 (tRoad *road);
|
|
|
+/** Function to set the variable indicating the format of the road definition
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] is45 Parameter determining the format of the road definition:
|
|
|
+ * - 0 ↔ current road format
|
|
|
+ * - 1 ↔ former road 4.5 format
|
|
|
+ * \see RoadDefIs45()
|
|
|
+ */
|
|
|
+void RoadSetDefIs45 (tRoad *road, int is45);
|
|
|
+
|
|
|
+/** Function to read an info data struct of the former road 4.5 format and
|
|
|
+ * store the information in a road handle
|
|
|
+ * \param[out] road Handle of the road instance
|
|
|
+ * \param[out] inf Pointer to an info data struct
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadReadDefIs45Inf(tRoad *road, struct tInfos *inf);
|
|
|
+
|
|
|
+/** Function to read a road definition in the former road 4.5 format given in
|
|
|
+ * form of the "Road."-block in a TestRun InfoFile or the digitized road
|
|
|
+ * definition in an extra file and store the information in a road handle
|
|
|
+ * \param[out] road Handle of the road instance
|
|
|
+ * \param[in] FName Name of the TestRun InfoFile
|
|
|
+ * \param[in,out] DigFileName Name of the file containing the digitized road
|
|
|
+ * definition
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadReadTxt()
|
|
|
+ */
|
|
|
+int RoadReadFile(tRoad *road, const char *FName, const char *DigFileName);
|
|
|
+/** Function to read a road definition in the former road 4.5 format given in
|
|
|
+ * form of a string containing a "Road."-block or a digitized road definition
|
|
|
+ * in an extra file and store the information in a road handle
|
|
|
+ * \param[out] road Handle of the road instance
|
|
|
+ * \param[in] Txt String with the "Road."-block
|
|
|
+ * \param[in,out] DigFileName Name of the file containing the digitized road
|
|
|
+ * definition
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadReadFile()
|
|
|
+ */
|
|
|
+int RoadReadTxt (tRoad *road, char *const *Txt, const char *DigFileName);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ General functions for editing a road instance ++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup GeneralEdit
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to set a road instance invalid
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \see RoadIsValid()
|
|
|
+ */
|
|
|
+void RoadSetInvalid(tRoad *road);
|
|
|
+/** Function to check whether a road instance is valid or not
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> flag indicating whether the road instance is valid:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - 0 ↔ invalid
|
|
|
+ * - 1 ↔ valid
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetInvalid()
|
|
|
+ */
|
|
|
+int RoadIsValid (tRoad *road);
|
|
|
+/** Function to check whether a road instance has a <em>Link</em> or
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return Flag indicating whether the road instance is empty:
|
|
|
+ * - 0 ↔ road instance is not empty
|
|
|
+ * - 1 ↔ road instance is empty
|
|
|
+ */
|
|
|
+int RoadIsEmpty (tRoad *road);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to set the running mode for a given road instance\n
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] mode Running mode
|
|
|
+ * \deprecated Formerly applied in order to enable the use of the IPGRoad 7.0
|
|
|
+ * Library as IPGRoad 6.0 Library.
|
|
|
+ */
|
|
|
+void RoadSetRunningMode(tRoad *road, int mode);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to check whether grade and slope are given in the unit m/m or
|
|
|
+ * percentage
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> flag indicating the unit of grade and slope:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - 0 ↔ m/m
|
|
|
+ * - 1 ↔ percentage
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGradeAndSlopeInPercentage(tRoad *road);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* === Eval ================================================================= */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ General ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+/** \addtogroup GeneralEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+//! Evaluation statistics
|
|
|
+/** Struct for the storage of the numbers of evaluation and global search calls
|
|
|
+ * \see RoadEvalGetStat()
|
|
|
+ */
|
|
|
+typedef struct tRoadEvalStat {
|
|
|
+ int nEvalCalls; /**< Total number of evaluation calls
|
|
|
+ */
|
|
|
+ int nGlobalSearchCalls; /**< Total number of global search calls:\n
|
|
|
+ * In case the evaluation in a local area of the
|
|
|
+ * road doesn't work, the coordinates of a
|
|
|
+ * position are searched globally resulting in
|
|
|
+ * an increased expense.
|
|
|
+ */
|
|
|
+} tRoadEvalStat;
|
|
|
+
|
|
|
+/** Function to get the statistics of the evaluation and global search calls
|
|
|
+ * \param[in] re Road evaluation handle
|
|
|
+ * \param[out] stat Pointer to a struct for the evaluation statistics
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadEvalGetStat(tRoadEval *re, tRoadEvalStat *stat);
|
|
|
+
|
|
|
+
|
|
|
+/*** Bump mask options ***/
|
|
|
+
|
|
|
+/** No bumps:\n
|
|
|
+ * Flag indicating that no <em>Bumps</em> should be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_NONE (0)
|
|
|
+/** All bumps:\n
|
|
|
+ * Flag indicating that all <em>Bumps</em> should be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_ALL (1<<0)
|
|
|
+/** Friction patches:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Friction</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_FRIC (1<<1)
|
|
|
+/** Beams:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Beam</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_BEAM (1<<2)
|
|
|
+/** Waves:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Wave</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_WAVE (1<<3)
|
|
|
+/** Cones:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Cone</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_CONE (1<<4)
|
|
|
+/** CRG-files:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>CRG</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_CRG (1<<5)
|
|
|
+/** Meshes:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Mesh</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_MESH (1<<6)
|
|
|
+/** Lateral profiles:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Lateral profile</em> should
|
|
|
+ * be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_LATP (1<<7)
|
|
|
+/** Raised profiles:\n
|
|
|
+ * Flag indicating that <em>Bumps</em> of type <em>Raised profile</em> should
|
|
|
+ * be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_BUMP_RAISEDP (1<<8)
|
|
|
+
|
|
|
+/** No Elevation profiles:\n
|
|
|
+ * Flag indicating that <em>Elevation profiles</em> should not be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_ZP_NO_ELEV (1<<10)
|
|
|
+/** No Slope profiles:\n
|
|
|
+ * Flag indicating that <em>Slope profiles</em> should not be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_ZP_NO_SLOPE (1<<11)
|
|
|
+/** No Camber profiles:\n
|
|
|
+ * Flag indicating that <em>Camber profiles</em> should not be considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_ZP_NO_CAMBER (1<<12)
|
|
|
+/** No Junctions:\n
|
|
|
+ * Flag indicating that <em>Junctions</em> should not be explicitly considered
|
|
|
+ * when evaluating a <em>Link</em>.
|
|
|
+ * \note Only valid for the evaluation of a <em>Link</em> by
|
|
|
+ * \ref RoadLinkGeoEval() using \ref tRoadLinkIn::useST "local coordinates": \n
|
|
|
+ * For the calculation of \ref tRoadLinkOut::xyz "z" and \ref tRoadLinkOut::nuv
|
|
|
+ * "nuv" at positions on the <em>Junction</em> at in the <em>Link's</em> start
|
|
|
+ * or end the height profile of the junction area is not considered.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_LINK_NO_JUNCTION (1<<13)
|
|
|
+
|
|
|
+
|
|
|
+/*** Output mask options ***/
|
|
|
+
|
|
|
+/** Minimum output:\n
|
|
|
+ * Flag indicating minimum output: Output of the calculated position in the
|
|
|
+ * global and in the local coordinate system.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_MIN (0)
|
|
|
+/** Normal unit vector:\n
|
|
|
+ * Flag indicating the output of the road surface normal unit vector.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_NUV (1<<0)
|
|
|
+/** Longitudinal unit vector:\n
|
|
|
+ * Flag indicating the output of the unit vector in s-direction.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_SUV (1<<1)
|
|
|
+/** Lateral unit vector:\n
|
|
|
+ * Flag indicating the output of the unit vector in t-direction.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_TUV (1<<2)
|
|
|
+/** Longitudinal gradient:\n
|
|
|
+ * Flag indicating the output of the gradient of the z-coordinate in
|
|
|
+ * s-direction (dz/ds).
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_GRADE (1<<3)
|
|
|
+/** Lateral gradient:\n
|
|
|
+ * Flag indicating the output of the gradient of the z-coordinate in
|
|
|
+ * t-direction (dz/dt).
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_SLOPE (1<<4)
|
|
|
+/** Lateral curvature:\n
|
|
|
+ * Flag indicating the output of the curvature of the curve in the (x,y)-plane.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_CURVE_XY (1<<5)
|
|
|
+/** Longitudinal z-curvature:\n
|
|
|
+ * Flag indicating the output of the curvature of the curve in the (s,z)-plane
|
|
|
+ * (change of \ref ROAD_OT_GRADE "grade" in s-direction).
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_CURVE_Z (1<<6)
|
|
|
+/** Friction:\n
|
|
|
+ * Flag indicating the output of the friction coefficient.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_FRIC (1<<7)
|
|
|
+/** Width:\n
|
|
|
+ * Flag indicating the output of the width between the position and the
|
|
|
+ * left/right border of the road.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_WIDTH (1<<8)
|
|
|
+/** Lanes:\n
|
|
|
+ * Flag indicating the output of the <em>Lanes</em>.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_LANES (1<<9)
|
|
|
+/** Extended output:\n
|
|
|
+ * Flag indicating the output of all members of the extended struct.
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ */
|
|
|
+#define ROAD_OT_EXT (1<<10)
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate and initialize a new road evaluation handle for a road
|
|
|
+ * instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] bumpMask Mask indicating which types of the <em>Bumps</em> and
|
|
|
+ * <em>Height profiles</em> should be considered by the new road evaluation
|
|
|
+ * handle:\n
|
|
|
+ * The binary system is used to generate combinations of the bump mask options
|
|
|
+ * #ROAD_BUMP_FRIC, #ROAD_BUMP_BEAM, #ROAD_BUMP_WAVE, #ROAD_BUMP_CONE,
|
|
|
+ * #ROAD_BUMP_CRG, #ROAD_BUMP_MESH and #ROAD_BUMP_LATP (special macros:
|
|
|
+ * #ROAD_BUMP_NONE/#ROAD_BUMP_ALL), as well as #ROAD_ZP_NO_ELEV,
|
|
|
+ * #ROAD_ZP_NO_SLOPE and #ROAD_ZP_NO_CAMBER.
|
|
|
+ * \param[in] outMask Mask indicating which quantities are considered for the
|
|
|
+ * output of the new road evaluation handle:\n
|
|
|
+ * The binary system is used to generate combinations of the output mask
|
|
|
+ * options #ROAD_OT_MIN, #ROAD_OT_NUV, #ROAD_OT_SUV, #ROAD_OT_TUV,
|
|
|
+ * #ROAD_OT_GRADE, #ROAD_OT_SLOPE, #ROAD_OT_CURVE_XY, #ROAD_OT_CURVE_Z,
|
|
|
+ * #ROAD_OT_FRIC, #ROAD_OT_WIDTH, #ROAD_OT_LANES and #ROAD_OT_EXT.
|
|
|
+ * \param[in] module Internal use only: Set this parameter to NULL.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> new road evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadDeleteRoadEval() \see RoadResetRoadEval()
|
|
|
+ * \see RoadResetMaskRoadEval() \see RoadSetRoadEvalObjId
|
|
|
+ * \see RoadGetRoadEvalObjId
|
|
|
+ */
|
|
|
+tRoadEval *RoadNewRoadEval (tRoad *road,
|
|
|
+ int bumpMask, int outMask, const char *module);
|
|
|
+/** Function to delete a road evaluation handle
|
|
|
+ * \param[in] re Road evaluation handle that should be deleted
|
|
|
+ * \see RoadNewRoadEval() \see RoadResetRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ * \see RoadSetRoadEvalObjId \see RoadGetRoadEvalObjId
|
|
|
+ */
|
|
|
+void RoadDeleteRoadEval (tRoadEval *re);
|
|
|
+/** Function to reset a road evaluation handle:\n
|
|
|
+ * The handle of the road instance is linked to the road evaluation handle.
|
|
|
+ * \param[in,out] re Road evaluation handle
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \see RoadNewRoadEval() \see RoadDeleteRoadEval() \see RoadResetMaskRoadEval()
|
|
|
+ * \see RoadSetRoadEvalObjId \see RoadGetRoadEvalObjId
|
|
|
+ */
|
|
|
+void RoadResetRoadEval (tRoadEval *re, tRoad *road);
|
|
|
+/** Function to reset a road evaluation handle:\n
|
|
|
+ * Besides the handle of the road instance, the bump mask and the output mask
|
|
|
+ * are linked to the road evaluation handle.
|
|
|
+ * \param[in,out] re Road evaluation handle
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] bumpMask Mask indicating which types of the <em>Bumps</em> and
|
|
|
+ * <em>Height profiles</em> should be considered by the new road evaluation
|
|
|
+ * handle:\n
|
|
|
+ * The binary system is used to generate combinations of the bump mask options
|
|
|
+ * #ROAD_BUMP_FRIC, #ROAD_BUMP_BEAM, #ROAD_BUMP_WAVE, #ROAD_BUMP_CONE,
|
|
|
+ * #ROAD_BUMP_CRG, #ROAD_BUMP_MESH and #ROAD_BUMP_LATP (special macros:
|
|
|
+ * #ROAD_BUMP_NONE/#ROAD_BUMP_ALL), as well as #ROAD_ZP_NO_ELEV,
|
|
|
+ * #ROAD_ZP_NO_SLOPE and #ROAD_ZP_NO_CAMBER.
|
|
|
+ * \param[in] outMask Mask indicating which quantities are considered for the
|
|
|
+ * output of the new road evaluation handle:\n
|
|
|
+ * The binary system is used to generate combinations of the output mask
|
|
|
+ * options #ROAD_OT_MIN, #ROAD_OT_NUV, #ROAD_OT_SUV, #ROAD_OT_TUV,
|
|
|
+ * #ROAD_OT_GRADE, #ROAD_OT_SLOPE, #ROAD_OT_CURVE_XY, #ROAD_OT_CURVE_Z,
|
|
|
+ * #ROAD_OT_FRIC, #ROAD_OT_WIDTH, #ROAD_OT_LANES and #ROAD_OT_EXT.
|
|
|
+ * \see RoadNewRoadEval() \see RoadDeleteRoadEval() \see RoadResetRoadEval()
|
|
|
+ * \see RoadSetRoadEvalObjId \see RoadGetRoadEvalObjId
|
|
|
+ */
|
|
|
+void RoadResetMaskRoadEval(tRoadEval *re, tRoad *road,
|
|
|
+ int bumpMask, int outMask);
|
|
|
+/** Function to limit the road evaluation to a certain <em>Link</em> or
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \param[in,out] re Road evaluation handle
|
|
|
+ * \param[in] objId Object id of the <em>Link</em> or <em>Junction</em> the
|
|
|
+ * evaluation should be limited to
|
|
|
+ * \see RoadGetRoadEvalObjId \see RoadNewRoadEval() \see RoadDeleteRoadEval()
|
|
|
+ * \see RoadResetRoadEval() \see RoadResetMaskRoadEval() \see RoadLinkGeoEval()
|
|
|
+ * \see RoadRefLineGeoEval() \see RoadGeoEvalExt()
|
|
|
+ */
|
|
|
+void RoadSetRoadEvalObjId (tRoadEval *re, tObjId objId);
|
|
|
+/** Function to get the object Id of the <em>Link</em> or <em>Junction</em> to
|
|
|
+ * which the road evaluation is limited
|
|
|
+ * \param[in] re Road evaluation handle
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> Object Id of the <em>Link</em> or <em>Junction</em> the evaluation is
|
|
|
+ * limited to
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetRoadEvalObjId \see RoadNewRoadEval() \see RoadDeleteRoadEval()
|
|
|
+ * \see RoadResetRoadEval() \see RoadResetMaskRoadEval() \see RoadLinkGeoEval()
|
|
|
+ * \see RoadRefLineGeoEval() \see RoadGeoEvalExt()
|
|
|
+ */
|
|
|
+tObjId RoadGetRoadEvalObjId (tRoadEval *re);
|
|
|
+//! Global evaluation: output
|
|
|
+/** Struct for the output parameters of RoadGlobalEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadGlobalOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadGlobalOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+ int onJunction; /**< Flag indicating whether (x,y) is on a
|
|
|
+ * <em>Link</em> or on a <em>Junction</em>:\n
|
|
|
+ * - 0 ↔ <em>Link</em>
|
|
|
+ * - 1 ↔ <em>Junction</em>
|
|
|
+ */
|
|
|
+ int id; /**< Identifier of the <em>Link</em> or
|
|
|
+ * <em>Junction</em>\n Special value:
|
|
|
+ * -1 ↔ (x,y) is not on the road
|
|
|
+ */
|
|
|
+} tRoadGlobalOut;
|
|
|
+
|
|
|
+/** Function to evaluate a given position without using a road evaluation
|
|
|
+ * handle
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] xyz Position in the global IPGRoad coordinate system (Fr0) with an
|
|
|
+ * estimated z-coordinate
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGeoEval()
|
|
|
+ */
|
|
|
+int RoadGlobalEval(tRoad *road, double xyz[3], tRoadGlobalOut *out);
|
|
|
+
|
|
|
+//! General evaluation: input
|
|
|
+/** Struct for the input parameters of RoadGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadGeoIn {
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)\note
|
|
|
+ * An estimation of the z-coordinate is given
|
|
|
+ * in order to simplify the evaluation (if no
|
|
|
+ * reasonable estimation is known, initialize
|
|
|
+ * the z-coordinate with zero).
|
|
|
+ */
|
|
|
+} tRoadGeoIn;
|
|
|
+//! General evaluation: output
|
|
|
+/** Struct for the output parameters of RoadGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadGeoOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadGeoOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+ int onJunction; /**< Flag indicating whether (x,y) is on a
|
|
|
+ * <em>Link</em> or on a <em>Junction</em>:\n
|
|
|
+ * - 0 ↔ on a <em>Link</em>
|
|
|
+ * - 1 ↔ on a <em>Junction</em>
|
|
|
+ */
|
|
|
+ double fric; /**< Friction coefficient at
|
|
|
+ * \ref tRoadGeoOut::xyz "xyz"
|
|
|
+ */
|
|
|
+} tRoadGeoOut;
|
|
|
+
|
|
|
+/** Function to evaluate a given position using a road evaluation handle
|
|
|
+ * \param[in] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \note It is recommended to use the extended version RoadGeoEvalExt() of this
|
|
|
+ * function.
|
|
|
+ * \see RoadGlobalEval()
|
|
|
+ */
|
|
|
+int RoadGeoEval(tRoadEval *re, const char *errMsgPre, const tRoadGeoIn *in,
|
|
|
+ tRoadGeoOut *out);
|
|
|
+
|
|
|
+//! General evaluation: input (extended version)
|
|
|
+/** Struct for the input parameters of RoadGeoEvalExt()
|
|
|
+ */
|
|
|
+typedef struct tRoadGeoInExt {
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad coordinate
|
|
|
+ * system (Fr0)\note
|
|
|
+ * An estimation of the z-coordinate is given in order
|
|
|
+ * to simplify the evaluation (if no reasonable
|
|
|
+ * estimation is known, initialize the z-coordinate with
|
|
|
+ * zero).
|
|
|
+ */
|
|
|
+ double suv[2]; /**< Longitudinal unit vector at
|
|
|
+ * \ref tRoadGeoInExt::xyz "xyz":\n
|
|
|
+ * Unit vector in viewing direction
|
|
|
+ * \note This vector is used to determine whether the
|
|
|
+ * results should be calculated in (default in case this
|
|
|
+ * vector is zero) or counter
|
|
|
+ * \ref tRoadGeoOutExt::inLinkDir "link direction".
|
|
|
+ */
|
|
|
+} tRoadGeoInExt;
|
|
|
+//! General evaluation: output (extended version)
|
|
|
+/** Struct for the input parameters of RoadGeoEvalExt()
|
|
|
+ */
|
|
|
+typedef struct tRoadGeoOutExt {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double st[2]; /**< Calculated position in the <em>Link's</em>
|
|
|
+ * local coordinate system
|
|
|
+ * \note Only valid if \ref tRoadGeoOutExt::xyz
|
|
|
+ * "xyz" is not \ref tRoadGeoOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadGeoOutExt::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at
|
|
|
+ * \ref tRoadGeoOutExt::xyz "xyz":\n
|
|
|
+ * Unit vector \ref tRoadGeoOutExt::inLinkDir
|
|
|
+ * "in or counter" s-direction of the
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at
|
|
|
+ * \ref tRoadGeoOutExt::xyz "xyz":\n
|
|
|
+ * Unit vector \ref tRoadGeoOutExt::inLinkDir
|
|
|
+ * "in or counter" t-direction of the
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+ double fric; /**< Friction coefficient at
|
|
|
+ * \ref tRoadGeoOutExt::xyz "xyz"
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+ tObjId laneObjId; /**< Object id of the current <em>Lane</em>
|
|
|
+ */
|
|
|
+ tObjId linkObjId; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * object id of the current <em>Link</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * object id of the last <em>Link</em>
|
|
|
+ */
|
|
|
+ tObjId juncObjId; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * object id of the last <em>Junction</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * object id of the current <em>Junction</em>
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * \name
|
|
|
+ * The following parameters need the #ROAD_OT_EXT flag to be set.
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/* --- the following parameters need the ROAD_OT_EXT flag to be set --------- */
|
|
|
+ double nextJuncDist; /**< Distance to the next junction entry on the
|
|
|
+ * <em>Link</em>
|
|
|
+ * \note Only valid if \ref tRoadGeoOutExt::xyz
|
|
|
+ * "xyz" is not \ref tRoadGeoOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ */
|
|
|
+ double lastJuncDist; /**< Distance to the last junction entry on the
|
|
|
+ * <em>Link</em>
|
|
|
+ * \note Only valid if \ref tRoadGeoOutExt::xyz
|
|
|
+ * "xyz" is not \ref tRoadGeoOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ */
|
|
|
+ double t2Ref; /**< Distance to the <em>Reference line</em>
|
|
|
+ * \note This parameter corresponds to \ref
|
|
|
+ * tRoadGeoOutExt::st "st[1]", but the sign is
|
|
|
+ * changed in case the output is calculated
|
|
|
+ * counter \ref tRoadGeoOutExt::inLinkDir
|
|
|
+ * "link direction".
|
|
|
+ * \note Only valid if \ref tRoadGeoOutExt::xyz
|
|
|
+ * "xyz" is not \ref tRoadGeoOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ */
|
|
|
+ int onJunction; /**< Flag indicating whether (x,y) is on a
|
|
|
+ * <em>Link</em> or on a <em>Junction</em>:\n
|
|
|
+ * - 0 ↔ on a <em>Link</em>
|
|
|
+ * - 1 ↔ on a <em>Junction</em>
|
|
|
+ */
|
|
|
+ int inLinkDir; /**< Flag indicating whether the output is
|
|
|
+ * calculated in link direction (default) or
|
|
|
+ * counter link direction:\n
|
|
|
+ * - 0 ↔ counter link direction
|
|
|
+ * - 1 ↔ in link direction
|
|
|
+ *
|
|
|
+ * \note This is determined by the \ref
|
|
|
+ * tRoadGeoInExt::suv "longitudinal unit vector"
|
|
|
+ * of the input struct indicating the
|
|
|
+ * viewing direction.
|
|
|
+ */
|
|
|
+ tObjId nextJuncObjId; /**< Object id of the next <em>Junction</em>
|
|
|
+ * \note Set to #ROAD_InvalidObjId if \ref
|
|
|
+ * tRoadGeoOutExt::xyz "xyz" is \ref
|
|
|
+ * tRoadGeoOutExt::onJunction "on a Junction".
|
|
|
+ */
|
|
|
+/** @} */
|
|
|
+
|
|
|
+} tRoadGeoOutExt;
|
|
|
+
|
|
|
+/** Function to evaluate a given position using a road evaluation handle:
|
|
|
+ * extended version
|
|
|
+ * \param[in] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGlobalEval()
|
|
|
+ */
|
|
|
+int RoadGeoEvalExt(tRoadEval *re, const char *errMsgPre,
|
|
|
+ const tRoadGeoInExt *in, tRoadGeoOutExt *out);
|
|
|
+
|
|
|
+
|
|
|
+/** Input type:\n
|
|
|
+ * Type of input used for RoadPathGeoEval(), RoadRouteEval() and
|
|
|
+ * RoadRouteEvalExt()
|
|
|
+ */
|
|
|
+typedef enum tRoadInType {
|
|
|
+ RIT_ST, /**< <b>0</b> Input type: The (s,t)-coordinates of the
|
|
|
+ * <em>Path</em> or <em>Route</em> must be given.\n
|
|
|
+ * This option is useful for the calculation of a <em>Driving
|
|
|
+ * plan</em> along a predefined <em>Route</em>
|
|
|
+ * (IPGDriver/IPGTraffic).
|
|
|
+ */
|
|
|
+ RIT_XY_S, /**< <b>1</b> Input type: The (x,y)-coordinates of the
|
|
|
+ * <em>Path</em> or <em>Route</em> must be given. Moreover, an
|
|
|
+ * estimation for the s-coordinate is recommended.\note
|
|
|
+ * If no reasonable estimation can be given, the z-coordinate
|
|
|
+ * should be initialized as zero.
|
|
|
+ */
|
|
|
+ RIT_XY_SZ, /**< <b>2</b> Input type: The (x,y)-coordinates of the
|
|
|
+ * <em>Path</em> or <em>Route</em> and an estimated z-coordinate
|
|
|
+ * must be given.
|
|
|
+ */
|
|
|
+} tRoadInType;
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Objects ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup ObjectsEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to get the internal identifier of an object from its object id
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> internal identifier of the object\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadJuncIdGetJuncObjId() \see RoadJuncObjIdGetJuncId()
|
|
|
+ * \see RoadLinkIdGetLinkObjId() \see RoadLinkObjIdGetLinkId()
|
|
|
+ * \see RoadRouteIdGetRouteObjId() \see RoadRouteObjIdGetRouteId()
|
|
|
+ */
|
|
|
+int RoadObjIdGetInternalId(tRoad *road, tObjId objId);
|
|
|
+/** Function to get the largest object id of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> largest object id of the road instance
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+tObjId RoadGetMaxUsedObjectId(tRoad *road);
|
|
|
+
|
|
|
+
|
|
|
+/** Types of road objects
|
|
|
+ * \see RoadGetObjectType() \see RoadGetParentObjectType()
|
|
|
+ */
|
|
|
+typedef enum tRoadObjectType {
|
|
|
+/* --- General object types --------------------------------------- */
|
|
|
+ ROT_Invalid = -1, /**< <b>-1</b>
|
|
|
+ * Invalid road object type
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to junctions ------------------------- */
|
|
|
+ ROT_Junction = 20, /**< <b>20</b>
|
|
|
+ * \ref tRoadJunction "Junction"
|
|
|
+ */
|
|
|
+ ROT_JunctionArm, /**< <b>21</b>
|
|
|
+ * \ref tRoadJunctionArm "Junction arm"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to links ----------------------------- */
|
|
|
+ ROT_Link = 40, /**< <b>40</b>
|
|
|
+ * \ref tRoadLink "Link"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to xy-Reference lines ---------------- */
|
|
|
+ ROT_RefLine = 50, /**< <b>50</b>
|
|
|
+ * \ref tRoadRefLine "Reference line"
|
|
|
+ */
|
|
|
+ ROT_Segment = 60, /**< <b>60</b>
|
|
|
+ * \ref tRoadSegment "Segment"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to z profiles ------------------------ */
|
|
|
+ ROT_LonZPElevation = 80, /**< <b>80</b> \ref tRoadZP
|
|
|
+ * "Longitudinal elevation profile"
|
|
|
+ */
|
|
|
+ ROT_LatZPSlope, /**< <b>81</b> \ref tRoadZP
|
|
|
+ * "Lateral slope profile"
|
|
|
+ */
|
|
|
+ ROT_LatZPCamber, /**< <b>82</b> \ref tRoadZP
|
|
|
+ * "Lateral camber profile"
|
|
|
+ */
|
|
|
+ ROT_Node1DProfile = 85, /**< <b>85</b> \ref
|
|
|
+ * tRoadNode1DProfile
|
|
|
+ * "One dimensional node profile"
|
|
|
+ */
|
|
|
+ ROT_Node1D = 90, /**< <b>90</b> \ref tRoadNode1D
|
|
|
+ * "One-dimensional nodes",
|
|
|
+ * used for lane width, connector path
|
|
|
+ * width, lateral offset, height
|
|
|
+ * profiles and general one-dimensional
|
|
|
+ * node profiles.
|
|
|
+ */
|
|
|
+ ROT_Node2D = 91, /**< <b>91</b> \ref tRoadNode2D
|
|
|
+ * "Two-dimensional nodes",
|
|
|
+ * used for the point lists
|
|
|
+ * defining <em>Segments</em>.
|
|
|
+ */
|
|
|
+ ROT_PathNode = 93, /**< <b>93</b>
|
|
|
+ * \ref tRoadPathSTNode "User path node"
|
|
|
+ */
|
|
|
+ ROT_AlignedRefPoint = 95, /**< <b>95</b> \ref LanesEdit
|
|
|
+ * "Aligned reference point"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to Lanes ----------------------------- */
|
|
|
+ ROT_LaneSection = 100, /**< <b>100</b>
|
|
|
+ * \ref tRoadLaneSection "Lane section"
|
|
|
+ */
|
|
|
+ ROT_Lane, /**< <b>101</b>
|
|
|
+ * \ref tRoadLane "Lane"
|
|
|
+ */
|
|
|
+ ROT_LateralOffset, /**< <b>102</b> \ref
|
|
|
+ * tRoadLateralOffset "Lateral offset"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to Bumps ----------------------------- */
|
|
|
+ ROT_BBeam = 200, /**< <b>200</b> \ref
|
|
|
+ * tRoadBumpBeam "Bump of type Beam"
|
|
|
+ */
|
|
|
+ ROT_BCone, /**< <b>201</b> \ref
|
|
|
+ * tRoadBumpCone "Bump of type Cone"
|
|
|
+ */
|
|
|
+ ROT_BFric, /**< <b>202</b> \ref
|
|
|
+ * tRoadBumpFric "Bump of type Friction"
|
|
|
+ */
|
|
|
+ ROT_BMesh, /**< <b>203</b> \ref
|
|
|
+ * tRoadBumpMesh "Bump of type Mesh"
|
|
|
+ */
|
|
|
+ ROT_BLatP, /**< <b>204</b> \ref
|
|
|
+ * tRoadBumpLatProfile
|
|
|
+ * "Bump of type Lateral profile"
|
|
|
+ */
|
|
|
+ ROT_BRaisedP, /**< <b>205</b> \ref
|
|
|
+ * tRoadBumpRaisedProfile
|
|
|
+ * "Bump of type Raised profile"
|
|
|
+ */
|
|
|
+ ROT_BWave, /**< <b>206</b> \ref
|
|
|
+ * tRoadBumpWave "Bump of type Wave"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to markers --------------------------- */
|
|
|
+/* --- Driver instructions --- */
|
|
|
+ ROT_MDrvSpeed = 400, /**< <b>400</b>
|
|
|
+ * \ref tRoadMarkerDrvSpeed
|
|
|
+ * "Marker of type Driver speed"
|
|
|
+ */
|
|
|
+ ROT_MDrvStop, /**< <b>401</b>
|
|
|
+ * \ref tRoadMarkerDrvStop
|
|
|
+ * "Marker of type Driver stop"
|
|
|
+ */
|
|
|
+ ROT_MDrvPylon, /**< <b>402</b>
|
|
|
+ * \ref tRoadMarkerDrvPylon
|
|
|
+ * "Marker of type Pylon alley"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- DrivMan instructions --- */
|
|
|
+ ROT_MDrivManCmd = 420, /**< <b>420</b>
|
|
|
+ * \ref tRoadMarkerDrivManCmd
|
|
|
+ * "Marker of type DrivMan command"
|
|
|
+ */
|
|
|
+ ROT_MDrivManJump, /**< <b>421</b>
|
|
|
+ * \ref tRoadMarkerDrivManJump
|
|
|
+ * "Marker of type DrivMan jump"
|
|
|
+ */
|
|
|
+ ROT_MDrivManTrigger, /**< <b>422</b>
|
|
|
+ * \ref tRoadMarkerDrivManTrigger
|
|
|
+ * "Marker of type Trigger point"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Environment --- */
|
|
|
+ ROT_MEnvWind = 440, /**< <b>440</b>
|
|
|
+ * \ref tRoadMarkerEnvWind
|
|
|
+ * "Marker of type Wind"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- User-defined --- */
|
|
|
+ ROT_MUserDefined = 460, /**< <b>460</b>
|
|
|
+ * \ref tRoadMarkerUser
|
|
|
+ * "Marker of type User-defined"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Object types relating to detectable objects ---------------- */
|
|
|
+/* --- Road furniture --- */
|
|
|
+ ROT_Mount = 600, /**< <b>600</b>
|
|
|
+ * \ref tRoadMount "Mount"
|
|
|
+ */
|
|
|
+ ROT_TrfSign, /**< <b>601</b>
|
|
|
+ * \ref tRoadTrafficSign "Traffic sign"
|
|
|
+ */
|
|
|
+ ROT_TrfLight, /**< <b>602</b> \ref
|
|
|
+ * tRoadTrafficLight "Traffic light"
|
|
|
+ */
|
|
|
+ ROT_TrfBarrier, /**< <b>603</b> \ref
|
|
|
+ * tRoadTrafficBarrier "Traffic barrier"
|
|
|
+ */
|
|
|
+ ROT_RoadMarking, /**< <b>604</b>
|
|
|
+ * \ref tRoadRoadMarking "Road marking"
|
|
|
+ */
|
|
|
+ ROT_RoadPainting, /**< <b>605</b> \ref
|
|
|
+ * tRoadRoadPainting "Road painting"
|
|
|
+ */
|
|
|
+ ROT_GuidePost, /**< <b>606</b>
|
|
|
+ * \ref tRoadGuidePost "Guide posts"
|
|
|
+ */
|
|
|
+ ROT_Bridge, /**< <b>607</b>
|
|
|
+ * \ref tRoadBridge "Bridge"
|
|
|
+ */
|
|
|
+ ROT_Tunnel, /**< <b>608</b>
|
|
|
+ * \ref tRoadTunnel "Tunnel"
|
|
|
+ */
|
|
|
+
|
|
|
+ ROT_CTL = 650, /**< <b>650</b>
|
|
|
+ * \ref RoadAdoptParamsForCTL
|
|
|
+ * "Connected trajectory list":\n
|
|
|
+ * In order to achieve a continuous road
|
|
|
+ * marking, adjacent <em>Road markings
|
|
|
+ * </em> can be merged into one common
|
|
|
+ * object of type <em>Connected
|
|
|
+ * trajectory list</em>.
|
|
|
+ */
|
|
|
+ ROT_Ctrl_TrfLight = 670, /**< <b>670</b>
|
|
|
+ * \ref tRoadCtrlTrfLight
|
|
|
+ * "Traffic light controller"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Scenery --- */
|
|
|
+ ROT_TreeStrip = 700, /**< <b>700</b>
|
|
|
+ * \ref tRoadTreeStrip "Tree strip"
|
|
|
+ */
|
|
|
+ ROT_SignPlate, /**< <b>701</b>
|
|
|
+ * \ref tRoadSignPlate "Sign plate"
|
|
|
+ */
|
|
|
+ ROT_Geometry, /**< <b>702</b>
|
|
|
+ * \ref tRoadGeoObject "Geometry object"
|
|
|
+ */
|
|
|
+ ROT_RoadSurface, /**< <b>703</b>
|
|
|
+ * \ref tRoadRoadSurface "Road surface"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Route and Path --------------------------------------------- */
|
|
|
+ ROT_Route = 1000, /**< <b>1000</b>
|
|
|
+ * \ref RoadAddRoute "Route"
|
|
|
+ */
|
|
|
+ ROT_DrvPath, /**< <b>1001</b> \ref
|
|
|
+ * RoadRouteAddDrvPath "Driving path"
|
|
|
+ */
|
|
|
+ ROT_LanePath, /**< <b>1002</b>
|
|
|
+ * \ref tRoadLanePath "Lane path"
|
|
|
+ */
|
|
|
+ ROT_UserPath, /**< <b>1003</b>
|
|
|
+ * \ref tRoadUserPath "User path"
|
|
|
+ */
|
|
|
+ ROT_ConPath, /**< <b>1004</b>
|
|
|
+ * \ref tRoadConPath "Connector path"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Terrain ---------------------------------------------------- */
|
|
|
+ ROT_Area = 1100, /**< <b>1100</b>
|
|
|
+ * \ref tRoadArea "Area"
|
|
|
+ */
|
|
|
+ ROT_Polygon = 1200, /**< <b>1200</b>
|
|
|
+ * \ref tRoadPolygon "Polygon"
|
|
|
+ */
|
|
|
+
|
|
|
+/* --- Background image ------------------------------------------- */
|
|
|
+ ROT_BgImage = 1300, /**< <b>1300</b> Background image
|
|
|
+ * displayed in the Scenario Editor
|
|
|
+ */
|
|
|
+
|
|
|
+} tRoadObjectType;
|
|
|
+
|
|
|
+/** Function to get the type of a given object
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> \ref tRoadObjectType "Object type" of the given object
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetParentObjectType() \see RoadGetObjectUserType()
|
|
|
+ */
|
|
|
+int RoadGetObjectType(tRoad *road, tObjId objId);
|
|
|
+
|
|
|
+/** Function to get the identifier for the user-defined type of a given object
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier for the user-defined type of the given object
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetObjectType() \see RoadSetObjectUserType()
|
|
|
+ */
|
|
|
+int RoadGetObjectUserType(tRoad *road, tObjId objId);
|
|
|
+/** Function to set the identifier for the user-defined type of a given object
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object
|
|
|
+ * \param[in] userType Identifier for the user-defined type
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetObjectUserType()
|
|
|
+ */
|
|
|
+int RoadSetObjectUserType(tRoad *road, tObjId objId, int userType);
|
|
|
+
|
|
|
+/** Function to convert a given position in an object's local coordinate system
|
|
|
+ * to the corresponding position in the (x,y)-plane of the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the given object
|
|
|
+ * \param[in] pos Position in the object's local coordinate system:
|
|
|
+ * start ↔ 0...1 ↔ end
|
|
|
+ * \param[out] xy Position in the (x,y)-plane of the global IPGRoad coordinate
|
|
|
+ * system
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGetObjectXY(tRoad *road, tObjId objId, double pos, double xy[2]);
|
|
|
+
|
|
|
+/** Function to get the type of a given object's parent object
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the given object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> \ref tRoadObjectType "Object Type" of the object's parent object
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetParentObjectId() \see RoadGetObjectType()
|
|
|
+ */
|
|
|
+int RoadGetParentObjectType(tRoad *road, tObjId objId);
|
|
|
+/** Function to get the object id and the type of a given object's parent
|
|
|
+ * object
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the given object
|
|
|
+ * \param[out] parentType Object type of the object's parent object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the parent object
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetParentObjectType()
|
|
|
+ */
|
|
|
+tObjId RoadGetParentObjectId (tRoad *road, tObjId objId,
|
|
|
+ tRoadObjectType *parentType);
|
|
|
+
|
|
|
+/** Function to get the tag of a given object\n
|
|
|
+ * The tag of an object is an internally not evaluated string that can be used
|
|
|
+ * to add further information about an object.
|
|
|
+ * \warning It is not allowed to free the memory of the return value!
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> tag of the object\n
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadSetObjectTag()
|
|
|
+ */
|
|
|
+char *RoadGetObjectTag(tRoad *road, tObjId objId);
|
|
|
+/** Function to set the tag of a given object\n
|
|
|
+ * The tag of an object is an internally not evaluated string that can be used
|
|
|
+ * to add further information about an object.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object
|
|
|
+ * \param[in] tag Tag for the object
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetObjectTag()
|
|
|
+ */
|
|
|
+int RoadSetObjectTag(tRoad *road, tObjId objId, char *tag);
|
|
|
+
|
|
|
+//! Bounding box
|
|
|
+/** Struct for the extents of a road instance in x-, y- and z-direction
|
|
|
+ */
|
|
|
+typedef struct tRoadBBox {
|
|
|
+ double min[3]; /**< Minimum x/y/z-coordinate of the road instance
|
|
|
+ */
|
|
|
+ double max[3]; /**< Maximum x/y/z-coordinate of the road instance
|
|
|
+ */
|
|
|
+} tRoadBBox;
|
|
|
+
|
|
|
+
|
|
|
+/** Function to get the information about a given <em>Link</em> or
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the <em>Link</em> or <em>Junction</em>
|
|
|
+ * \param[in] type Type of the object: <em>\ref ROT_Link "Link"</em> or <em>\ref
|
|
|
+ * ROT_Junction "Junction"</em>
|
|
|
+ * \param[out] info Pointer to the struct for the information about the
|
|
|
+ * <em>\ref tRoadLinkInfo "Link"</em> or <em>\ref tRoadJunctionInfo
|
|
|
+ * "Junction"</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadObjIdGetInfo(tRoad *road, tObjId objId, tRoadObjectType type,
|
|
|
+ void *info);
|
|
|
+
|
|
|
+/** Function to get the direction vector of a given object at a certain offset
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the object that can be either a <em>Link</em>,
|
|
|
+ * <em>Reference line</em>, <em>Route</em> or <em>Path</em>
|
|
|
+ * \param[in] s Offset in s-direction on the object
|
|
|
+ * \param[out] suv Normalized direction vector in the (x,y)-plane of the
|
|
|
+ * associated <em>Reference line</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadObjIdGetRefLineSUV (tRoad *road, tObjId objId, double s,
|
|
|
+ double suv[2]);
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Junctions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup JunctionsEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Maximum number of <em>Junction arms</em>:\n
|
|
|
+ * For each <em>Junction</em> at most sixteen arms can be defined.
|
|
|
+ */
|
|
|
+#define ROAD_JUNC_MAX_ARMS 16
|
|
|
+
|
|
|
+/** Types of <em>Junctions</em>
|
|
|
+ * \see RoadJunctionGetType()
|
|
|
+ */
|
|
|
+ typedef enum tRoadJunctionType {
|
|
|
+ RJT_Simple = 0, /**< <b>0</b> Standard junction
|
|
|
+ */
|
|
|
+ RJT_Extended, /**< <b>1</b> Extended junction
|
|
|
+ */
|
|
|
+ RJT_Virtual, /**< <b>2</b> Virtual junction
|
|
|
+ */
|
|
|
+ RJT_Direct, /**< <b>3</b> Direct junction
|
|
|
+ */
|
|
|
+ RJT_Unknown, /**< <b>4</b> Unknown junction type
|
|
|
+ */
|
|
|
+ RJT_Count /**< <b>5</b> Number of junction types
|
|
|
+ * including #RJT_Unknown
|
|
|
+ */
|
|
|
+ } tRoadJunctionType;
|
|
|
+
|
|
|
+/** Function to get the type of a <em>Junction</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] jObjId Object id of the <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> \ref tRoadJunctionType "type" of the <em>Junction</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+tRoadJunctionType RoadJunctionGetType(tRoad *road, tObjId jObjId);
|
|
|
+
|
|
|
+/** Function to get the object id of a <em>Junction</em> from its internal
|
|
|
+ * identifier
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] juncId Identifier of the <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Junction</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadJuncObjIdGetJuncId()
|
|
|
+ */
|
|
|
+tObjId RoadJuncIdGetJuncObjId(tRoad *road, int juncId);
|
|
|
+/** Function to get the internal identifier of a <em>Junction</em> from its
|
|
|
+ * object id
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] jObjId Object id of the <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the <em>Junction</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadObjIdGetInternalId() \see RoadJuncIdGetJuncObjId()
|
|
|
+ */
|
|
|
+int RoadJuncObjIdGetJuncId(tRoad *road, tObjId jObjId);
|
|
|
+
|
|
|
+//! Junction information
|
|
|
+/** Struct for the information about a <em>Junction</em>
|
|
|
+ * \deprecated Do not use with RoadObjIdGetInfo().\n
|
|
|
+ * Use #tRoadJunctionInfo() for the information about a <em>Junction</em>
|
|
|
+ */
|
|
|
+typedef struct tRoadJuncInfo {
|
|
|
+ tObjId objId; /**< Object id of the <em>Junction</em>
|
|
|
+ */
|
|
|
+ int nArm; /**< Number of arms of the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ int jArmObjId[ROAD_JUNC_MAX_ARMS];/**< Array containing the object ids of
|
|
|
+ * the <em>Junction arms</em> of the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ int lObjId[ROAD_JUNC_MAX_ARMS]; /**< Array containing the object ids of
|
|
|
+ * the <em>Links</em> the <em>Junction
|
|
|
+ * arms</em> are connected to\n
|
|
|
+ * Special value: \ref ROAD_InvalidObjId
|
|
|
+ * ↔ unconnected <em>Junction
|
|
|
+ * arm</em>
|
|
|
+ */
|
|
|
+ double angle[ROAD_JUNC_MAX_ARMS]; /**< Array containing the directions of
|
|
|
+ * the <em>Junction arm</em> in degrees
|
|
|
+ * (counter-clockwise with respect to
|
|
|
+ * the z-axis)
|
|
|
+ */
|
|
|
+} tRoadJuncInfo;
|
|
|
+//! Junction information
|
|
|
+/** Struct for the object information about a <em>Junction</em>
|
|
|
+ * \see RoadObjIdGetInfo()
|
|
|
+ */
|
|
|
+typedef struct tRoadJunctionInfo {
|
|
|
+ tObjId objId; /**< Object id of the <em>Junction</em> or
|
|
|
+ * <em>Junction arm</em>
|
|
|
+ * (\ref tRoadJunctionInfo::arm "arm::objId")
|
|
|
+ */
|
|
|
+ int nArm; /**< Number of arms of the <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId mObjId0; /**< Object id of the first main arm of the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId mObjId1; /**< Object id of the second main arm of the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ double knot[3]; /**< Position of the junction knot in the
|
|
|
+ * (x,y,z)-coordinates of the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ struct {
|
|
|
+ tObjId objId; /**<
|
|
|
+ */
|
|
|
+ tObjId lObjId; /**< Object id of the <em>Link</em> connected
|
|
|
+ * to the <em>Junction arm</em> \n
|
|
|
+ * Special value: \ref ROAD_InvalidObjId ↔
|
|
|
+ * unconnected <em>Junction arm</em>
|
|
|
+ */
|
|
|
+ double lenOnLink; /**< Length on the connected link which is used
|
|
|
+ * by the <em>Junction arm</em> in meters
|
|
|
+ */
|
|
|
+ } arm[ROAD_JUNC_MAX_ARMS]; /**< Array containing the structs for the
|
|
|
+ * information about the <em>Junction arms</em>
|
|
|
+ */
|
|
|
+} tRoadJunctionInfo;
|
|
|
+
|
|
|
+/** Function to get the information about a given <em>Junction</em>\n
|
|
|
+ * The <em>Junction</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] jObjId Object id of the <em>Junction</em>
|
|
|
+ * \param[out] jInfo Pointer to a struct for the information about the
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadObjIdGetInfo() to get the information about a
|
|
|
+ * <em>Junction</em>.
|
|
|
+ */
|
|
|
+int RoadGetJuncInfo (tRoad *road, int jObjId, tRoadJuncInfo *jInfo);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Junction arm</em>\n
|
|
|
+ * For the calculation of the surface of a <em>Junction arm</em> it is
|
|
|
+ * differentiated according to whether it is a main arm or not.
|
|
|
+ * \note Only valid for the <em>Junction arms</em> of \ref RJT_Simple
|
|
|
+ * "standard" <em>Junctions</em>.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] jArmObjId Object id of the <em>Junction arm</em>
|
|
|
+ * \param[in] uv Position on the <em>Junction arm</em> given in the coordinate
|
|
|
+ * system of its BPM \n
|
|
|
+ * Whereas the two main arms share a BPM that is rather straight, all further
|
|
|
+ * arms have their own rather distorted BPM.
|
|
|
+ * \param[out] xyz Calculated position in the global IPGRoad coordinate system
|
|
|
+ * (Fr0)
|
|
|
+ * \param[out] nuv Road surface normal unit vector at <b>xyz</b>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadJunctionArmGeoEval(tRoad *road, tObjId jArmObjId, double uv[2],
|
|
|
+ double xyz[3], double nuv[3]);
|
|
|
+
|
|
|
+/** Function to activate an algorithm to optimize the shape of the junction area
|
|
|
+ * \note Only valid for \ref RJT_Simple "standard" <em>Junctions</em>.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] flag Switch to activate/deactivate the algorithm:
|
|
|
+ * - 0 ↔ deactivate
|
|
|
+ * - 1 ↔ activate
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+void RoadSetAutomaticJunctionAreaAdaption (tRoad *road, int flag);
|
|
|
+
|
|
|
+/** Function to fit the height map of a <em>Junction</em> to a given set of
|
|
|
+ * points
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] jObjId Object id of the <em>Junction</em>
|
|
|
+ * \param[in] n Number of points
|
|
|
+ * \param[in] xyz Sample points the height map should be fitted to
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadJunctionFitHM2Samples (tRoad *road, tObjId jObjId,
|
|
|
+ const int n, double xyz[][3]);
|
|
|
+/** Function to fit the height map of a <em>Junction</em> to the connected
|
|
|
+ * link nodes
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] jObjId Object id of the <em>Junction</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadJunctionFitSurf2ConnectedLinkNodes(tRoad *road, tObjId jObjId);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Links ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup LinksEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to get the object id of a <em>Link</em> from its internal
|
|
|
+ * identifier
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] linkId Identifier of the <em>Link</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Link</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkObjIdGetLinkId()
|
|
|
+ */
|
|
|
+tObjId RoadLinkIdGetLinkObjId(tRoad *road, int linkId);
|
|
|
+/** Function to get the internal identifier of a <em>Link</em> from its object
|
|
|
+ * id
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] lObjId Object id of the <em>Link</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the <em>Link</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadObjIdGetInternalId() \see RoadLinkIdGetLinkObjId()
|
|
|
+ */
|
|
|
+int RoadLinkObjIdGetLinkId(tRoad *road, tObjId lObjId);
|
|
|
+
|
|
|
+/** Function to get the object id of the <em>Reference line</em> of a
|
|
|
+ * <em>Link</em>\n
|
|
|
+ * The <em>Link</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] linkId Identifier of the <em>Link</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Link's</em> <em>Reference line</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadGetLinkRefLineObjId() to get the object id of a
|
|
|
+ * <em>Link's Reference line</em>.
|
|
|
+ */
|
|
|
+tObjId RoadLinkIdGetRefLineObjId(tRoad *road, int linkId);
|
|
|
+
|
|
|
+//! Link information
|
|
|
+/** Struct for the object information about a <em>Link</em>
|
|
|
+ * \see RoadObjIdGetInfo()
|
|
|
+ */
|
|
|
+typedef struct tRoadLinkInfo {
|
|
|
+ tObjId objId; /**< Object id of the <em>Link</em>
|
|
|
+ */
|
|
|
+ tObjId jObjId0; /**< Object id of the <em>Junction</em> to
|
|
|
+ * which the <em>Link's</em> starting point
|
|
|
+ * <em>Node0</em> is connected\n
|
|
|
+ * Special value: \ref ROAD_InvalidObjId
|
|
|
+ * ↔ <em>Node0</em> is not
|
|
|
+ * connected to a <em>Junction</em>.
|
|
|
+ */
|
|
|
+ tObjId jObjId1; /**< Object id of the <em>Junction</em> to
|
|
|
+ * which the <em>Link's</em> end point
|
|
|
+ * <em>Node1</em> is connected\n
|
|
|
+ * Special value: \ref ROAD_InvalidObjId
|
|
|
+ * ↔ <em>Node1</em> is not
|
|
|
+ * connected to a <em>Junction</em>.
|
|
|
+ */
|
|
|
+ tObjId jArmObjId0; /**< Object id of the <em>Junction arm</em> to
|
|
|
+ * which the <em>Link's</em> starting point
|
|
|
+ * <em>Node0</em> is connected\n
|
|
|
+ * Special value: \ref ROAD_InvalidObjId
|
|
|
+ * ↔ <em>Node0</em> is not
|
|
|
+ * connected to a <em>Junction</em>.
|
|
|
+ */
|
|
|
+ tObjId jArmObjId1; /**< Object id of the <em>Junction arm</em> to
|
|
|
+ * which the <em>Link's</em> end point
|
|
|
+ * <em>Node1</em> is connected\n
|
|
|
+ * Special value: \ref ROAD_InvalidObjId
|
|
|
+ * ↔ <em>Node1</em> is not
|
|
|
+ * connected to a <em>Junction</em>.
|
|
|
+ */
|
|
|
+ tRoadSpeedType rst; /**< Road speed type of the <em>Link</em>
|
|
|
+ */
|
|
|
+ double len; /**< Length of the <em>Link</em> (distance
|
|
|
+ * between <em>Node0</em> and <em>Node1</em>)
|
|
|
+ * in meters
|
|
|
+ */
|
|
|
+} tRoadLinkInfo;
|
|
|
+
|
|
|
+/** Function to get the information about a given <em>Link</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] lObjId Object id of the <em>Link</em>
|
|
|
+ * \param[out] lInfo Pointer to a struct for the information about the
|
|
|
+ * <em>Link</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadObjIdGetInfo() to get the information about a
|
|
|
+ * <em>Link</em>.
|
|
|
+ */
|
|
|
+int RoadGetLinkInfo (tRoad *road, tObjId lObjId, tRoadLinkInfo *lInfo);
|
|
|
+
|
|
|
+//! Link evaluation: input
|
|
|
+/** Struct for the input parameters of RoadLinkGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadLinkIn {
|
|
|
+ tObjId lObjId; /**< Object id of the <em>Link</em>
|
|
|
+ */
|
|
|
+ int useST; /**< Flag indicating whether the global IPGRoad
|
|
|
+ * or the local coordinate system of the
|
|
|
+ * <em>Link</em> is used:
|
|
|
+ * - 0 ↔ use \ref tRoadLinkIn::xyz "xyz"
|
|
|
+ * - 1 ↔ use \ref tRoadLinkIn::st "st"
|
|
|
+ */
|
|
|
+ double st[2]; /**< Given position in the local coordinate
|
|
|
+ * system of the <em>Link</em>
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)\note
|
|
|
+ * An estimation of the z-coordinate is given
|
|
|
+ * in order to simplify the evaluation (if no
|
|
|
+ * reasonable estimation is known, initialize
|
|
|
+ * the z-coordinate with zero).
|
|
|
+ */
|
|
|
+} tRoadLinkIn;
|
|
|
+//! Link evaluation: output
|
|
|
+/** Struct for the output parameters of RoadLinkGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadLinkOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at \ref
|
|
|
+ * tRoadLinkOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at \ref
|
|
|
+ * tRoadLinkOut::xyz "xyz":\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at \ref
|
|
|
+ * tRoadLinkOut::xyz "xyz":\n
|
|
|
+ * Unit vector in t-direction of the
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+ double st[2]; /**< Calculated position in the local coordinate
|
|
|
+ * system of the <em>Link</em>
|
|
|
+ */
|
|
|
+ double curveXY; /**< Curvature of the curve in the (x,y)-plane
|
|
|
+ * at \ref tRoadLinkOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double width[2]; /**< Distance between the left/right road border
|
|
|
+ * and the <em>Link's</em> <em>Center line</em>
|
|
|
+ * at \ref tRoadLinkOut::st "s" in meters
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * \name
|
|
|
+ * The following output variables do not consider <em>Bumps</em>.
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/* --- The following outputs do not consider Bumps ---------------- */
|
|
|
+ double grade; /**< Longitudinal gradient at \ref
|
|
|
+ * tRoadLinkOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in s-direction
|
|
|
+ * of the <em>Link</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double slope; /**< Lateral gradient at \ref
|
|
|
+ * tRoadLinkOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in t-direction
|
|
|
+ * of the <em>Link</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double curveZ; /**< Longitudinal z-curvature at \ref
|
|
|
+ * tRoadLinkOut::xyz "xyz":\n
|
|
|
+ * Curvature of the curve in the (s,z)-plane
|
|
|
+ * (change of \ref tRoadLinkOut::grade "grade"
|
|
|
+ * in s-direction of the <em>Link</em>).
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+/** @} */
|
|
|
+} tRoadLinkOut;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Link</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadLinkGeoEval(tRoadEval *re, const char *errMsgPre,
|
|
|
+ const tRoadLinkIn *in, tRoadLinkOut *out);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* --- Lane sections -------------------------------------------------------- */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/******************************************************************************/
|
|
|
+/* Lanes */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup LanesEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Maximum number of <em>Lanes</em>:\n
|
|
|
+ * At most thirty <em>Lanes</em> can be defined on each side of the
|
|
|
+ * <em>Reference line</em>.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_LANES 30
|
|
|
+
|
|
|
+
|
|
|
+/** Lane types:\n
|
|
|
+ * Used to describe the attributes of different <em>Lanes</em>
|
|
|
+ */
|
|
|
+typedef enum tRoadLaneType {
|
|
|
+ RLT_Road = 0, /**< <b>0</b> Driving lane:\n
|
|
|
+ * Legally drivable lane
|
|
|
+ */
|
|
|
+ RLT_Border = 4, /**< <b>4</b> Road border:\n
|
|
|
+ * Drivable left or right extension of the road
|
|
|
+ */
|
|
|
+ RLT_Margin = 5, /**< <b>5</b> Road side:\n
|
|
|
+ * Defines a zone left or right of the road
|
|
|
+ * which actually does not belong to the road,
|
|
|
+ * but still delivers reasonable
|
|
|
+ * (x,y)-coordinates values for requests
|
|
|
+ * e.g. for <em>Road side Bumps</em>
|
|
|
+ * \note Only the outermost <em>Lane</em> can be
|
|
|
+ * of this type!
|
|
|
+ */
|
|
|
+ RLT_RoadSide = 5, /**< <b>5</b> Road side: see
|
|
|
+ * \ref tRoadLaneType::RLT_Margin "RLT_Margin"
|
|
|
+ */
|
|
|
+ RLT_Bicycle = 10, /**< <b>10</b> Bicycle lane
|
|
|
+ */
|
|
|
+ RLT_Pedestrian = 11, /**< <b>11</b> Pedestrian path
|
|
|
+ */
|
|
|
+ RLT_TrafficIsland = 12, /**< <b>12</b> Traffic island
|
|
|
+ */
|
|
|
+ RLT_ParkingArea = 13, /**< <b>13</b> Parking area
|
|
|
+ */
|
|
|
+ RLT_Bus = 14, /**< <b>14</b> Bus lane
|
|
|
+ */
|
|
|
+ RLT_HOV = 15, /**< <b>15</b> High-occupancy vehicle
|
|
|
+ * lane
|
|
|
+ */
|
|
|
+ RLT_Emergency = 16, /**< <b>16</b> Emergency lane
|
|
|
+ */
|
|
|
+ RLT_Vegetation = 20, /**< <b>20</b> Vegetation lane
|
|
|
+ */
|
|
|
+ RLT_Undefined = 99 /**< <b>99</b> Undefined lane type
|
|
|
+ */
|
|
|
+} tRoadLaneType;
|
|
|
+
|
|
|
+//! Lane evaluation: input
|
|
|
+/** Struct for the input parameters of RoadLaneEval() and RoadLaneEvalExt()
|
|
|
+ */
|
|
|
+typedef struct tRoadLaneIn {
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)\note
|
|
|
+ * An estimation of the z-coordinate is given
|
|
|
+ * in order to simplify the evaluation(if no
|
|
|
+ * reasonable estimation is known, initialize
|
|
|
+ * the z-coordinate with zero).
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at \ref
|
|
|
+ * tRoadLaneIn::xyz "xyz":\n
|
|
|
+ * Unit vector in viewing direction
|
|
|
+ * \note This vector is used to determine
|
|
|
+ * whether the results should be calculated in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+} tRoadLaneIn;
|
|
|
+//! Lane evaluation: output
|
|
|
+/** Struct for the output parameters of RoadLaneEval()\n
|
|
|
+ * \note The difference between this struct and tRoadLaneOutExt is that the
|
|
|
+ * <em>Lanes</em> in the tRoadLaneInfo structs are identified by their
|
|
|
+ * internal identifiers.
|
|
|
+ */
|
|
|
+typedef struct tRoadLaneOut {
|
|
|
+ int nLanesL; /**< Number of left <em>Lanes</em>\note
|
|
|
+ * The term "left" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ int nLanesR; /**< Number of right <em>Lanes</em>\note
|
|
|
+ * The term "right" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ int laneIdx; /**< Index of the <em>Lane</em> \ref
|
|
|
+ * tRoadLaneIn::xyz "xyz" is located on
|
|
|
+ * in struct \ref tRoadLaneOut::left "left"
|
|
|
+ * or \ref tRoadLaneOut::right "right" (consider
|
|
|
+ * \ref tRoadLaneOut::isRight "isRight")
|
|
|
+ */
|
|
|
+ int isRight; /**< Flag indicating the side of the current
|
|
|
+ * <em>Lane</em>:
|
|
|
+ * - 0 ↔ left
|
|
|
+ * - 1 ↔ right
|
|
|
+ *
|
|
|
+ * \note The terms "left" and "right" refer to
|
|
|
+ * the direction specified by the \ref
|
|
|
+ * tRoadLaneIn::suv "viewing direction", which
|
|
|
+ * can be either in or counter link direction.
|
|
|
+ */
|
|
|
+ tObjId lObjId; /**< Object id of the current <em>Link</em>
|
|
|
+ */
|
|
|
+ tObjId lsObjId; /**< Object id of the current <em>Lane
|
|
|
+ * section</em>
|
|
|
+ */
|
|
|
+ tObjId laneObjId; /**< Object id of the current <em>Lane</em>
|
|
|
+ */
|
|
|
+ double lsLenAhead; /**< Length of the <em>Lane</em> ahead:
|
|
|
+ * \n Distance between the current position
|
|
|
+ * \ref tRoadLaneIn::xyz "xyz" and the end of
|
|
|
+ * the <em>Lane</em>\note
|
|
|
+ * The term "end" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ double lsLenBehind; /**< Length of the <em>Lane</em> behind:
|
|
|
+ * \n Distance between the start of the
|
|
|
+ * <em>Lane</em> and the current position
|
|
|
+ * \ref tRoadLaneIn::xyz "xyz" \note
|
|
|
+ * The term "start" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ double distToLeftBorder; /**< Distance between the left border of
|
|
|
+ * the road and the current position \ref
|
|
|
+ * tRoadLaneIn::xyz "xyz" \note
|
|
|
+ * The term "left" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ double distToRightBorder; /**< Distance between the right border of
|
|
|
+ * the road and the current position \ref
|
|
|
+ * tRoadLaneIn::xyz "xyz" \note
|
|
|
+ * The term "right" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ struct tRoadLaneInfo {
|
|
|
+ double width; /**< Width of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ double tMidLane; /**< Lateral offset of the middle of the
|
|
|
+ * <em>Lane</em> from the <em>Link's</em>
|
|
|
+ * <em>Reference line</em>\note
|
|
|
+ * The sign of the variable refers to the
|
|
|
+ * direction specified by the \ref
|
|
|
+ * tRoadLaneIn::suv "viewing direction", which
|
|
|
+ * can be either in or counter link direction.
|
|
|
+ */
|
|
|
+ tRoadLaneType type; /**< Type of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ int laneId; /**< Internal identifier of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ } left[ROAD_MAX_LANES], /**< Array of structs containing the information
|
|
|
+ * about all left <em>Lanes</em> of the current
|
|
|
+ * <em>Lane section</em>\note
|
|
|
+ * The term "left" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+ right[ROAD_MAX_LANES]; /**< Array of structs containing the information
|
|
|
+ * about all right <em>Lanes</em> of the current
|
|
|
+ * <em>Lane section</em>\note
|
|
|
+ * The term "right" refers to the direction
|
|
|
+ * specified by the \ref tRoadLaneIn::suv
|
|
|
+ * "viewing direction", which can be either in
|
|
|
+ * or counter link direction.
|
|
|
+ */
|
|
|
+} tRoadLaneOut;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Lane</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLaneEvalExt()
|
|
|
+ */
|
|
|
+int RoadLaneEval(tRoadEval *re, const char *errMsgPre,
|
|
|
+ const tRoadLaneIn *in, tRoadLaneOut *out);
|
|
|
+
|
|
|
+//! Lane evaluation: output (extended version)
|
|
|
+/** Struct used as member in the structs tRoadPathOut and tRoadRouteOutExt and
|
|
|
+ * for the output parameters of RoadLaneEvalExt()\n
|
|
|
+ * \note The difference between this struct and tRoadLaneOut is that the
|
|
|
+ * <em>Lanes</em> in the tRoadLaneInfoExt structs are identified by their
|
|
|
+ * object ids.
|
|
|
+ */
|
|
|
+typedef struct tRoadLaneOutExt {
|
|
|
+ int nLanesL; /**< Number of left <em>Lanes</em>\note
|
|
|
+ * The term "left" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ int nLanesR; /**< Number of right <em>Lanes</em>\note
|
|
|
+ * The term "right" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ int laneIdx; /**< Index of the current <em>Lane</em> in
|
|
|
+ * struct \ref tRoadLaneOut::left "left" or
|
|
|
+ * \ref tRoadLaneOut::right "right" (consider
|
|
|
+ * \ref tRoadLaneOut::isRight "isRight")
|
|
|
+ */
|
|
|
+ int isRight; /**< Flag indicating the side of the current
|
|
|
+ * <em>Lane</em>:
|
|
|
+ * - 0 ↔ left
|
|
|
+ * - 1 ↔ right
|
|
|
+ *
|
|
|
+ * \note The terms "left" and "right" refer to
|
|
|
+ * the direction specified by the viewing
|
|
|
+ * direction, which can be either in or counter
|
|
|
+ * link direction.
|
|
|
+ */
|
|
|
+ tObjId lObjId; /**< Object id of the current <em>Link</em>
|
|
|
+ */
|
|
|
+ tObjId lsObjId; /**< Object id of the current <em>Lane
|
|
|
+ * section</em>
|
|
|
+ */
|
|
|
+ tObjId laneObjId; /**< Object id of the current <em>Lane</em>
|
|
|
+ */
|
|
|
+ double lsLenAhead; /**< Length of the <em>Lane</em> ahead:
|
|
|
+ * \n Distance between the current position
|
|
|
+ * and the end of the <em>Lane</em>\note
|
|
|
+ * The term "end" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ double lsLenBehind; /**< Length of the <em>Lane</em> behind:
|
|
|
+ * \n Distance between the start of the
|
|
|
+ * <em>Lane</em> and the current position \note
|
|
|
+ * The term "start" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ double distToLeftBorder; /**< Distance between the left border of the
|
|
|
+ * road and the current position \note
|
|
|
+ * The term "left" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ double distToRightBorder; /**< Distance between the right border of the
|
|
|
+ * road and the current position \note
|
|
|
+ * The term "right" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ struct tRoadLaneInfoExt {
|
|
|
+ double width; /**< Width of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ double tMidLane; /**< Lateral offset of the middle of the
|
|
|
+ * <em>Lane</em> from the <em>Link's</em>
|
|
|
+ * <em>Reference line</em>\note
|
|
|
+ * The sign of the variable refers to the
|
|
|
+ * direction specified by the viewing direction,
|
|
|
+ * which can be either in or counter link
|
|
|
+ * direction.
|
|
|
+ */
|
|
|
+ tRoadLaneType type; /**< Type of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ int laneObjId;/**< Object id of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ } left[ROAD_MAX_LANES], /**< Array of structs containing the information
|
|
|
+ * about all left <em>Lanes</em> of the current
|
|
|
+ * <em>Lane section</em>\note
|
|
|
+ * The term "left" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+ right[ROAD_MAX_LANES]; /**< Array of structs containing the information
|
|
|
+ * about all right <em>Lanes</em> of the current
|
|
|
+ * <em>Lane section</em>\note
|
|
|
+ * The term "right" refers to the direction
|
|
|
+ * specified by the viewing direction, which can
|
|
|
+ * be either in or counter link direction.
|
|
|
+ */
|
|
|
+} tRoadLaneOutExt;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Lane</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLaneEval()
|
|
|
+ */
|
|
|
+int RoadLaneEvalExt(tRoadEval *re, const char *errMsgPre,
|
|
|
+ const tRoadLaneIn *in, tRoadLaneOutExt *out);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Reference Lines ++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+/** \addtogroup RefLinesEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+//! Reference line evaluation: input
|
|
|
+/** Struct for the input parameters of RoadRefLineGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadRefLineIn {
|
|
|
+ tObjId rlObjId; /**< Object id of the <em>Reference line</em>
|
|
|
+ */
|
|
|
+ int useST; /**< Flag indicating whether the global IPGRoad
|
|
|
+ * or the <em>Reference line's</em> local
|
|
|
+ * coordinate system is used:
|
|
|
+ * - 0 ↔ use \ref tRoadRefLineIn::xyz "xyz"
|
|
|
+ * - 1 ↔ use \ref tRoadRefLineIn::st "st"
|
|
|
+ */
|
|
|
+ double st[2]; /**< Given position in the <em>Reference
|
|
|
+ * line's</em> local coordinate system
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)\note
|
|
|
+ * An estimation of the z-coordinate is given
|
|
|
+ * in order to simplify the evaluation (if no
|
|
|
+ * reasonable estimation is known, initialize
|
|
|
+ * the z-coordinate with zero).
|
|
|
+ */
|
|
|
+} tRoadRefLineIn;
|
|
|
+//! Reference line evaluation: output
|
|
|
+/** Struct for the output parameters of RoadRefLineGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadRefLineOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadRefLineOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at
|
|
|
+ * \ref tRoadRefLineOut::xyz "xyz":\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Reference Line</em>
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at
|
|
|
+ * \ref tRoadRefLineOut::xyz "xyz":\n
|
|
|
+ * Unit vector in t-direction of the
|
|
|
+ * <em>Reference Line</em>
|
|
|
+ */
|
|
|
+ double st[2]; /**< Calculated position in the <em>Reference
|
|
|
+ * line's</em> local coordinate system
|
|
|
+ */
|
|
|
+ double curveXY; /**< Curvature of the curve in the (x,y)-plane
|
|
|
+ * at \ref tRoadRefLineOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double width[2]; /**< Distance between the left/right road border
|
|
|
+ * and the <em>Center line</em> at
|
|
|
+ * \ref tRoadRefLineOut::st "s" in meters \note
|
|
|
+ * Only valid if \ref tRoadRefLineOut::xyz
|
|
|
+ * "xyz" is not on a Junction.
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * \name
|
|
|
+ * The following output variables do not consider <em>Bumps</em>.
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/* --- The following outputs do not consider Bumps ---------------- */
|
|
|
+ double grade; /**< Longitudinal gradient at
|
|
|
+ * \ref tRoadRefLineOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in s-direction
|
|
|
+ * of the <em>Reference line</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double slope; /**< Lateral gradient at
|
|
|
+ * \ref tRoadRefLineOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in t-direction
|
|
|
+ * of the <em>Reference line</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double curveZ; /**< Longitudinal z-curvature:\n
|
|
|
+ * Curvature of the curve in the (s,z)-plane at
|
|
|
+ * \ref tRoadRefLineOut::xyz "xyz" (change of
|
|
|
+ * \ref tRoadRefLineOut::grade "grade" in
|
|
|
+ * s-direction of the <em>Reference line</em>).
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+/** @} */
|
|
|
+
|
|
|
+} tRoadRefLineOut;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Reference line</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadRefLineGeoEval(tRoadEval *re, const char *errMsgPre,
|
|
|
+ const tRoadRefLineIn *in, tRoadRefLineOut *out);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* --- Additional objects --------------------------------------------------- */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/******************************************************************************/
|
|
|
+/* Bumps */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+/** \addtogroup BumpsEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+//! Bump evaluation: input
|
|
|
+/** Struct for the input parameters of RoadBumpEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadBumpIn {
|
|
|
+ double u; /**< Given position in the <em>Bump's</em> local
|
|
|
+ * coordinate system: u-coordinate (u = 0..1)
|
|
|
+ */
|
|
|
+ double v; /**< Given position in the <em>Bump's</em> local
|
|
|
+ * coordinate system: v-coordinate (v = 0..1)
|
|
|
+ */
|
|
|
+ tObjId bObjId; /**< Object Id of the <em>Bump</em>
|
|
|
+ */
|
|
|
+ int bumpOnly; /**< Flag indicating what should be taken into account
|
|
|
+ * for the calculation of the z-coordinate:
|
|
|
+ * - 0 ↔ The z-coordinate is calculated considering
|
|
|
+ * the road's <em>Height profile</em>.
|
|
|
+ * - 1 ↔ The z-coordinate of only the <em>Bump</em>
|
|
|
+ * is calculated.
|
|
|
+ */
|
|
|
+} tRoadBumpIn;
|
|
|
+//! Bump evaluation: output
|
|
|
+/** Struct for the output parameters of RoadBumpEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadBumpOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadBumpOut::xyz "xyz"
|
|
|
+ */
|
|
|
+} tRoadBumpOut;
|
|
|
+
|
|
|
+/**
|
|
|
+ */
|
|
|
+/** Function to evaluate a <em>Bump</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadBumpEval(tRoadEval *re, tRoadBumpIn *in, tRoadBumpOut *out);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* Markers */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup MarkersEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Maximum number of marker types:\n
|
|
|
+ * There can be defined at most thirty-two different types of <em>Markers</em>
|
|
|
+ * including those not defined by the user.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_MARKER_TYPES 32
|
|
|
+/** Maximum number of marker parameters:\n
|
|
|
+ * At most thirty-two different parameters can be defined for a
|
|
|
+ * <em>Marker</em>.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_MARKER_PARAMS 32
|
|
|
+
|
|
|
+
|
|
|
+/** Types of <em>Markers</em>
|
|
|
+ */
|
|
|
+typedef enum tRoadMarkerType {
|
|
|
+ RMT_DrvSpeed = 0, /**< <b>0</b> Driver speed
|
|
|
+ */
|
|
|
+ RMT_DrvStop = 1, /**< <b>1</b> Driver stop
|
|
|
+ */
|
|
|
+ RMT_DrvPylon = 2, /**< <b>2</b> Pylon alley
|
|
|
+ */
|
|
|
+ RMT_EnvWind = 3, /**< <b>3</b> Wind
|
|
|
+ */
|
|
|
+ RMT_DrivManTrigger = 4, /**< <b>4</b> Trigger point
|
|
|
+ */
|
|
|
+ RMT_DrivManCmd = 5, /**< <b>5</b> DrivMan command
|
|
|
+ */
|
|
|
+ RMT_DrivManJump = 6, /**< <b>6</b> DrivMan jump
|
|
|
+ */
|
|
|
+ RMT_Unknown = 7 /**< <b>7</b> User-defined
|
|
|
+ */
|
|
|
+} tRoadMarkerType;
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/** \addtogroup MarkersEdit
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to add a new class of <em>Markers</em> to an instance of the road\n
|
|
|
+ * → \subpage MarkerTypeNamesIds
|
|
|
+ * "List of all initially defined marker types"
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] name Name of the new class of <em>Markers</em>
|
|
|
+ * \param[in] parFormat Data types of the associated parameters of the new class
|
|
|
+ * of <em>Markers</em>: \n s(S) ↔ string (with spaces),
|
|
|
+ * d ↔ double, f ↔ float, i ↔ integer
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the new class of <em>Markers</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMarkerType() \see RoadGetMarkerName() \see RoadAddMarker()
|
|
|
+ */
|
|
|
+int RoadAddMarkerType(tRoad *road, const char *name,
|
|
|
+ const char *parFormat);
|
|
|
+/** Function retrieving the identifier of a class of <em>Markers
|
|
|
+ * </em> from its name\n →
|
|
|
+ * \subpage MarkerTypeNamesIds "List of all initially defined marker types"
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] name Name of the class of <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the class of <em>Markers</em>
|
|
|
+ * <tr><td> In case failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadAddMarkerType() \see RoadGetMarkerName()
|
|
|
+ */
|
|
|
+int RoadGetMarkerType(tRoad *road, const char *name);
|
|
|
+/** @} */
|
|
|
+/** \addtogroup MarkersEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function retrieving the name of a class of <em>Markers</em> from its
|
|
|
+ * identifier
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] type Identifier of the class of <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> name of the class of <em>Markers</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMarkerType() \see RoadGetMarkerTypeInfoByName()
|
|
|
+ */
|
|
|
+const char *RoadGetMarkerName(tRoad *road, int type);
|
|
|
+
|
|
|
+//! Marker type information
|
|
|
+/** Struct for the information about a class of <em>Markers</em>
|
|
|
+ * \see RoadGetMarkerTypeInfoByName() \see RoadGetMarkerTypeInfoByType()
|
|
|
+ */
|
|
|
+typedef struct tRMT_Info {
|
|
|
+ int type; /**< \subpage MarkerTypeNamesIds "Identifier" of
|
|
|
+ * the class of <em>Markers</em>
|
|
|
+ */
|
|
|
+ int parBlockLen; /**< Length of the entire parameter block of an
|
|
|
+ * instance of the class of <em>Markers</em>:\n
|
|
|
+ * depending on datatype and number of the
|
|
|
+ * different parameters
|
|
|
+ */
|
|
|
+ int nPar; /**< Number of parameters of an instance of the
|
|
|
+ * class of <em>Markers</em>
|
|
|
+ */
|
|
|
+ char *name; /**< \subpage MarkerTypeNamesIds "Name" of the
|
|
|
+ * class of <em>Markers</em>
|
|
|
+ */
|
|
|
+ char *parFormat; /**< Data types of the associated parameters of
|
|
|
+ * an instance of the class of <em>Markers</em>:
|
|
|
+ * \n s(S) ↔ string (with spaces), d ↔
|
|
|
+ * double, f ↔ float, i ↔ integer
|
|
|
+ */
|
|
|
+ struct {
|
|
|
+ char datatype; /**< Datatype of the parameter:\n
|
|
|
+ * s(S) ↔ string (with spaces), d ↔
|
|
|
+ * double, f ↔ float, i ↔ integer
|
|
|
+ */
|
|
|
+ short offset; /**< Offset of the start of the parameter in the
|
|
|
+ * parameter block
|
|
|
+ */
|
|
|
+ } par[ROAD_MAX_MARKER_PARAMS];/**< Array for the information about datatype
|
|
|
+ * and position of each parameter of an
|
|
|
+ * instance of the class of <em>Markers</em>
|
|
|
+ */
|
|
|
+} tRMT_Info;
|
|
|
+
|
|
|
+/** Function retrieving the information about a class of <em>Markers</em> from
|
|
|
+ * its name
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] name Name of the class of <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct with the information about the class of
|
|
|
+ * <em>Markers</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMarkerName() \see RoadGetMarkerTypeInfoByType()
|
|
|
+ */
|
|
|
+tRMT_Info *RoadGetMarkerTypeInfoByName (tRoad *road, const char *name);
|
|
|
+/** Function retrieving the information about a class of <em>Markers</em> from
|
|
|
+ * its identifier
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] type Identifier of the class of <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct with the information about the class of
|
|
|
+ * <em>Markers</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetMarkerType() \see RoadGetMarkerTypeInfoByName()
|
|
|
+ */
|
|
|
+tRMT_Info *RoadGetMarkerTypeInfoByType (tRoad *road, int type);
|
|
|
+
|
|
|
+
|
|
|
+/*** Output options for a marker evaluation handle ***/
|
|
|
+
|
|
|
+/** Output option for a marker evaluation handle: \n
|
|
|
+ * The offset of the <em>Marker</em> (\ref tRoadMarkerOut::s "s") is given
|
|
|
+ * relative to the <em>Link</em>
|
|
|
+ * considering the direction validity of the <em>Marker</em>.
|
|
|
+ * \see RoadLinkGetMarkerEvalExt()\see RoadLinkObjFindMarker()
|
|
|
+ * \see RoadLinkNextMarker()
|
|
|
+ */
|
|
|
+#define ROAD_LME_REL_TO_LINK_1 1
|
|
|
+/** Output option for a marker evaluation handle: \n
|
|
|
+ * The offset of the <em>Marker</em> (\ref tRoadMarkerOut::s "s") is given
|
|
|
+ * relative to the <em>Link's</em> starting point <em>Node0</em>.
|
|
|
+ * \see RoadLinkGetMarkerEvalExt()\see RoadLinkObjFindMarker()
|
|
|
+ * \see RoadLinkNextMarker()
|
|
|
+ */
|
|
|
+#define ROAD_LME_REL_TO_LINK_2 2
|
|
|
+/** Output option for a marker evaluation handle: \n
|
|
|
+ * The offset of the <em>Marker</em> (\ref tRoadMarkerOut::s "s")
|
|
|
+ * is given relative to the start offset s0 of the
|
|
|
+ * search area of the <em>Link</em> considering the direction validity of the
|
|
|
+ * <em>Marker</em>.
|
|
|
+ * \see RoadLinkGetMarkerEvalExt()\see RoadLinkObjFindMarker()
|
|
|
+ * \see RoadLinkNextMarker()
|
|
|
+ */
|
|
|
+#define ROAD_LME_REL_TO_SO 3
|
|
|
+
|
|
|
+//! Marker of type Driver speed: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>Driver speed</em>
|
|
|
+ * used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_DrvSpeed {
|
|
|
+ double limit; /**< Speed limit in m/s
|
|
|
+ */
|
|
|
+ char *unit; /**< Unit of the speed selected by the user: kmh or mph
|
|
|
+ */
|
|
|
+} tRM_DrvSpeed;
|
|
|
+
|
|
|
+/** Types of <em>Stop markers</em>:\n
|
|
|
+ * Used to control the behaviour of a <em>Stop marker</em>.
|
|
|
+ */
|
|
|
+typedef enum tRoadDrvStopType {
|
|
|
+ RDST_Stop=0, /**< <b>0</b> Used to simulate the
|
|
|
+ * behaviour at a stop sign
|
|
|
+ */
|
|
|
+ RDST_GiveWay, /**< <b>1</b> \warning Not yet supported!
|
|
|
+ */
|
|
|
+ RDST_TrfLight, /**< <b>2</b> Used to observe
|
|
|
+ * a <em>Traffic light contoller</em>
|
|
|
+ */
|
|
|
+ RDST_Junction, /**< <b>3</b> \warning Not yet supported!
|
|
|
+ */
|
|
|
+ RDST_Unknown /**< <b>4</b> Unknown stop marker type
|
|
|
+ */
|
|
|
+} tRoadDrvStopType;
|
|
|
+//! Marker of type Driver stop: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>Driver stop</em>
|
|
|
+ * used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_DrvStop {
|
|
|
+ double duration; /**< Duration of the stop in seconds
|
|
|
+ */
|
|
|
+ tRoadDrvStopType type; /**< Type of the <em>Stop marker</em>
|
|
|
+ */
|
|
|
+ tObjId refObjId; /**< Object id of the reference object of the
|
|
|
+ * <em>Marker</em>
|
|
|
+ * \note This parameter is only considered for
|
|
|
+ * <em>Stop markers</em> of type #RDST_TrfLight or
|
|
|
+ * #RDST_Junction.
|
|
|
+ */
|
|
|
+} tRM_DrvStop;
|
|
|
+//! Marker of type Pylon alley: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>Pylon alley</em>
|
|
|
+ * used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_Pylon {
|
|
|
+ double width; /**< Width between the two pylons in meters
|
|
|
+ */
|
|
|
+} tRM_Pylon;
|
|
|
+//! Marker of type Wind: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>Wind</em> used
|
|
|
+ * as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_Wind {
|
|
|
+ double speed; /**< Speed of the wind in m/s
|
|
|
+ */
|
|
|
+ double angle; /**< Direction of the wind in degrees
|
|
|
+ */
|
|
|
+ char *unit; /**< Unit of the wind speed selected by the user:
|
|
|
+ * kmh or ms
|
|
|
+ */
|
|
|
+} tRM_Wind;
|
|
|
+//! Marker of type Trigger point: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>Trigger
|
|
|
+ * point</em> used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_Trigger {
|
|
|
+ int mode; /**< Mode of the <em>Trigger point</em>:
|
|
|
+ * - 1 ↔ define a new reference point
|
|
|
+ * - 2 ↔ take all measurements
|
|
|
+ * - 3 ↔ take all measurements and define a new
|
|
|
+ * reference point
|
|
|
+ */
|
|
|
+ int id; /**< Positive integer value for the identification of
|
|
|
+ * the <em>Marker</em>: Should be numbered
|
|
|
+ * consecutively.
|
|
|
+ */
|
|
|
+} tRM_Trigger;
|
|
|
+//! Marker of type DrivMan command: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>DrivMan
|
|
|
+ * command</em> used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_DrivManCmd {
|
|
|
+ char *expr; /**< Minimaneuver command of the <em>Marker</em>
|
|
|
+ */
|
|
|
+} tRM_DrivManCmd;
|
|
|
+//! Marker of type DrivMan jump: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>DrivMan jump</em>
|
|
|
+ * used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_DrivManJump {
|
|
|
+ char *level; /**< Target label of the <em>Marker</em>
|
|
|
+ */
|
|
|
+} tRM_DrivManJump;
|
|
|
+//! User-defined Marker: output
|
|
|
+/** Struct for the parameters of a <em>Marker</em> of type <em>User-defined</em>
|
|
|
+ * used as member of tRoadMarkerOut
|
|
|
+ */
|
|
|
+typedef struct tRM_User {
|
|
|
+ void *v; /**< List of parameters assigned to the <em>Marker</em>
|
|
|
+ */
|
|
|
+} tRM_User;
|
|
|
+//! Marker evaluation: output
|
|
|
+/** Struct for the output parameters of the functions evaluating the
|
|
|
+ * <em>Markers</em> of a road instance:
|
|
|
+ * - RoadLinkObjFindMarker(),
|
|
|
+ * - RoadLinkNextMarker(),
|
|
|
+ * - RoadRouteFindMarker(),
|
|
|
+ * - RoadRouteNextMarker(),
|
|
|
+ * - RoadLinkGetAllMarkerByObjId()\n   and
|
|
|
+ * - RoadGetAllMarkerByObjId().
|
|
|
+ */
|
|
|
+typedef struct tRoadMarkerOut {
|
|
|
+ double s; /**< Offset of the detected <em>Marker</em>
|
|
|
+ * in s-direction in meters\note
|
|
|
+ * In case the marker evaluation is executed
|
|
|
+ * with respect to a <em>Link</em>, the output
|
|
|
+ * option of the marker evaluation handle
|
|
|
+ * (#ROAD_LME_REL_TO_LINK_1,
|
|
|
+ * #ROAD_LME_REL_TO_LINK_2 or
|
|
|
+ * #ROAD_LME_REL_TO_SO) is considered.
|
|
|
+ */
|
|
|
+ double t; /**< Lateral offset of the detected <em>Marker
|
|
|
+ * </em> in meters
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the detected <em>Marker</em> in
|
|
|
+ * the global IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ int latRef; /**< Integer value for the \ref tRoadLatRef
|
|
|
+ * "lateral reference" of \ref tRoadMarkerOut::t
|
|
|
+ * "t"
|
|
|
+ */
|
|
|
+ int type; /**< \subpage MarkerTypeNamesIds
|
|
|
+ * "Identifier of the class" of the detected
|
|
|
+ * <em>Marker</em>
|
|
|
+ */
|
|
|
+ int objId; /**< Object id of the detected <em>Marker</em>
|
|
|
+ */
|
|
|
+ int valid; /**< Flag indication whether the detected
|
|
|
+ * <em>User-defined Marker</em> signals the
|
|
|
+ * start or the end of a validity zone:
|
|
|
+ * - 0 ↔ End of the validity zone.
|
|
|
+ * - 1 ↔ Start of the validity zone.
|
|
|
+ */
|
|
|
+ int dirValidity; /**< \ref tRoadDirValidity "Direction validity"
|
|
|
+ * of the detected <em>Marker</em>
|
|
|
+ */
|
|
|
+ union {
|
|
|
+ void *par; /**< Special parameters of a <em>Marker</em> of
|
|
|
+ * arbitrary type
|
|
|
+ */
|
|
|
+ tRM_DrvSpeed *speed; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>Driver speed</em>
|
|
|
+ */
|
|
|
+ tRM_DrvStop *stop; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>Driver stop</em>
|
|
|
+ */
|
|
|
+ tRM_Pylon *pylon; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>Pylon alley</em>
|
|
|
+ */
|
|
|
+ tRM_Wind *wind; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>Wind</em>
|
|
|
+ */
|
|
|
+ tRM_Trigger *trigger;/**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>Trigger point</em>
|
|
|
+ */
|
|
|
+ tRM_DrivManCmd *cmd; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>DrivMan command</em>
|
|
|
+ */
|
|
|
+ tRM_DrivManJump *jmp; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>DrivMan jump</em>
|
|
|
+ */
|
|
|
+ tRM_User user; /**< Special parameters of a <em>Marker</em>
|
|
|
+ * of type <em>User-defined</em>
|
|
|
+ */
|
|
|
+ }; /**< Struct for the special parameters of the
|
|
|
+ * <em>Marker</em> depending on its type
|
|
|
+ */
|
|
|
+} tRoadMarkerOut;
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate and initialize a marker evaluation handle\n
|
|
|
+ * The output option of the handle is set to #ROAD_LME_REL_TO_LINK_1.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * evaluated by the new marker evaluation handle:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> new marker evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkGetMarkerEvalExt() \see RoadLinkDeleteMarkerEval()
|
|
|
+ * \see RoadRouteObjGetMarkerEval()
|
|
|
+ */
|
|
|
+tRoadMarkerEval *RoadLinkGetMarkerEval (tRoad *road, int mask);
|
|
|
+/** Function to generate and initialize a marker evaluation handle\n
|
|
|
+ * <b><em>Extended version:</em></b> The output option of the handle can be
|
|
|
+ * set.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * evaluated by the new marker evaluation handle: \n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \param[in] options Output option for the new marker evaluation handle:\n
|
|
|
+ * #ROAD_LME_REL_TO_LINK_1, #ROAD_LME_REL_TO_LINK_2 or #ROAD_LME_REL_TO_SO
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> new marker evaluation handle\n
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkGetMarkerEval() \see RoadLinkDeleteMarkerEval()
|
|
|
+ * \see RoadRouteObjGetMarkerEval()
|
|
|
+ */
|
|
|
+tRoadMarkerEval *RoadLinkGetMarkerEvalExt(tRoad *road, int mask, int options);
|
|
|
+/** Function to free the memory of a marker evaluation handle
|
|
|
+ * \param[in] rme Marker evaluation handle that should be deleted
|
|
|
+ * \see RoadLinkGetMarkerEval() \see RoadLinkGetMarkerEvalExt()
|
|
|
+ * \see RoadRouteDeleteMarkerEval()
|
|
|
+ */
|
|
|
+void RoadLinkDeleteMarkerEval(tRoadMarkerEval *rme);
|
|
|
+
|
|
|
+/** Function to get a <em>Marker</em> from a given section of a <em>Link</em>
|
|
|
+ * (if there is one)\n
|
|
|
+ * The <em>Link</em> is identified by its internal identifier.
|
|
|
+ *
|
|
|
+ * This function searches for <em>Markers</em> defined on the section of the
|
|
|
+ * <em>Link</em> given by the parameters <b>s0</b> and <b>s1</b>:
|
|
|
+ * - <b>s0</b> < <b>s1</b>: Only <em>Markers</em> valid in link direction are
|
|
|
+ * taken into account. The <em>Marker</em> that is nearest to <b>s0</b> is
|
|
|
+ * retrieved.
|
|
|
+ * - <b>s0</b> > <b>s1</b>: Only <em>Markers</em> valid counter link direction
|
|
|
+ * are taken into account. The <em>Marker</em> that is nearest to <b>s1</b> is
|
|
|
+ * retrieved.
|
|
|
+ *
|
|
|
+ * \param[in,out] rme Marker evaluation handle
|
|
|
+ * \param[in] linkId Identifier of the <em>Link</em>
|
|
|
+ * \param[in] s0 Start offset of the search area on the <em>Link</em>
|
|
|
+ * \param[in] s1 End offset of the search area on the <em>Link</em>
|
|
|
+ * \param[out] out Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Marker</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> found: 0 or 1
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadLinkObjFindMarker() to get a <em>Marker</em> from a given
|
|
|
+ * section of a <em>Link</em>.
|
|
|
+ */
|
|
|
+int RoadLinkFindMarker (tRoadMarkerEval *rme, int linkId,
|
|
|
+ double s0, double s1, tRoadMarkerOut *out);
|
|
|
+/** Function to get a <em>Marker</em> from a given section of a <em>Link</em>
|
|
|
+ * (if there is one)
|
|
|
+ *
|
|
|
+ * This function searches for <em>Markers</em> defined on the section of the
|
|
|
+ * <em>Link</em> given by the parameters <b>s0</b> and <b>s1</b>:
|
|
|
+ * - <b>s0</b> < <b>s1</b>: Only <em>Markers</em> valid in link direction are
|
|
|
+ * taken into account. The <em>Marker</em> that is nearest to <b>s0</b> is
|
|
|
+ * retrieved.
|
|
|
+ * - <b>s0</b> > <b>s1</b>: Only <em>Markers</em> valid counter link direction
|
|
|
+ * are taken into account. The <em>Marker</em> that is nearest to <b>s1</b> is
|
|
|
+ * retrieved.
|
|
|
+ *
|
|
|
+ * \param[in,out] rme Marker evaluation handle
|
|
|
+ * \param[in] lObjId Object id of the <em>Link</em>
|
|
|
+ * \param[in] s0 Start offset of the search area on the <em>Link</em>
|
|
|
+ * \param[in] s1 End offset of the search area on the <em>Link</em>
|
|
|
+ * \param[out] out Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Marker</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> found: 0 or 1
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteFindMarker()
|
|
|
+ */
|
|
|
+int RoadLinkObjFindMarker(tRoadMarkerEval *rme, tObjId lObjId,
|
|
|
+ double s0, double s1, tRoadMarkerOut *out);
|
|
|
+/** Function to get the <em>Marker</em> succeeding a given one on a
|
|
|
+ * <em>Link</em> (if there is one)\n
|
|
|
+ * The information about the position of the given <em>Marker</em> and the
|
|
|
+ * chosen search direction stored in the marker evaluation handle are used.
|
|
|
+ * \param[in,out] rme Marker evaluation handle
|
|
|
+ * \param[out] out Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Marker</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> found: 0 or 1
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkObjFindMarker() \see RoadLinkGetAllMarkerByObjId()
|
|
|
+ * \see RoadRouteNextMarker()
|
|
|
+ */
|
|
|
+int RoadLinkNextMarker (tRoadMarkerEval *rme, tRoadMarkerOut *out);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate and initialize a marker evaluation handle\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier. It is assigned
|
|
|
+ * to the appropriate member of the marker evaluation struct.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * evaluated by the new marker evaluation handle:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> new marker evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetMarkerEval() to generate and initialize a
|
|
|
+ * marker evaluation handle.
|
|
|
+ */
|
|
|
+tRoadMarkerEval *RoadRouteGetMarkerEval (tRoad *road, int routeId, int mask);
|
|
|
+/** Function to generate and initialize a marker evaluation handle\n
|
|
|
+ * The <em>Route</em> is assigned to the appropriate member of the marker
|
|
|
+ * evaluation struct.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * evaluated by the new marker evaluation handle:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> new marker evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteDeleteMarkerEval()
|
|
|
+ */
|
|
|
+tRoadMarkerEval *RoadRouteObjGetMarkerEval(tRoad *road, tObjId rObjId,
|
|
|
+ int mask);
|
|
|
+/** Function to free the memory of a marker evaluation handle
|
|
|
+ * \param[in] rme Marker evaluation handle that should be deleted
|
|
|
+ * \see RoadRouteObjGetMarkerEval() \see RoadLinkDeleteMarkerEval()
|
|
|
+ */
|
|
|
+void RoadRouteDeleteMarkerEval(tRoadMarkerEval *rme);
|
|
|
+
|
|
|
+/** Function to get a <em>Marker</em> from a given section of a <em>Route</em>
|
|
|
+ * (if there is one)\n
|
|
|
+ * The <em>Route</em> stored in the marker evaluation handle (see
|
|
|
+ * RoadRouteObjGetMarkerEval()) is used.
|
|
|
+ *
|
|
|
+ * This function searches for <em>Markers</em> defined on the section of a
|
|
|
+ * <em>Route</em> given by the parameters <b>s0</b> and <b>s1</b>:
|
|
|
+ * - <b>s0</b> < <b>s1</b>: The <em>Marker</em> that is nearest to <b>s0</b> is
|
|
|
+ * retrieved.
|
|
|
+ * - <b>s0</b> > <b>s1</b>: The <em>Marker</em> that is nearest to <b>s1</b> is
|
|
|
+ * retrieved.
|
|
|
+ *
|
|
|
+ * Only <em>Markers</em> valid in route direction are taken into account.
|
|
|
+ * \param[in,out] rme Marker evaluation handle
|
|
|
+ * \param[in] s0 Start offset of the search area on the <em>Route</em>
|
|
|
+ * \param[in] s1 End offset of the search area on the <em>Route</em>
|
|
|
+ * \param[out] out Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Marker</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of Markers found: 0 or 1
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkObjFindMarker()
|
|
|
+ */
|
|
|
+int RoadRouteFindMarker(tRoadMarkerEval *rme,
|
|
|
+ double s0, double s1, tRoadMarkerOut *out);
|
|
|
+/** Function to get the <em>Marker</em> succeeding a given one on a
|
|
|
+ * <em>Route</em> (if there is one)\n
|
|
|
+ * The information about the position of the given <em>Marker</em> and the
|
|
|
+ * chosen search direction stored in the marker evaluation handle are used.
|
|
|
+ * Only <em>Markers</em> valid in route direction are taken into account.
|
|
|
+ * \param[in,out] rme Marker evaluation handle
|
|
|
+ * \param[out] out Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Marker</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of Markers found: 0 or 1
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteFindMarker() \see RoadGetAllMarkerByObjId()
|
|
|
+ * \see RoadLinkNextMarker()
|
|
|
+ */
|
|
|
+int RoadRouteNextMarker(tRoadMarkerEval *rme, tRoadMarkerOut *out);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/*** Not realtime capable Functions - not to be called in realtime context ***/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup NRTMarkersEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to get all <em>Markers</em> along a given <em>Link</em>\n
|
|
|
+ * The <em>Link</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] linkId Identifier of the <em>Link</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * detected:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \param[out] out Pointer to an array of structs for the parameters of the
|
|
|
+ * detected <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> attached to the <em>Link</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadLinkGetAllMarkerByObjId() to get all <em>Markers</em>
|
|
|
+ * along a given <em>Link</em>.
|
|
|
+ */
|
|
|
+int RoadLinkGetAllMarker (tRoad *road, int linkId, int mask,
|
|
|
+ tRoadMarkerOut **out);
|
|
|
+/** Function to get all <em>Markers</em> along a given <em>Link</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] lObjId Object id of the <em>Link</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * detected:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \param[out] out Pointer to an array of structs for the parameters of the
|
|
|
+ * detected <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> attached to the <em>Link</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRefLineGetAllMarkerByObjId() \see RoadGetAllMarkerByObjId()
|
|
|
+ */
|
|
|
+int RoadLinkGetAllMarkerByObjId (tRoad *road, tObjId lObjId, int mask,
|
|
|
+ tRoadMarkerOut **out);
|
|
|
+
|
|
|
+/** Function to get all <em>Markers</em> along a given <em>Reference Line</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rlObjId Object id of the <em>Reference Line</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * detected:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \param[out] out Pointer to an array of structs for the parameters of the
|
|
|
+ * detected <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> attached to the <em>Reference line</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkGetAllMarkerByObjId() \see RoadGetAllMarkerByObjId()
|
|
|
+ */
|
|
|
+int RoadRefLineGetAllMarkerByObjId(tRoad *road, tObjId rlObjId, int mask,
|
|
|
+ tRoadMarkerOut **out);
|
|
|
+
|
|
|
+/** Function to get all <em>Markers</em> along a given <em>Route</em>\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier. In case the
|
|
|
+ * identifier is negative, all <em>Markers</em> of the road instance are
|
|
|
+ * retrieved.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * detected:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \param[out] out Pointer to an array of structs for the parameters of the
|
|
|
+ * detected <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> attached to the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadGetAllMarkerByObjId() to get all <em>Markers</em> along a
|
|
|
+ * given <em>Route</em>
|
|
|
+ */
|
|
|
+int RoadGetAllMarker (tRoad *road, int routeId, int mask,
|
|
|
+ tRoadMarkerOut **out);
|
|
|
+/** Function to get all markers along a given <em>Route</em>\n
|
|
|
+ * In case the object id is \ref ROAD_InvalidObjId "invalid", all
|
|
|
+ * <em>Markers</em> of the road instance are retrieved.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Markers</em> that should be
|
|
|
+ * detected:\n
|
|
|
+ * The binary system is used to generate combinations of the different marker
|
|
|
+ * types by summarizing 1 << \subpage MarkerTypeNamesIds "typeId".
|
|
|
+ * \param[out] out Pointer to an array of structs for the parameters of the
|
|
|
+ * detected <em>Markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Markers</em> attached to the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLinkGetAllMarkerByObjId() \see RoadRefLineGetAllMarkerByObjId()
|
|
|
+ */
|
|
|
+int RoadGetAllMarkerByObjId (tRoad *road, tObjId rObjId, int mask,
|
|
|
+ tRoadMarkerOut **out);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* Accessories and scenery */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup SOEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Number of traffic light phases:\n
|
|
|
+ * There are five different phases of a <em>Traffic light</em> whose durations
|
|
|
+ * need to be set:
|
|
|
+ * off phase, green phase, yellow phase, red phase and red+yellow phase.
|
|
|
+ */
|
|
|
+#define ROAD_NUM_TL_TIMING 5
|
|
|
+/** Maximum number of shape points for the \ref tRoadTrfSignsIn::p
|
|
|
+ * "traffic sign", \ref tRoadTracksIn::p "track" and \ref tRoadLaneLimiterIn::p
|
|
|
+ * "limiter" detection:\n
|
|
|
+ * At most ten points can be used to describe the shape of a sensor area which
|
|
|
+ * is defined as the road surface and the.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_SHAPE_PTS 10
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*** CarMaker Sensor object evaluation ************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \cond
|
|
|
+ */
|
|
|
+typedef struct tRoadSensorObjEval tRoadSensorObjEval;
|
|
|
+
|
|
|
+
|
|
|
+/** \endcond
|
|
|
+ */
|
|
|
+/** Sensor object types
|
|
|
+ */
|
|
|
+typedef enum tRoadSensObjType {
|
|
|
+ RSOT_Unknown = -1, /**< <b>-1</b>
|
|
|
+ * Unknown sensor object type
|
|
|
+ */
|
|
|
+ RSOT_Mount = 10, /**< <b>10</b> Mount
|
|
|
+ */
|
|
|
+ RSOT_TrfSign, /**< <b>11</b> Traffic sign
|
|
|
+ */
|
|
|
+ RSOT_TrfLight, /**< <b>12</b> Traffic light
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierPostSquare = 20, /**< <b>20</b> Traffic barrier
|
|
|
+ * pole of type <em>Square</em>
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierPostSigma, /**< <b>21</b> Traffic barrier
|
|
|
+ * pole of type <em>Sigma</em>
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierPostJersey, /**< <b>22</b> Traffic barrier
|
|
|
+ * of type <em>Jersey barrier</em>
|
|
|
+ * (segmented)
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierPostWall, /**< <b>23</b> Traffic barrier
|
|
|
+ * of type <em>Wall</em> (segmented)
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierGuard = 30, /**< <b>30</b> Traffic barrier of
|
|
|
+ * type <em>Guardrail</em>
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierJersey, /**< <b>31</b> Traffic barrier of
|
|
|
+ * type <em>Jersey barrier</em>
|
|
|
+ */
|
|
|
+ RSOT_TrfBarrierWall, /**< <b>32</b> Traffic barrier of
|
|
|
+ * type <em>Wall</em>
|
|
|
+ */
|
|
|
+ RSOT_GuidePost = 40, /**< <b>40</b> Guide posts
|
|
|
+ */
|
|
|
+ RSOT_Tree = 50, /**< <b>50</b> Tree strip
|
|
|
+ */
|
|
|
+ RSOT_Geometry = 60 /**< <b>60</b> Geometry object
|
|
|
+ */
|
|
|
+} tRoadSensObjType;
|
|
|
+
|
|
|
+
|
|
|
+/*** Sensor object mask ***/
|
|
|
+
|
|
|
+/** Mount:\n
|
|
|
+ * Flag indicating that <em>Mounts</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_MOUNT (1<<0)
|
|
|
+/** Traffic sign:\n
|
|
|
+ * Flag indicating that <em>Traffic signs</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_TRFSIGN (1<<1)
|
|
|
+/** Traffic light:\n
|
|
|
+ * Flag indicating that <em>Traffic lights</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_TRFLIGHT (1<<2)
|
|
|
+/** Traffic barrier:\n
|
|
|
+ * Flag indicating that <em>Traffic barriers</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_TRFBARRIER (1<<3)
|
|
|
+/** Road marking:\n
|
|
|
+ * Flag indicating that <em>Road markings</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_ROADMARKING (1<<4)
|
|
|
+/** Tree:\n
|
|
|
+ * Flag indicating that <em>Tree strips</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_TREESTRIP (1<<5)
|
|
|
+/** Geometry object:\n
|
|
|
+ * Flag indicating that <em>Geometry objects</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_GEOOBJECT (1<<6)
|
|
|
+/** Guide posts:\n
|
|
|
+ * Flag indicating that <em>Guide posts</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_GUIDEPOST (1<<7)
|
|
|
+/** Road painting:\n
|
|
|
+ * Flag indicating that <em>Road painting</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_ROADPAINTING (1<<8)
|
|
|
+/** Sign plate:\n
|
|
|
+ * Flag indicating that <em>Sign plates</em> should be considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_SIGNPLATE (1<<9)
|
|
|
+/** Traffic barrier pole:\n
|
|
|
+ * Flag indicating that the poles of <em>Traffic barriers</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_TB_POLE (1<<10)
|
|
|
+/** Traffic barrier guard rail:\n
|
|
|
+ * Flag indicating that the barrier of <em>Traffic barriers</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+#define ROAD_SO_TB_GUARD (1<<11)
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate and initialize a new sensor object evaluation handle\n
|
|
|
+ * It is specified which types of <em>Sensor objects</em> are of interest for
|
|
|
+ * the evaluation executed with the new sensor object evaluation handle.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rsoMask Mask for the types of <em>Sensor objects</em> that should
|
|
|
+ * be considered:\n
|
|
|
+ * The binary system is used to generate combinations of the macros
|
|
|
+ * #ROAD_SO_MOUNT, #ROAD_SO_TRFSIGN, #ROAD_SO_TRFLIGHT, #ROAD_SO_TRFBARRIER
|
|
|
+ * #ROAD_SO_ROADMARKING, #ROAD_SO_TREESTRIP, #ROAD_SO_GEOOBJECT,
|
|
|
+ * #ROAD_SO_GUIDEPOST, #ROAD_SO_ROADPAINTING, #ROAD_SO_SIGNPLATE,
|
|
|
+ * #ROAD_SO_TB_POLE and #ROAD_SO_TB_GUARD.
|
|
|
+ * \param[in] maxLen Unused
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> sensor object evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadDeleteSensorObjEval()
|
|
|
+ */
|
|
|
+tRoadSensorObjEval* RoadGetSensorObjEval (tRoad *road, int rsoMask,
|
|
|
+ double maxLen);
|
|
|
+/** Function to free the memory of a sensor object evaluation handle
|
|
|
+ * \param[in] rsoe Sensor object evaluation handle that should be deleted
|
|
|
+ * \see RoadGetSensorObjEval()
|
|
|
+ */
|
|
|
+void RoadDeleteSensorObjEval(tRoadSensorObjEval *rsoe);
|
|
|
+
|
|
|
+//! Sensor Object evaluation: input
|
|
|
+/** Struct for the input parameters of RoadGetSensorObjs()
|
|
|
+ */
|
|
|
+typedef struct tRoadSensorObjIn {
|
|
|
+ double xyz[3]; /**< Position of the <em>Sensor</em> in the
|
|
|
+ * global IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double p[ROAD_MAX_SHAPE_PTS][2];/**< Shape of the two-dimensional sensor
|
|
|
+ * area in the (x,y)-plane of the global
|
|
|
+ * IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ int nP; /**< Number of points used to define the
|
|
|
+ * shape of the sensor array
|
|
|
+ */
|
|
|
+ int nMax; /**< Maximum number of <em>Sensor
|
|
|
+ * objects</em> considered for the sensor
|
|
|
+ * object detection
|
|
|
+ */
|
|
|
+} tRoadSensorObjIn;
|
|
|
+//! Sensor Object
|
|
|
+/** Struct for the attributes of a <em>Sensor object</em> used as member in the
|
|
|
+ * struct tRoadSensorObjOut
|
|
|
+ * \note The rectangular cuboid building the <em>Sensor object's</em> minimum
|
|
|
+ * bounding box is considered.
|
|
|
+ */
|
|
|
+typedef struct tRoadSensorObj {
|
|
|
+ double l; /**< Length of the <em>Sensor object</em> in
|
|
|
+ * meters
|
|
|
+ */
|
|
|
+ double w; /**< Width of the <em>Sensor object</em> in
|
|
|
+ * meters
|
|
|
+ */
|
|
|
+ double h; /**< Height of the <em>Sensor object</em> in
|
|
|
+ * meters
|
|
|
+ */
|
|
|
+ double nuv_lh[3]; /**< Normal unit vector of the rectangular
|
|
|
+ * surface defined by length and height of the
|
|
|
+ * <em>Sensor object</em>
|
|
|
+ */
|
|
|
+ double nuv_wh[3]; /**< Normal unit vector of the rectangular
|
|
|
+ * surface defined by width and height of the
|
|
|
+ * <em>Sensor object</em>
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the center of the <em>Sensor
|
|
|
+ * object</em> in the global IPGRoad coordinate
|
|
|
+ * system (Fr0)
|
|
|
+ */
|
|
|
+ tObjId objId; /**< Object id of the <em>Sensor object</em>
|
|
|
+ */
|
|
|
+ tRoadSensObjType rsot; /**< Type of the <em>Sensor object</em>
|
|
|
+ */
|
|
|
+} tRoadSensorObj;
|
|
|
+//! Sensor Object evaluation: output
|
|
|
+/** Struct for the output parameters of RoadGetSensorObjs()
|
|
|
+ */
|
|
|
+typedef struct tRoadSensorObjOut {
|
|
|
+ int n; /**< Number of detected <em>Sensor objects</em>:
|
|
|
+ * <b>n</b> < \ref tRoadSensorObjIn::nMax "nMax"
|
|
|
+ */
|
|
|
+ tRoadSensorObj **sensorObjs;/**< List of pointers to the detected
|
|
|
+ * <em>Sensor objects</em>
|
|
|
+ */
|
|
|
+} tRoadSensorObjOut;
|
|
|
+
|
|
|
+/** Function to get the <em>Sensor objects</em> of specific types that fall
|
|
|
+ * within a chosen sensor area
|
|
|
+ * \param[in] rsoe Sensor object evaluation handle
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return Number of detected <em>Sensor objects</em>
|
|
|
+ */
|
|
|
+int RoadGetSensorObjs(tRoadSensorObjEval *rsoe,
|
|
|
+ tRoadSensorObjIn *in, tRoadSensorObjOut *out);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*** Road limiter evaluation: Tunnel or Traffic barrier *******************/
|
|
|
+
|
|
|
+//! Limiter evaluation: input
|
|
|
+/** Struct for the input parameters of RoadLimEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadLimIn {
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)\note
|
|
|
+ * An estimation of the z-coordinate is given in order
|
|
|
+ * to simplify the evaluation (if no reasonable
|
|
|
+ * estimation is known, initialize the z-coordinate with
|
|
|
+ * zero).
|
|
|
+ */
|
|
|
+ double dir[2]; /**< Longitudinal unit vector at \ref tRoadLimIn::xyz
|
|
|
+ * "xyz":\n
|
|
|
+ * Unit vector in viewing direction
|
|
|
+ * \note This vector is used to determine whether the
|
|
|
+ * results should be calculated in or counter link
|
|
|
+ * direction.
|
|
|
+ */
|
|
|
+} tRoadLimIn;
|
|
|
+//! Limiter evaluation: output
|
|
|
+/** Struct for the output parameters of RoadLimEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadLimOut {
|
|
|
+ double st[2]; /**< Calculated position in the <em>Link's</em> local
|
|
|
+ * coordinate system
|
|
|
+ */
|
|
|
+ double lim[2]; /**< Distance to the limiters at the left/right side
|
|
|
+ * in meters\note
|
|
|
+ * The road can be limited by a <em>Tunnel</em> or by
|
|
|
+ * <em>Traffic barriers</em>.
|
|
|
+ * \note The terms "left" and "right" refer to the
|
|
|
+ * direction specified by the \ref tRoadLimIn::dir
|
|
|
+ * "viewing direction", which can be either in or
|
|
|
+ * counter link direction.
|
|
|
+ */
|
|
|
+ double suv[2]; /**< Longitudinal unit vector at \ref tRoadLimIn::xyz
|
|
|
+ * "xyz":\n
|
|
|
+ * Unit vector \ref tRoadLimIn::dir "in or counter"
|
|
|
+ * s-direction of the <em>Link</em>
|
|
|
+ */
|
|
|
+ double tuv[2]; /**< Lateral unit vector at \ref tRoadLimIn::xyz
|
|
|
+ * "xyz":\n
|
|
|
+ * Unit vector \ref tRoadLimIn::dir "in or counter"
|
|
|
+ * t-direction of the <em>Link</em>
|
|
|
+ */
|
|
|
+ tObjId limObjId[2]; /**< Object ids of the limiters on the left/right
|
|
|
+ * side:\note
|
|
|
+ * The road can be limited by a <em>Tunnel</em> or by
|
|
|
+ * <em>Traffic barriers</em>.
|
|
|
+ * \note The terms "left" and "right" refer to the
|
|
|
+ * direction specified by the \ref tRoadLimIn::dir
|
|
|
+ * "viewing direction", which can be either in or
|
|
|
+ * counter link direction.
|
|
|
+ */
|
|
|
+} tRoadLimOut;
|
|
|
+
|
|
|
+/** Function to evaluate the limiters of a <em>Link</em> at a certain position
|
|
|
+ * \note The road can be limited by a <em>Tunnel</em> or by <em>Traffic
|
|
|
+ * barriers</em>.
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadLimEval(tRoadEval *re, tRoadLimIn *in, tRoadLimOut *out);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*** Traffic Sign evaluation **********************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** Maximum number of <em>Traffic signs</em>:\n
|
|
|
+ * At most forty <em>Traffic signs</em> can be evaluated.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_TRFSIGNS 40
|
|
|
+/** Maximum length of \ref tRoadSign::sign "traffic sign keys":\n
|
|
|
+ * The key of a traffic sign type can be at most thirty-two characters long.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_TRFSIGN_KEY_LEN 32
|
|
|
+/** Maximum length of \ref tRoadSign::attr "traffic signs attributes":\n
|
|
|
+ * A traffic sign attribute can be at most two hundred and fifty-six characters
|
|
|
+ * long.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_TRFSIGN_ATTR_LEN 256
|
|
|
+
|
|
|
+
|
|
|
+/** Function retrieving the identifier of a type of <em>Traffic sign</em> from
|
|
|
+ * its key
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] Name Key of the type of <em>Traffic sign</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the type of <em>Traffic sign</em>\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGetTrfSignTypeId (tRoad *road, const char *Name);
|
|
|
+
|
|
|
+//! Single Traffic sign: detection
|
|
|
+/** Struct used to define a single <em>Traffic sign</em> in the struct
|
|
|
+ * tRoadTrfSign
|
|
|
+ */
|
|
|
+typedef struct tRoadSign {
|
|
|
+ char sign[ROAD_MAX_TRFSIGN_KEY_LEN]; /**< Key of the type of <em>Traffic
|
|
|
+ * sign</em>
|
|
|
+ */
|
|
|
+ char attr[ROAD_MAX_TRFSIGN_ATTR_LEN];/**< Attributes communicated to the
|
|
|
+ * <em>Traffic Sign Sensor</em>
|
|
|
+ */
|
|
|
+ int signId; /**< Identifier for the type of the
|
|
|
+ * <em>Traffic sign</em>
|
|
|
+ */
|
|
|
+ float val[2]; /**< Values 0 / 1 displayed on
|
|
|
+ * <em>Traffic signs</em> of
|
|
|
+ * appropriate \ref tRoadSign::sign
|
|
|
+ * "type"
|
|
|
+ */
|
|
|
+ char isTwoSided; /**< Flag indicating whether the sign
|
|
|
+ * has a texture on both sides:
|
|
|
+ * - 0 ↔ The sign is one-sided.
|
|
|
+ * - 1 ↔ The sign is two-sided.
|
|
|
+ */
|
|
|
+} tRoadSign;
|
|
|
+//! Traffic sign: detection
|
|
|
+/** Struct for the parameters of a <em>Traffic sign</em>
|
|
|
+ * \see RoadGetAllTrfSigns() \see tRoadTrfSignList
|
|
|
+ */
|
|
|
+typedef struct tRoadTrfSign {
|
|
|
+ int objId; /**< Object id of the <em>Traffic sign</em>
|
|
|
+ */
|
|
|
+ int isInRouteDir; /**< Flag indicating the direction validity
|
|
|
+ * of the sign:
|
|
|
+ * - 0 ↔ counter route direction
|
|
|
+ * - 1 ↔ in route direction
|
|
|
+ */
|
|
|
+ double sRoute; /**< Offset of the <em>Traffic sign</em> on
|
|
|
+ * the <em>Route</em> in meters
|
|
|
+ * \note Only available if the <em>Traffic
|
|
|
+ * signs</em> along a given <em>Route</em>
|
|
|
+ * are evaluated (see RoadGetAllTrfSigns()).
|
|
|
+ */
|
|
|
+ double pos[3]; /**< Position of the sign's center in the
|
|
|
+ * (x,y,z)-coordinates of the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadTrfSign::pos "pos"
|
|
|
+ */
|
|
|
+ double height; /**< Height of the sign's center above the
|
|
|
+ * ground in meters
|
|
|
+ */
|
|
|
+ double sqrDistSensor2Sign; /**< Square distance between sign and sensor
|
|
|
+ */
|
|
|
+ double vecSensor2Sign[3]; /**< Vector from sensor to sign
|
|
|
+ */
|
|
|
+ float detectability; /**< Probability of detection by the
|
|
|
+ * <em>Traffic Sign Sensor</em>
|
|
|
+ * (range: 0..1)
|
|
|
+ */
|
|
|
+ tRoadSign main; /**< Main traffic sign
|
|
|
+ */
|
|
|
+ tRoadSign suppl1; /**< First optional supplementary sign
|
|
|
+ */
|
|
|
+ tRoadSign suppl2; /**< Second optional supplementary sign
|
|
|
+ */
|
|
|
+} tRoadTrfSign;
|
|
|
+//! Traffic sign list: detection
|
|
|
+/** Struct for a list of <em>Traffic signs</em>
|
|
|
+ * \see RoadGetAllTrfSigns()
|
|
|
+ */
|
|
|
+typedef struct tRoadTrfSignList {
|
|
|
+ tRoadTrfSign *ts; /**< List of <em>Traffic signs</em>
|
|
|
+ */
|
|
|
+ int nTS; /**< Number of the <em>Traffic signs</em> listed
|
|
|
+ */
|
|
|
+} tRoadTrfSignList;
|
|
|
+
|
|
|
+/** Function to get a certain <em>Traffic sign</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] tsObjId Object id of the <em>Traffic sign</em>
|
|
|
+ * \param[out] trfSign Pointer to a struct for the parameters of the
|
|
|
+ * <em>Traffic sign</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetAllTrfSigns()
|
|
|
+ */
|
|
|
+int RoadGetTrfSign(tRoad *road, tObjId tsObjId, tRoadTrfSign *trfSign);
|
|
|
+/** Function to get all <em>Traffic signs</em> along a given <em>Route</em> or
|
|
|
+ * all <em>Traffic signs</em> of a given road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object Id of the <em>Route</em>\n
|
|
|
+ * Special value: <0 ↔ All signs of the road instance are retrieved
|
|
|
+ * linkwise.
|
|
|
+ * \param[out] tsList Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Traffic signs</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Traffic signs</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGetAllTrfSigns(tRoad *road, tObjId rObjId, tRoadTrfSignList *tsList);
|
|
|
+
|
|
|
+/** Function to get the object id of the <em>Controller</em> of a <em>Traffic
|
|
|
+ * light</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] tlObjId Object id of the <em>Traffic light</em>\n
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> Object id of the controller
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadCtrlGetTrfLights() \see RoadCtrlGetDrvStop()
|
|
|
+ */
|
|
|
+tObjId RoadGetTrfLightCtrl(tRoad *road, tObjId tlObjId);
|
|
|
+
|
|
|
+/** Function to generate and initialize a traffic sign evaluation handle\n
|
|
|
+ * It is specified which types of <em>Traffic signs</em> are of interest for
|
|
|
+ * the evaluation executed with the new traffic sign evaluation handle.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Currently unused
|
|
|
+ * \param[in] nSOI Number of sign types of interest
|
|
|
+ * \param[in] soi Array with the identifiers of the sign types of interest
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> traffic sign evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadDeleteTrfSignEval()
|
|
|
+ */
|
|
|
+tRoadTrfSignEval* RoadGetTrfSignEval (tRoad *road, tObjId rObjId, int nSOI,
|
|
|
+ int *soi);
|
|
|
+/** Function to free the memory of a traffic sign evaluation handle
|
|
|
+ * \param[in] rtse Traffic sign evaluation handle that should be deleted
|
|
|
+ * \see RoadGetTrfSignEval()
|
|
|
+ */
|
|
|
+void RoadDeleteTrfSignEval(tRoadTrfSignEval *rtse);
|
|
|
+
|
|
|
+//! Traffic sign evaluation: input
|
|
|
+/** Struct for the input parameters of RoadGetTrfSigns()
|
|
|
+ */
|
|
|
+typedef struct tRoadTrfSignsIn {
|
|
|
+ double p[ROAD_MAX_SHAPE_PTS][2];/**< Shape of the two-dimensional sensor
|
|
|
+ * area in the (x,y)-plane of the global
|
|
|
+ * IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ int nP; /**< Number of points used to define the
|
|
|
+ * shape of the sensor array
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the <em>Sensor</em> in the
|
|
|
+ * global IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+} tRoadTrfSignsIn;
|
|
|
+//! Traffic sign evaluation: output
|
|
|
+/** Struct for the output parameters of RoadGetTrfSigns()
|
|
|
+ */
|
|
|
+typedef struct tRoadTrfSignsOut {
|
|
|
+ tRoadTrfSign sign[ROAD_MAX_TRFSIGNS];/**< List of <em>Traffic signs</em>
|
|
|
+ */
|
|
|
+ int nSigns; /**< Number of <em>Traffic signs</em>
|
|
|
+ * listed
|
|
|
+ */
|
|
|
+} tRoadTrfSignsOut;
|
|
|
+
|
|
|
+/** Function retrieving the <em>Traffic signs</em> that fall within a chosen
|
|
|
+ * sensor area
|
|
|
+ * \param[in] rtse Traffic sign evaluation handle
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return Number of found <em>Traffic signs</em>
|
|
|
+ * \see RoadPathGetTrfLights()
|
|
|
+ */
|
|
|
+int RoadGetTrfSigns (tRoadTrfSignEval *rtse,
|
|
|
+ tRoadTrfSignsIn *in, tRoadTrfSignsOut *out);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*** Traffic light evaluation *********************************************/
|
|
|
+
|
|
|
+//! Traffic light: detection
|
|
|
+/** Struct for the parameters of an element of the list of <em>Traffic
|
|
|
+ * lights</em> in tRoadTrfLightList
|
|
|
+ * \see RoadGetAllTrfLights() \see tRoadTrfLightExt
|
|
|
+ * \deprecated <em>Traffic lights</em> are detected using the corresponding
|
|
|
+ * <em>\ref RoadRouteGetAllDrvStops "Stop markers"</em>.
|
|
|
+ */
|
|
|
+typedef struct tRoadTrfLight {
|
|
|
+ char *name; /**< Name of the <em>Traffic light
|
|
|
+ * controller</em>
|
|
|
+ */
|
|
|
+ char *startCond; /**< Condition to trigger the starting of the
|
|
|
+ * <em>Traffic light controller</em>
|
|
|
+ */
|
|
|
+ int objId; /**< Object id of the <em>Traffic light
|
|
|
+ * controller</em>
|
|
|
+ */
|
|
|
+ int type; /**< \ref tRoadTLType "Type" of the
|
|
|
+ * <em>Traffic light</em>
|
|
|
+ */
|
|
|
+ int facing; /**< Flag indicating the direction validity
|
|
|
+ * of the traffic light:
|
|
|
+ * - -1 ↔ counter route direction
|
|
|
+ * - 1 ↔ in route direction
|
|
|
+ */
|
|
|
+ int consider; /**< Relevant for the driver:
|
|
|
+ * - 0 ↔ not relevant
|
|
|
+ * - 1 ↔ relevant
|
|
|
+ */
|
|
|
+ int initialPhase; /**< Integer value for the initial phase of the
|
|
|
+ * <em>Traffic light controller</em>:
|
|
|
+ * - 0 ↔ off phase
|
|
|
+ * - 1 ↔ green phase
|
|
|
+ * - 2 ↔ yellow phase
|
|
|
+ * - 3 ↔ red phase
|
|
|
+ * - 4 ↔ red+yellow phase
|
|
|
+ */
|
|
|
+ double sRoute; /**< Offset of the <em>Traffic light's</em> stop
|
|
|
+ * line on the <em>Route</em> in meters:\n The
|
|
|
+ * stop line is internally defined two meters
|
|
|
+ * in front of the traffic light and not
|
|
|
+ * visualized.
|
|
|
+ * \note Only available if the <em>Traffic
|
|
|
+ * lights</em> along a given <em>Route</em> are
|
|
|
+ * evaluated (see RoadGetAllTrfLights()).
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the traffic light's center in
|
|
|
+ * the global IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double timing[ROAD_NUM_TL_TIMING]; /**< Duration of the different phases in
|
|
|
+ * seconds:
|
|
|
+ * - 0 ↔ off phase
|
|
|
+ * - 1 ↔ green phase
|
|
|
+ * - 2 ↔ yellow phase
|
|
|
+ * - 3 ↔ red phase
|
|
|
+ * - 4 ↔ red+yellow phase
|
|
|
+ */
|
|
|
+} tRoadTrfLight;
|
|
|
+//! Traffic light list: detection
|
|
|
+/** Struct for a list of <em>Traffic lights</em>
|
|
|
+ * \see RoadGetAllTrfLights() \see tRoadTrfLightExtList
|
|
|
+ * \deprecated <em>Traffic lights</em> are detected using the corresponding
|
|
|
+ * <em>\ref RoadRouteGetAllDrvStops "Stop markers"</em>.
|
|
|
+ */
|
|
|
+typedef struct tRoadTrfLightList {
|
|
|
+ tRoadTrfLight *tl; /**< List of <em>Traffic lights</em>
|
|
|
+ */
|
|
|
+ int nTL; /**< Number of the <em>Traffic lights</em>
|
|
|
+ * listed
|
|
|
+ */
|
|
|
+} tRoadTrfLightList;
|
|
|
+
|
|
|
+/** Function to get all <em>Traffic lights</em> along a given <em>Route</em> or
|
|
|
+ * all <em>Traffic lights</em> of a given road instance. This function will
|
|
|
+ * only deliver <em>Traffic lights</em> connected to a valid <em> Traffic
|
|
|
+ * light controller</em>\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>\n
|
|
|
+ * Special value: <0 ↔ All traffic lights of the road instance are
|
|
|
+ * retrieved linkwise.
|
|
|
+ * \param[out] tlList Pointer to a struct for the parameters of the detected
|
|
|
+ * <em>Traffic lights</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Traffic lights</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadCtrlGetAllCtrlTL() and RoadCtrlGetTrfLights() to get all
|
|
|
+ * <em>Traffic lights</em> of a given road instance. Moreover, the function
|
|
|
+ * RoadRouteGetAllDrvStops() might be a good replacement.
|
|
|
+ */
|
|
|
+int RoadGetAllTrfLights (tRoad *road, int routeId,
|
|
|
+ tRoadTrfLightList *tlList);
|
|
|
+//! Traffic light evaluation: input
|
|
|
+/** Struct for the input parameters of RoadPathGetTrfLights()
|
|
|
+ */
|
|
|
+typedef struct tRoadPathTrfLightIn {
|
|
|
+ tObjId *objId; /**< List of the object ids of all <em>Paths</em>
|
|
|
+ * belonging to the <em>Driving path</em> starting with
|
|
|
+ * the current <em>Path</em>
|
|
|
+ * \note The last entry has to be a negative value.
|
|
|
+ */
|
|
|
+ double sOnRef; /**< Offset in s-direction on the <em>Reference
|
|
|
+ * line</em> relative to the current <em>Path's</em>
|
|
|
+ * start where the search for <em>Traffic lights</em> is
|
|
|
+ * started
|
|
|
+ */
|
|
|
+ double range; /**< Range in s-direction on the <em>Reference
|
|
|
+ * lines</em> along the <em>Paths</em> where it is
|
|
|
+ * searched for <em>Traffic lights</em>
|
|
|
+ */
|
|
|
+} tRoadPathTrfLightIn;
|
|
|
+//! Traffic light evaluation: output
|
|
|
+/** Struct for the output parameters of RoadPathGetTrfLights()
|
|
|
+ */
|
|
|
+typedef struct tRoadPathTrfLightOut {
|
|
|
+ tObjId objId; /**< Object id of the <em>Traffic light</em>
|
|
|
+ */
|
|
|
+ double sOnRefOff; /**< Offset of the <em>Traffic light's</em>
|
|
|
+ * stop line in s-direction on the <em>Reference
|
|
|
+ * line</em> along the <em>Paths</em> relative
|
|
|
+ * to the \ref tRoadPathTrfLightIn::sOnRef
|
|
|
+ * "input offset":\n The stop line is internally
|
|
|
+ * defined two meters in front of the traffic
|
|
|
+ * light and not visualized.
|
|
|
+ */
|
|
|
+} tRoadPathTrfLightOut;
|
|
|
+
|
|
|
+/** Function retrieving the <em>Traffic lights</em> of the <em>Paths</em> of a
|
|
|
+ * certain <em>Driving path</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Array of structs for the parameters of the three next
|
|
|
+ * <em>Traffic lights</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Traffic lights</em> (at most three)
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetTrfSigns() \see RoadPathGetDrvStops() \see RoadPathGetSpeed()
|
|
|
+ */
|
|
|
+int RoadPathGetTrfLights(tRoad *road,
|
|
|
+ tRoadPathTrfLightIn *in, tRoadPathTrfLightOut out[3]);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/** \addtogroup MarkersEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/*** Stop marker evaluation ***********************************************/
|
|
|
+
|
|
|
+//! Stop marker evaluation: input
|
|
|
+/** Struct for the input parameters of \ref RoadPathGetDrvStops() and
|
|
|
+ * \ref RoadRouteGetDrvStops()
|
|
|
+ */
|
|
|
+typedef struct tRoadDrvStopIn {
|
|
|
+ tObjId *objId; /**< List of objects belonging to the <em>Driving
|
|
|
+ * path</em>:
|
|
|
+ * - \ref RoadPathGetDrvStops(): List of the object ids
|
|
|
+ * of all <em>Paths</em> belonging to the <em>Driving
|
|
|
+ * path</em> starting with the current <em>Path</em>.
|
|
|
+ * The last entry has to be a negative value.
|
|
|
+ * - \ref RoadRouteGetDrvStops(): The first element of
|
|
|
+ * the list, which is the only one read, must be the
|
|
|
+ * object id of the <em>Route</em>.
|
|
|
+ */
|
|
|
+ int mask; /**< Mask for the types of <em>Stop markers</em>
|
|
|
+ * evaluated:\n
|
|
|
+ * The binary system is used to generate combinations of
|
|
|
+ * the types #RDST_Stop, #RDST_GiveWay, #RDST_TrfLight,
|
|
|
+ * #RDST_Junction and #RDST_Unknown.
|
|
|
+ */
|
|
|
+ double s; /**< Offset in s-direction
|
|
|
+ * - \ref RoadPathGetDrvStops(): Offset in s-direction
|
|
|
+ * on the <em>Reference line</em> relative to the
|
|
|
+ * current <em>Path's</em> start where the search for
|
|
|
+ * <em>Stop markers</em> is started
|
|
|
+ * - \ref RoadRouteGetDrvStops(): Offset in s-direction
|
|
|
+ * on the <em>Route</em>
|
|
|
+ */
|
|
|
+ double range; /**< Range in s-direction on the <em>Reference
|
|
|
+ * lines</em> along the <em>Paths</em> where it is
|
|
|
+ * searched for <em>Stop markers</em>
|
|
|
+ */
|
|
|
+} tRoadDrvStopIn;
|
|
|
+//! Stop marker evaluation: output
|
|
|
+/** Struct for the output parameters of \ref RoadPathGetDrvStops() and
|
|
|
+ * \ref RoadRouteGetDrvStops() and an element of the list of <em>Stop
|
|
|
+ * markers</em> in tRoadDrvStopOutList
|
|
|
+ * \see RoadRouteGetAllDrvStops()
|
|
|
+ */
|
|
|
+typedef struct tRoadDrvStopOut {
|
|
|
+ tObjId objId; /**< Object id of the <em>Stop marker</em>
|
|
|
+ */
|
|
|
+ tObjId ctrlObjId; /**< Object id of a <em>Traffic light
|
|
|
+ * controller</em> regulating the functionality
|
|
|
+ * of the <em>Marker</em> if available
|
|
|
+ */
|
|
|
+ double s; /**< Offset of the <em>Stop marker</em>
|
|
|
+ * in s-direction on the <em>Reference
|
|
|
+ * line</em> along the <em>Paths</em> relative
|
|
|
+ * to the \ref tRoadDrvStopIn::s "input offset"
|
|
|
+ */
|
|
|
+} tRoadDrvStopOut;
|
|
|
+
|
|
|
+//! Stop marker evaluation: output
|
|
|
+/** Struct for the output parameters of \ref RoadRouteGetAllDrvStops()
|
|
|
+ */
|
|
|
+typedef struct tRoadDrvStopOutList {
|
|
|
+ tRoadDrvStopOut *stop; /**< List of <em>Stop markers</em>
|
|
|
+ */
|
|
|
+ int nStop; /**< Number of <em>Stop markers</em> found
|
|
|
+ */
|
|
|
+} tRoadDrvStopOutList;
|
|
|
+
|
|
|
+/** Function retrieving all <em>Stop markers</em> of a <em>Route</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] mask Mask for the types of <em>Stop markers</em> evaluated:\n
|
|
|
+ * The binary system is used to generate combinations of the types #RDST_Stop,
|
|
|
+ * #RDST_GiveWay, #RDST_TrfLight, #RDST_Junction and #RDST_Unknown.
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Stop markers</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteGetDrvStops()
|
|
|
+*/
|
|
|
+int RoadRouteGetAllDrvStops(tRoad *road, tObjId routeObjId, int mask,
|
|
|
+ tRoadDrvStopOutList *out);
|
|
|
+ /** Function retrieving the next three <em>Stop markers</em> of a
|
|
|
+ * <em>Route</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Array of structs for the parameters of the three next
|
|
|
+ * <em>Stop markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Stop markers</em> (at most three)
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadPathGetDrvStops() \see RoadRouteGetAllDrvStops()
|
|
|
+ */
|
|
|
+int RoadRouteGetDrvStops(tRoad *road, tRoadDrvStopIn *in,
|
|
|
+ tRoadDrvStopOut out[3]);
|
|
|
+/** Function retrieving the next three <em>Stop markers</em> of the
|
|
|
+ * <em>Paths</em> of a given <em>Driving path</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Array of structs for the parameters of the three next
|
|
|
+ * <em>Stop markers</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Stop markers</em> (at most three)
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteGetDrvStops() \see RoadPathGetTrfLights()
|
|
|
+ */
|
|
|
+int RoadPathGetDrvStops (tRoad *road, tRoadDrvStopIn *in,
|
|
|
+ tRoadDrvStopOut out[3]);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/** \addtogroup ControllersEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/*** Control object evaluation ********************************************/
|
|
|
+
|
|
|
+//! Traffic light controller: detection
|
|
|
+/** Struct for the parameters of an element of the list of <em>Traffic light
|
|
|
+ * controllers</em> in tRoadCtrlTLList
|
|
|
+ * \see RoadCtrlGetAllCtrlTL()
|
|
|
+ */
|
|
|
+typedef struct tRoadCtrlTL {
|
|
|
+ char *name; /**< Name of the <em>Traffic light
|
|
|
+ * controller</em>
|
|
|
+ */
|
|
|
+ char *startCond; /**< Condition to trigger the starting of the
|
|
|
+ * <em>Traffic light controller</em>
|
|
|
+ */
|
|
|
+ int objId; /**< Object id of the <em>Traffic light
|
|
|
+ * controller</em>
|
|
|
+ */
|
|
|
+ int type; /**< \ref tRoadTLType "Type" of the
|
|
|
+ * <em>Traffic light</em>
|
|
|
+ * \deprecated Is always set to #RTLT_Unknown.
|
|
|
+ */
|
|
|
+ int initialPhase; /**< Integer value for the initial phase of the
|
|
|
+ * <em>Traffic light controller</em>:
|
|
|
+ * - 0 ↔ off phase
|
|
|
+ * - 1 ↔ green phase
|
|
|
+ * - 2 ↔ yellow phase
|
|
|
+ * - 3 ↔ red phase
|
|
|
+ * - 4 ↔ red+yellow phase
|
|
|
+ */
|
|
|
+ double timing[ROAD_NUM_TL_TIMING]; /**< Duration of the different phases in
|
|
|
+ * seconds:
|
|
|
+ * - 0 ↔ off phase
|
|
|
+ * - 1 ↔ green phase
|
|
|
+ * - 2 ↔ yellow phase
|
|
|
+ * - 3 ↔ red phase
|
|
|
+ * - 4 ↔ red+yellow phase
|
|
|
+ */
|
|
|
+} tRoadCtrlTL;
|
|
|
+//! Traffic light controller list: detection
|
|
|
+/** Struct for a list of <em>Traffic light controllers</em>
|
|
|
+ * \see RoadCtrlGetAllCtrlTL()
|
|
|
+ */
|
|
|
+typedef struct tRoadCtrlTLList {
|
|
|
+ tRoadCtrlTL *ctrlTL; /**< List of <em>Traffic light controllers</em>
|
|
|
+ */
|
|
|
+ int nCtrlTL; /**< Number of the <em>Traffic light
|
|
|
+ * controllers</em> listed
|
|
|
+ */
|
|
|
+} tRoadCtrlTLList;
|
|
|
+
|
|
|
+ /** Function retrieving all <em>Traffic light controllers</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[out] ctrlTLList Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Traffic light controllers</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadCtrlGetAllCtrlTL(tRoad *road, tRoadCtrlTLList *ctrlTLList);
|
|
|
+
|
|
|
+/** Function to get the object ids of all control objects of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[out] objIds Pointer to an array for the object ids of the
|
|
|
+ * control objects
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of control objects
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadCtrlGetCtrlObjIds(tRoad *road, tObjId **objIds);
|
|
|
+
|
|
|
+//! Traffic light: detection
|
|
|
+/** Struct for the parameters of an element of the list of <em>Traffic
|
|
|
+ * lights</em> in tRoadTLList
|
|
|
+ * \see \ref RoadCtrlGetTrfLights()
|
|
|
+ */
|
|
|
+typedef struct tRoadTL {
|
|
|
+ double xyz[3]; /**< Position of the <em>Traffic light's</em> center
|
|
|
+ * in the global IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Normal vector of the <em>Traffic light's</em>
|
|
|
+ * center in the global IPGRoad coordinate system
|
|
|
+ * (Fr0)
|
|
|
+ */
|
|
|
+ int type; /**< \ref tRoadTLType "Type" of the
|
|
|
+ * <em>Traffic light</em>
|
|
|
+ */
|
|
|
+ tObjId objId; /**< Object id of the <em>Traffic light</em>
|
|
|
+ */
|
|
|
+} tRoadTL;
|
|
|
+//! Traffic light list: detection
|
|
|
+/** Struct for a list of <em>Traffic lights</em>
|
|
|
+ * \see \ref RoadCtrlGetTrfLights()
|
|
|
+ */
|
|
|
+typedef struct tRoadTLList {
|
|
|
+ tRoadTL *tl; /**< List of <em>Traffic lights</em>
|
|
|
+ */
|
|
|
+ int nTL; /**< Number of the <em>Traffic lights</em>
|
|
|
+ * listed
|
|
|
+ */
|
|
|
+} tRoadTLList;
|
|
|
+
|
|
|
+ /** Function retrieving all <em>Traffic lights </em> of a given <em>Traffic
|
|
|
+ * light controller</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] ctrlTLObjId Object id of the <em>Traffic light controller</em>
|
|
|
+ * \param[out] tlList Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Traffic lights</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see \ref RoadCtrlGetDrvStop()
|
|
|
+ */
|
|
|
+int RoadCtrlGetTrfLights(tRoad *road, tObjId ctrlTLObjId, tRoadTLList *tlList);
|
|
|
+//! Stop marker: detection
|
|
|
+/** Struct for the parameters of an element of the list of
|
|
|
+ * <em>Stop markers</em> in tRoadDrvStopList
|
|
|
+ * \see RoadCtrlGetDrvStop()
|
|
|
+ */
|
|
|
+typedef struct tRoadDrvStop {
|
|
|
+ tObjId objId; /**< Object id of the <em>Stop marker</em>
|
|
|
+ */
|
|
|
+} tRoadDrvStop;
|
|
|
+//! Stop marker list: detection
|
|
|
+/** Struct for a list of <em>Stop markers</em>
|
|
|
+ * \see RoadCtrlGetDrvStop()
|
|
|
+ */
|
|
|
+typedef struct tRoadDrvStopList {
|
|
|
+ tRoadDrvStop *stop; /**< List of <em>Stop markers</em>
|
|
|
+ */
|
|
|
+ int nStop; /**< Number of the <em>Stop markers</em>
|
|
|
+ * listed
|
|
|
+ */
|
|
|
+} tRoadDrvStopList;
|
|
|
+
|
|
|
+/** Function retrieving all <em>Stop markers</em> of a given <em>Traffic light
|
|
|
+ * controller</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] ctrlTLObjId Object id of the <em>Traffic light controller</em>
|
|
|
+ * \param[out] stopList Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found <em>Stop markers</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see \ref RoadCtrlGetTrfLights()
|
|
|
+ */
|
|
|
+int RoadCtrlGetDrvStop(tRoad *road, tObjId ctrlTLObjId,
|
|
|
+ tRoadDrvStopList *stopList);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/** \addtogroup SOEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/*** Track evaluation *****************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/*** Options for the length of a track ***/
|
|
|
+
|
|
|
+/** Offset on the track: \n
|
|
|
+ * The length of a track is defined as its real length.
|
|
|
+ */
|
|
|
+#define ROAD_S_ON_TRACK 0
|
|
|
+/** Offset on the <em>Reference line</em>:\n
|
|
|
+ * The length of a track is defined as its projection on the <em>Reference
|
|
|
+ * line</em>. This is allowed only if the line is \ref RLK_Offset
|
|
|
+ * "parallel to its lateral reference".
|
|
|
+ * \warning Not yet supported!
|
|
|
+ */
|
|
|
+#define ROAD_S_ON_REFLINE 1
|
|
|
+
|
|
|
+/** Function to get the total length of the track of a <em>Road Marking</em> or
|
|
|
+ * <em>Traffic barrier</em> and the number and the lengths of the trajectories
|
|
|
+ * forming the track
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] objId Object id of the <em>Road Marking</em> or <em>Traffic
|
|
|
+ * barrier</em>
|
|
|
+ * \param[in] respect Option for the length: \ref ROAD_S_ON_REFLINE
|
|
|
+ * "offset on track" (\ref ROAD_S_ON_TRACK "offset on Reference line" is not
|
|
|
+ * yet supported)
|
|
|
+ * \param[out] trackLen Length of the track considering <b>respect</b> in meters
|
|
|
+ * \param[out] n Number of trajectories forming the track
|
|
|
+ * \param[out] len Pointer to an array for the lengths of the trajectories
|
|
|
+ * forming the track
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGetTrackList(tRoad *road, tObjId objId, int respect,
|
|
|
+ double *trackLen, int *n, double **len);
|
|
|
+
|
|
|
+
|
|
|
+/** Maximum number of track points:\n
|
|
|
+ * At most two hundred track points are considered for the detection of
|
|
|
+ * <em>Road markings</em> and <em>Traffic barriers</em>.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_TRACK_PTS 200
|
|
|
+/** Maximum number of tracks:\n
|
|
|
+ * At most twenty-five tracks are considered for the detection of <em>Road
|
|
|
+ * markings</em> and <em>Traffic barriers</em>.
|
|
|
+ */
|
|
|
+#define ROAD_MAX_TRACKS 25
|
|
|
+
|
|
|
+
|
|
|
+/** <em>Road markings</em> and <em>Traffic barriers</em>:\n
|
|
|
+ * Flag indicating that all <em>Road markings</em> and <em>Traffic
|
|
|
+ * barriers</em> should be considered.
|
|
|
+ * \see RoadNewTrackEval() \see RoadNewTrackEvalExt()
|
|
|
+ */
|
|
|
+#define ROAD_TD_ALL 0
|
|
|
+/** <em>Road markings</em>:\n
|
|
|
+ * Flag indicating that all <em>Road markings</em> should be considered.
|
|
|
+ * \see RoadNewTrackEval() \see RoadNewTrackEvalExt()
|
|
|
+ */
|
|
|
+#define ROAD_TD_MARKINGS (1<<0)
|
|
|
+/** <em>Traffic barriers</em>:\n
|
|
|
+ * Flag indicating that all <em>Traffic barriers</em> should be considered.
|
|
|
+ * \see RoadNewTrackEval() \see RoadNewTrackEvalExt()
|
|
|
+ */
|
|
|
+#define ROAD_TD_BARRIERS (1<<1)
|
|
|
+
|
|
|
+
|
|
|
+/** Line types:\n
|
|
|
+ * There are various types of lines that can be used to describe a <em>Road
|
|
|
+ * marking</em>.
|
|
|
+ */
|
|
|
+typedef enum tRoadLineType {
|
|
|
+ RLT_UnknownLine = 0, /**< <b>0</b> Unknown line type
|
|
|
+ */
|
|
|
+ RLT_Line, /**< <b>1</b> Single line
|
|
|
+ */
|
|
|
+ RLT_LineDshd, /**< <b>2</b> Broken line
|
|
|
+ */
|
|
|
+ RLT_LineSqrDot, /**< <b>3</b> Dotted line
|
|
|
+ */
|
|
|
+ RLT_DblLine, /**< <b>4</b> Double line
|
|
|
+ */
|
|
|
+ RLT_DblLineDshd, /**< <b>5</b> Double broken line
|
|
|
+ */
|
|
|
+ RLT_DblLineSqrDot, /**< <b>6</b> Double dotted line
|
|
|
+ */
|
|
|
+ RLT_DblLineDshdL, /**< <b>7</b> Left-broken double line
|
|
|
+ */
|
|
|
+ RLT_DblLineDshdR, /**< <b>8</b> Right-broken double line
|
|
|
+ */
|
|
|
+ RLT_DblLineSqrDotL, /**< <b>9</b> Left-dotted double line
|
|
|
+ */
|
|
|
+ RLT_DblLineSqrDotR, /**< <b>10</b> Right-dotted double line
|
|
|
+ */
|
|
|
+ RLT_RoadBoundary, /**< <b>11</b> Internal use only
|
|
|
+ */
|
|
|
+ RLT_GuardRail, /**< <b>12</b> Internal use only
|
|
|
+ */
|
|
|
+ RLT_Max /**< <b>13</b> Number of line types
|
|
|
+ */
|
|
|
+} tRoadLineType;
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate and initialize a new track evaluation handle\n
|
|
|
+ * It is specified whether <em>Road markings</em> and <em>Traffic barriers</em>
|
|
|
+ * are of interest for the evaluation executed with the new track evaluation
|
|
|
+ * handle. Moreover, the radius of a circle enclosing the sensor area and the
|
|
|
+ * step size of the track points is set.
|
|
|
+ * \note This function prepares the detection of tracks: To simplify the
|
|
|
+ * evaluation, a circle enclosing the sensor area is defined.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Currently unused
|
|
|
+ * \param[in] ds Sampling distance of the track points in meters
|
|
|
+ * \param[in] radius Radius of the circle around the vehicle where tracks are
|
|
|
+ * detected\n The radius is restricted by the step size <b>ds</b>: It is set to
|
|
|
+ * 0.5*<b>ds</b>*#ROAD_MAX_TRACK_PTS in case it exceeds this value.
|
|
|
+ * \param[in] mask Mask for the types of tracks that should be detected:\n
|
|
|
+ * #ROAD_TD_MARKINGS, #ROAD_TD_BARRIERS or #ROAD_TD_ALL
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to the new track evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadNewTrackEvalExt() \see RoadDeleteTrackEval()
|
|
|
+ */
|
|
|
+tRoadTrackEval* RoadNewTrackEval (tRoad *road, tObjId rObjId, double ds,
|
|
|
+ double radius, int mask);
|
|
|
+/** Function to generate and initialize a new track evaluation handle\n
|
|
|
+ * It is specified whether <em>Road markings</em> and <em>Traffic barriers</em>
|
|
|
+ * are of interest for the evaluation executed with the new track evaluation
|
|
|
+ * handle. Moreover, the radius of a circle enclosing the sensor area and the
|
|
|
+ * step size of the track points is set.\n
|
|
|
+ * <em><b>Extended version:</b></em> Instead of using the macros, the
|
|
|
+ * \ref ROAD_MAX_TRACKS "maximum number of tracks" considered by the
|
|
|
+ * evaluation handle and the \ref ROAD_MAX_SHAPE_PTS
|
|
|
+ * "maximum number of shape points" used to define the sensor area can be set
|
|
|
+ * individually.
|
|
|
+ * \note This function prepares the detection of tracks: To simplify the
|
|
|
+ * evaluation, a circle enclosing the sensor area is defined.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Currently unused
|
|
|
+ * \param[in] ds Sampling distance of the track points in meters
|
|
|
+ * \param[in] radius Radius of the circle around the vehicle where tracks are
|
|
|
+ * detected\n The radius is restricted by the step size <b>ds</b>: It is set to
|
|
|
+ * 0.5*<b>ds</b>*#ROAD_MAX_TRACK_PTS in case it exceeds this value.
|
|
|
+ * \param[in] mask Mask for the types of tracks that should be detected:\n
|
|
|
+ * #ROAD_TD_MARKINGS, #ROAD_TD_BARRIERS or #ROAD_TD_ALL
|
|
|
+ * \param[in] maxTracks Maximum number of tracks considered
|
|
|
+ * \param[in] maxShapePoints Maximum number of shape points allowed
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to the new track evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadNewTrackEval() \see RoadDeleteTrackEval()
|
|
|
+ */
|
|
|
+tRoadTrackEval* RoadNewTrackEvalExt(tRoad *road, tObjId rObjId, double ds,
|
|
|
+ double radius, int mask, int maxTracks, int maxShapePoints);
|
|
|
+/** Function to free the memory of a track evaluation handle
|
|
|
+ * \param[in] rte Track evaluation handle that should be deleted
|
|
|
+ * \see RoadNewTrackEval()
|
|
|
+ */
|
|
|
+void RoadDeleteTrackEval(tRoadTrackEval *rte);
|
|
|
+
|
|
|
+//! Track evaluation: input
|
|
|
+/** Struct for the input parameters of RoadEvalTrack()
|
|
|
+ */
|
|
|
+typedef struct tRoadTrackIn {
|
|
|
+ double s; /**< Offset of the given position on the track in meters
|
|
|
+ */
|
|
|
+ double estZ; /**< Estimated z-coordinate of the given position
|
|
|
+ */
|
|
|
+ tObjId objId; /**< Object id of the <em>Road marking</em> or
|
|
|
+ * <em>Traffic barrier</em>
|
|
|
+ */
|
|
|
+ int id; /**< Internal identifier of the trajectory the given
|
|
|
+ * position is on
|
|
|
+ * \note In case the wrong identifier is handed over,
|
|
|
+ * the correct trajectory is determined and used.
|
|
|
+ */
|
|
|
+ int respect; /**< Reference for the length of the track:
|
|
|
+ * \ref ROAD_S_ON_TRACK "offset on track"
|
|
|
+ * (\ref ROAD_S_ON_REFLINE
|
|
|
+ * "offset on the Reference line" is not yet supported)
|
|
|
+ */
|
|
|
+} tRoadTrackIn;
|
|
|
+//! Track evaluation: output
|
|
|
+/** Struct for the output parameters of RoadEvalTrack()
|
|
|
+ */
|
|
|
+typedef struct tRoadTrackOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadTrackOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at \ref tRoadTrackOut::xyz
|
|
|
+ * "xyz":\n
|
|
|
+ * Unit vector in s-direction of the track
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at \ref tRoadTrackOut::xyz
|
|
|
+ * "xyz":\n
|
|
|
+ * Unit vector in t-direction of the track
|
|
|
+ */
|
|
|
+ double curvature; /**< Curvature of the track in the (x,y)-plane in
|
|
|
+ * \ref tRoadTrackOut::xyz "xyz"
|
|
|
+ */
|
|
|
+} tRoadTrackOut;
|
|
|
+
|
|
|
+/** Function to evaluate a track
|
|
|
+ * \note This function is used to prepare the visualization of a track.
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadEvalTrack(tRoadEval *re, tRoadTrackIn *in, tRoadTrackOut *out);
|
|
|
+
|
|
|
+//! Track: detection
|
|
|
+/** Struct used to describe the tracks in tRoadTracksOut and tRoadTracksOutExt
|
|
|
+ */
|
|
|
+typedef struct tRoadTrack {
|
|
|
+ double p[ROAD_MAX_TRACK_PTS][3];/**< Point list of 3D track points
|
|
|
+ * with respect to the global
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ int nP; /**< Number of track points
|
|
|
+ */
|
|
|
+ int id; /**< Object id of the <em>Road
|
|
|
+ * Marking</em>, <em>Traffic
|
|
|
+ * barrier</em> or <em>Connected
|
|
|
+ * trajectory list</em> the track
|
|
|
+ * belongs to
|
|
|
+ */
|
|
|
+ float width; /**< Width of the <em>Road marking</em>
|
|
|
+ * or <em>Traffic barrier</em> in meters
|
|
|
+ */
|
|
|
+ float height; /**< Height of the <em>Road marking</em>
|
|
|
+ * or <em>Traffic barrier</em> in meters
|
|
|
+ */
|
|
|
+ tRoadLineType type; /**< Type of line
|
|
|
+ */
|
|
|
+ int colorCode; /**< User definable id for the track
|
|
|
+ */
|
|
|
+ int isOnRoute; /**< Unused
|
|
|
+ */
|
|
|
+} tRoadTrack;
|
|
|
+
|
|
|
+//! Tracks evaluation: input
|
|
|
+/** Struct for the input parameters of RoadGetTracks()\n
|
|
|
+ * The difference between this struct and tRoadTracksInExt is that the member
|
|
|
+ * \ref tRoadTracksIn::p "p" is an array of fixed size, not a pointer.
|
|
|
+ */
|
|
|
+typedef struct tRoadTracksIn {
|
|
|
+ double p[ROAD_MAX_SHAPE_PTS][2];/**< Shape of the two-dimensional sensor
|
|
|
+ * area in the (x,y)-plane of the global IPGRoad
|
|
|
+ * coordinate system (Fr0). The shape has to be
|
|
|
+ * defined in a clockwise order.
|
|
|
+ */
|
|
|
+ int nP; /**< Number of points defining the shape of the
|
|
|
+ * sensor area
|
|
|
+ * \note There have to be at least two points.
|
|
|
+ * If only one point is given, the sensor shape
|
|
|
+ * algorithm is switched off and the track
|
|
|
+ * point list consists of points in a circle
|
|
|
+ * around the vehicle position with a radius
|
|
|
+ * given by the radius parameter of the road
|
|
|
+ * track eval handle <b>\ref RoadGetTracks
|
|
|
+ * "rte"</b>.
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the <em>Sensor</em> in the
|
|
|
+ * global IPGRoad coordinate system (Fr0)\note
|
|
|
+ * This position is used to reduce the expenses
|
|
|
+ * of the calculation. If more than one
|
|
|
+ * <em>Sensor</em> of a vehicle is evaluated,
|
|
|
+ * all of them should be given the same position
|
|
|
+ * (e.g. the vehicle position).
|
|
|
+ */
|
|
|
+} tRoadTracksIn;
|
|
|
+//! Tracks evaluation: output
|
|
|
+/** Struct for the output parameters of RoadGetTracks()\n
|
|
|
+ * The difference between this struct and tRoadTracksOutExt is that the member
|
|
|
+ * \ref tRoadTracksOut::track "track" is an array of fixed size and no pointer.
|
|
|
+ */
|
|
|
+typedef struct tRoadTracksOut {
|
|
|
+ tRoadTrack track[ROAD_MAX_TRACKS];/**< List of tracks
|
|
|
+ */
|
|
|
+ int nTracks; /**< Number of tracks found
|
|
|
+ */
|
|
|
+} tRoadTracksOut;
|
|
|
+
|
|
|
+/** Function to get the tracks of specific types that fall within a chosen
|
|
|
+ * sensor area
|
|
|
+ * \param[in,out] rte Evaluation handle of a track
|
|
|
+ * \param[in] In Pointer to a struct for the input parameters
|
|
|
+ * \param[out] Out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetTracksExt()
|
|
|
+ */
|
|
|
+int RoadGetTracks (tRoadTrackEval *rte,
|
|
|
+ tRoadTracksIn *In, tRoadTracksOut *Out);
|
|
|
+
|
|
|
+//! Tracks evaluation: input (extended version)
|
|
|
+/** Struct for the input parameters of RoadGetTracksExt() \n
|
|
|
+ * The difference between this struct and tRoadTracksIn is that the member
|
|
|
+ * \ref tRoadTracksInExt::p "p" is a pointer.
|
|
|
+ */
|
|
|
+typedef struct tRoadTracksInExt {
|
|
|
+ double (*p)[2]; /**< Shape of the two-dimensional sensor area in the
|
|
|
+ * (x,y)-plane of the global IPGRoad coordinate system
|
|
|
+ * (Fr0). The shape has to be defined in a clockwise
|
|
|
+ * order.
|
|
|
+ */
|
|
|
+ int nP; /**< Number of points defining the shape of the sensor
|
|
|
+ * area
|
|
|
+ * \note There have to be at least three points. \n
|
|
|
+ * If only one point is given, the sensor shape
|
|
|
+ * algorithm is switched off and the track
|
|
|
+ * point list consists of points in a circle
|
|
|
+ * around the vehicle position with a radius
|
|
|
+ * given by the radius parameter of the road
|
|
|
+ * track eval handle <b>\ref RoadGetTracks
|
|
|
+ * "rte"</b>.
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the <em>Sensor</em> in the global
|
|
|
+ * IPGRoad coordinate system (Fr0)\note
|
|
|
+ * This position is used to reduce the expenses of the
|
|
|
+ * calculation. If more than one <em>Sensor</em> of a
|
|
|
+ * vehicle is evaluated, all of them should be given the
|
|
|
+ * same position (e.g. the vehicle position).
|
|
|
+ */
|
|
|
+} tRoadTracksInExt;
|
|
|
+//! Tracks evaluation: output (extended version)
|
|
|
+/** Struct for the output parameters of RoadGetTracksExt()\n
|
|
|
+ * The difference between this struct and tRoadTracksOut is that the member
|
|
|
+ * \ref tRoadTracksOutExt::track "track" is a pointer.
|
|
|
+ */
|
|
|
+typedef struct tRoadTracksOutExt {
|
|
|
+ tRoadTrack *track; /**< List of the tracks
|
|
|
+ */
|
|
|
+ int nTracks; /**< Number of tracks found
|
|
|
+ */
|
|
|
+} tRoadTracksOutExt;
|
|
|
+
|
|
|
+/** Function to get the tracks of specific types that fall within a chosen
|
|
|
+ * sensor area: extended version
|
|
|
+ * \param[in,out] rte Evaluation handle of a track
|
|
|
+ * \param[in] In Pointer to a struct for the input parameters
|
|
|
+ * \param[out] Out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetTracks()
|
|
|
+ */
|
|
|
+int RoadGetTracksExt(tRoadTrackEval *rte,
|
|
|
+ tRoadTracksInExt *In, tRoadTracksOutExt *Out);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*** Lane limiter evaluation **********************************************/
|
|
|
+
|
|
|
+//! Lane limiter evaluation: input
|
|
|
+/** Struct for the input parameters of RoadGetLaneLimiter()
|
|
|
+ */
|
|
|
+typedef struct tRoadLaneLimiterIn {
|
|
|
+ double p[ROAD_MAX_SHAPE_PTS][2];/**< Shape of the two-dimensional sensor
|
|
|
+ * area in the (x,y)-plane of the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ int nP; /**< Number of points defining the shape of the
|
|
|
+ * sensor area
|
|
|
+ * \note There have to be at least two points.
|
|
|
+ * If only one point is given, the sensor shape
|
|
|
+ * algorithm is switched off and the track
|
|
|
+ * point list consists of points in the range
|
|
|
+ * from vehicle position + p[0][0] to
|
|
|
+ * vehicle position + p[0][1] in moving
|
|
|
+ * direction.
|
|
|
+ */
|
|
|
+ double maxLineDerivation; /**< Maximum derivation of the track:\n
|
|
|
+ * If the derivation of the track exceeds this
|
|
|
+ * value, the track evaluation is stopped and
|
|
|
+ * only a part of the track is considered.
|
|
|
+ * \note Since the track will be described by
|
|
|
+ * a function, the derivation mustn't be too
|
|
|
+ * large.
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Position of the <em>Sensor</em> in the
|
|
|
+ * global IPGRoad coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double vhclXYZ[3]; /**< Vehicle position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double vhclRotMat[3][3]; /**< Rotation matrix for the conversion of a
|
|
|
+ * position in the vehicle's coordinate system
|
|
|
+ * to a position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+} tRoadLaneLimiterIn;
|
|
|
+//! Limiters of a Lane
|
|
|
+/** Struct used to describe the limiters of the <em>Lanes</em> in
|
|
|
+ * tRoadLaneLimiter
|
|
|
+ */
|
|
|
+typedef struct tRoadLaneLimiter {
|
|
|
+ double c[5]; /**< Coefficients of a fourth-order polynomial
|
|
|
+ * representing the detected track in the local
|
|
|
+ * coordinate system of the vehicle determined
|
|
|
+ * by the given \ref tRoadLaneLimiterIn::vhclXYZ
|
|
|
+ * "position" and
|
|
|
+ * \ref tRoadLaneLimiterIn::vhclRotMat
|
|
|
+ * "rotation":\n
|
|
|
+ * The track's course is defined by
|
|
|
+ *   \f$y(x) = c[0] + c[1]x + c[2]x^2 +
|
|
|
+ * c[3]x^3 + c[4]x^4 + c[5]x^5,\f$  
|
|
|
+ * \f$x\in\f$[\ref tRoadLaneLimiter::x "x"[0],
|
|
|
+ * \ref tRoadLaneLimiter::x "x"[2]].
|
|
|
+ * \note The graph of this function is split
|
|
|
+ * into two parts that can be described by
|
|
|
+ * third-order polynomials. In case the whole
|
|
|
+ * track can be represented properly by only
|
|
|
+ * one third-order polynomials, there is no
|
|
|
+ * second one.
|
|
|
+ */
|
|
|
+ double c1[4]; /**< Coefficients of a third-order polynomial
|
|
|
+ * representing the first part of the detected
|
|
|
+ * \ref tRoadLaneLimiter::c "track"
|
|
|
+ */
|
|
|
+ double c2[4]; /**< Coefficients of a third-order polynomial
|
|
|
+ * representing the second part of the detected
|
|
|
+ * \ref tRoadLaneLimiter::c "track"
|
|
|
+ */
|
|
|
+ double x[3]; /**< X-coordinate of the start, split and end
|
|
|
+ * point of the track in the local coordinate
|
|
|
+ * system of the vehicle
|
|
|
+ */
|
|
|
+ int n; /**< Number of third order polynomials used to
|
|
|
+ * represent the track
|
|
|
+ * \note Depending on the form of the track this
|
|
|
+ * might be 0, 1 or 2.
|
|
|
+ */
|
|
|
+ int id; /**< Internal identifier
|
|
|
+ */
|
|
|
+ float width; /**< Width of the <em>Road marking</em> or
|
|
|
+ * <em>Traffic barrier</em> in meters
|
|
|
+ */
|
|
|
+ float height; /**< Height of the <em>Road marking</em> or
|
|
|
+ * <em>Traffic barrier</em> in meters
|
|
|
+ */
|
|
|
+ tRoadLineType type; /**< Type of line
|
|
|
+ */
|
|
|
+ int userID; /**< User definable id for the track
|
|
|
+ */
|
|
|
+ int isOnRoute; /**< Unused
|
|
|
+ */
|
|
|
+} tRoadLaneLimiter;
|
|
|
+//! Lane limiter evaluation: output
|
|
|
+/** Struct for the output parameters of RoadGetLaneLimiter()
|
|
|
+ */
|
|
|
+typedef struct tRoadLaneLimiterOut {
|
|
|
+ tRoadLaneLimiter laneLimiter[ROAD_MAX_TRACKS];/**< List of the limiters
|
|
|
+ * of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ int nLL; /**< Number of limiters found
|
|
|
+ */
|
|
|
+} tRoadLaneLimiterOut;
|
|
|
+
|
|
|
+/** Function to evaluate the limiters of a <em>Lane</em>\n
|
|
|
+ * A <em>Lane</em> can be limited either by a <em>Road marking</em> or by a
|
|
|
+ * <em>Traffic barrier</em>
|
|
|
+ * \param[in] rte Track evaluation handle
|
|
|
+ * \param[in] In Pointer to a struct for the input parameters
|
|
|
+ * \param[out] Out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGetLaneLimiter (tRoadTrackEval *rte,
|
|
|
+ tRoadLaneLimiterIn *In, tRoadLaneLimiterOut *Out);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Paths ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup PathsEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/*** Path types ***/
|
|
|
+
|
|
|
+/** Lane path:\n
|
|
|
+ * Flag indicating that <em>Paths</em> of type <em>Lane path</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadPathGetPathObjIdsFromParent()
|
|
|
+ */
|
|
|
+#define ROAD_LPATH (1<<0)
|
|
|
+/** User path:\n
|
|
|
+ * Flag indicating that <em>Paths</em> of type <em>User path</em> should be
|
|
|
+ * considered.
|
|
|
+ * \see RoadPathGetPathObjIdsFromParent()
|
|
|
+ */
|
|
|
+#define ROAD_UPATH (1<<1)
|
|
|
+/** Connector path:\n
|
|
|
+ * Flag indicating that <em>Paths</em> of type <em>Connector path</em> should
|
|
|
+ * be considered.
|
|
|
+ * \see RoadPathGetPathObjIdsFromParent()
|
|
|
+ */
|
|
|
+#define ROAD_CPATH (1<<2)
|
|
|
+
|
|
|
+
|
|
|
+/** Function to get the object id of the <em>Lane path</em> of a <em>Lane</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] laneObjId Object id of the <em>Lane</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Lane path</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadPathGetPathObjIdsFromParent()
|
|
|
+ */
|
|
|
+tObjId RoadLaneGetLanePathObjId (tRoad *road, tObjId laneObjId);
|
|
|
+/** Function to get the object ids of all <em>Paths</em> of a certain type
|
|
|
+ * running on a given root object\n
|
|
|
+ * The root object of an object is always a <em>Link</em> or a
|
|
|
+ * <em>Junction</em>.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] parentObjId Object id of the root object
|
|
|
+ * \param[in] mask Mask for the path types that should be considered:\n
|
|
|
+ * The binary system is used to generate combinations of the macros
|
|
|
+ * #ROAD_CPATH, #ROAD_UPATH and #ROAD_LPATH.
|
|
|
+ * \param[out] objIds Pointer to an array for the object ids of the
|
|
|
+ * <em>Paths</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadLaneGetLanePathObjId()
|
|
|
+ */
|
|
|
+int RoadPathGetPathObjIdsFromParent(tRoad *road, tObjId parentObjId,
|
|
|
+ int mask, tObjId **objIds);
|
|
|
+/** Function to get the object id of the <em>Reference line</em> a given
|
|
|
+ * <em>Connector path</em> on a <em>Junction</em> runs along
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] pathObjId Object id of the <em>Connector path</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> Object id of the <em>Reference line</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+tObjId RoadPathGetTrajectoryRefLine (tRoad *road, tObjId pathObjId);
|
|
|
+
|
|
|
+
|
|
|
+/*** Vehicle classes ***/
|
|
|
+
|
|
|
+/** Vehicle class car:\n
|
|
|
+ * Flag indicating that cars are allowed on a <em>Path</em>.
|
|
|
+ * \see tRoadPath \see tRoadConPath
|
|
|
+ */
|
|
|
+#define ROAD_VC_CAR (1<<0)
|
|
|
+/** Vehicle class truck:\n
|
|
|
+ * Flag indicating that trucks are allowed on a <em>Path</em>.
|
|
|
+ * \see tRoadPath \see tRoadConPath
|
|
|
+ */
|
|
|
+#define ROAD_VC_TRUCK (1<<1)
|
|
|
+/** Vehicle class bus:\n
|
|
|
+ * Flag indicating that busses are allowed on a <em>Path</em>.
|
|
|
+ * \see tRoadPath \see tRoadConPath
|
|
|
+ */
|
|
|
+#define ROAD_VC_BUS (1<<2)
|
|
|
+/** Vehicle class motorcycle:\n
|
|
|
+ * Flag indicating that motorcycles are allowed on a <em>Path</em>.
|
|
|
+ * \see tRoadPath \see tRoadConPath
|
|
|
+ */
|
|
|
+#define ROAD_VC_MCYCLE (1<<3)
|
|
|
+/** Vehicle class bicycles:\n
|
|
|
+ * Flag indicating that bicycles are allowed on a <em>Path</em>.
|
|
|
+ * \see tRoadPath \see tRoadConPath
|
|
|
+ */
|
|
|
+#define ROAD_VC_BICYCLE (1<<4)
|
|
|
+
|
|
|
+/** All vehicle classes:\n
|
|
|
+ * Flag indicating that all vehicle classes are allowed on a <em>Path</em>.
|
|
|
+ * \see tRoadPath \see tRoadConPath
|
|
|
+ */
|
|
|
+#define ROAD_VC_ALL (ROAD_VC_CAR | ROAD_VC_TRUCK | ROAD_VC_BUS | ROAD_VC_MCYCLE | ROAD_VC_BICYCLE)
|
|
|
+
|
|
|
+//! Path IO
|
|
|
+/** Struct for the parameters of a <em>Path</em> merging with or splitting off
|
|
|
+ * from another <em>Path</em>
|
|
|
+ * \note This struct is READ ONLY!
|
|
|
+ * \see tRoadPathIOList
|
|
|
+ */
|
|
|
+typedef struct tRoadPathIO {
|
|
|
+ tRoadPath *path; /**< Pointer to a struct with the parameters
|
|
|
+ * describing the in- or out-path
|
|
|
+ */
|
|
|
+ double sPath; /**< Offset on the considered <em>Path</em>
|
|
|
+ * where the other <em>\ref tRoadPathIO::path
|
|
|
+ * "Path"</em> enters or leaves it
|
|
|
+ */
|
|
|
+} tRoadPathIO;
|
|
|
+//! Path IO list
|
|
|
+/** Struct for the parameters of a list of <em>Paths</em> merging with or
|
|
|
+ * splitting off from another <em>Path</em>
|
|
|
+ * \note This struct is READ ONLY!
|
|
|
+ * \see tRoadPath
|
|
|
+ */
|
|
|
+typedef struct tRoadPathIOList {
|
|
|
+ int n; /**< Number of the in- and out-paths listed
|
|
|
+ */
|
|
|
+ tRoadPathIO *list; /**< List of the in- and out-paths
|
|
|
+ */
|
|
|
+} tRoadPathIOList;
|
|
|
+//! Path
|
|
|
+/** Struct for the parameters of a <em>Path</em>
|
|
|
+ * \note This struct is READ ONLY!
|
|
|
+ * \see RoadGetRoadPathByObjId()
|
|
|
+ */
|
|
|
+struct tRoadPath {
|
|
|
+ double lenOnRef; /**< Length of the <em>Path's</em> projection
|
|
|
+ * on the <em>Reference line</em> in meters
|
|
|
+ */
|
|
|
+ double len; /**< Real length of the <em>Path</em>
|
|
|
+ * in meters
|
|
|
+ * \warning Not fully supported yet! If the
|
|
|
+ * <em>Path</em> is defined on a
|
|
|
+ * <em>Link</em>, this parameter is simply set
|
|
|
+ * to \ref tRoadPath::lenOnRef "lenOnRef".
|
|
|
+ */
|
|
|
+ double wf; /**< Weight factor: Attribute for autonomous
|
|
|
+ * traffic\n
|
|
|
+ * Higher weight factors will result in a
|
|
|
+ * higher probability that this <em>Path</em>
|
|
|
+ * will be used. A <em>Path</em> with a weight
|
|
|
+ * factor < = 0 will not be used by
|
|
|
+ * IPGTraffic.
|
|
|
+ */
|
|
|
+ double pL; /**< Probability for a lane change to the
|
|
|
+ * left: Attribute for autonomous traffic.
|
|
|
+ */
|
|
|
+ double pR; /**< Probability for a lane change to the
|
|
|
+ * right: Attribute for autonomous traffic.
|
|
|
+ */
|
|
|
+ double xyz0[3]; /**< Position of the start point of the
|
|
|
+ * <em>Path</em> in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double xyz1[3]; /**< Position of the end point of the
|
|
|
+ * <em>Path</em> in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double suv0[2]; /**< Longitudinal unit vector at the start:\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Path</em> in global coordinates
|
|
|
+ */
|
|
|
+ double suv1[2]; /**< Longitudinal unit vector at the end:\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Path</em> in global coordinates
|
|
|
+ */
|
|
|
+ tObjId objId; /**< Object id of the <em>Path</em>
|
|
|
+ */
|
|
|
+ tObjId rootObjId; /**< Object id of the root object of the
|
|
|
+ * <em>Path</em>
|
|
|
+ * (<em>Junction</em> or <em>Link</em>)
|
|
|
+ */
|
|
|
+ int inRefDir; /**< Flag indicating whether the <em>Path</em>
|
|
|
+ * runs in the direction of the <em>Reference
|
|
|
+ * line</em>:
|
|
|
+ * - -1 ↔ counter reference line
|
|
|
+ * direction
|
|
|
+ * - 1 ↔ in reference line direction
|
|
|
+ */
|
|
|
+ int vhclClass; /**< Vehicle classes allowed to use the
|
|
|
+ * <em>Path</em>:\n
|
|
|
+ * The binary system is used to generate
|
|
|
+ * combinations of the vehicle classes
|
|
|
+ * #ROAD_VC_CAR, #ROAD_VC_TRUCK, #ROAD_VC_BUS,
|
|
|
+ * #ROAD_VC_MCYCLE and #ROAD_VC_BICYCLE
|
|
|
+ * (special macro: #ROAD_VC_ALL).
|
|
|
+ */
|
|
|
+ tRoadObjectType pathType; /**< Type of the <em>Path</em>
|
|
|
+ */
|
|
|
+ int nDrv; /**< Number of drivable and non-drivable
|
|
|
+ * sections of the <em>Path</em>
|
|
|
+ * \note Only used for <em>Lane paths</em>: In
|
|
|
+ * case the width of a <em>Lane</em> falls
|
|
|
+ * below its <em>Path width limit</em>, this
|
|
|
+ * section of the <em>Lane</em> is marked as
|
|
|
+ * non-drivable. For <em>User</em> and
|
|
|
+ * <em>Connector paths</em> the parameter is
|
|
|
+ * set to 0.
|
|
|
+ */
|
|
|
+ int startsWithDrv;/**< Flag indicating whether the <em>Path</em>
|
|
|
+ * starts with a drivable section:
|
|
|
+ * - 0 ↔ non-drivable section at the
|
|
|
+ * <em>Path's</em> start
|
|
|
+ * - 1 ↔ drivable section at the
|
|
|
+ * <em>Path's</em> start
|
|
|
+ *
|
|
|
+ * \note Only used for <em>Lane paths</em>: In
|
|
|
+ * case the width of a <em>Lane</em> falls
|
|
|
+ * below its <em>Path width limit</em>, this
|
|
|
+ * section of the <em>Lane</em> is marked as
|
|
|
+ * non-drivable. For <em>User</em> and
|
|
|
+ * <em>Connector paths</em> the parameter is
|
|
|
+ * set to -1.
|
|
|
+ */
|
|
|
+ double *sDrv; /**< Array with the start offsets of all
|
|
|
+ * drivable and non-drivable sections on the
|
|
|
+ * <em>Path</em>
|
|
|
+ * \note Only used for <em>Lane paths</em>: In
|
|
|
+ * case the width of a <em>Lane</em> falls
|
|
|
+ * below its <em>Path width limit</em>, this
|
|
|
+ * section of the <em>Lane</em> is marked as
|
|
|
+ * non-drivable. For <em>User</em> and
|
|
|
+ * <em>Connector paths</em> the parameter is
|
|
|
+ * set to NULL.
|
|
|
+ */
|
|
|
+ tSpline2D *pathXY; /**< Currently unused:
|
|
|
+ * Reserved for future use.
|
|
|
+ */
|
|
|
+ tRoadPath *left; /**< Pointer to a struct for the <em>Path</em>
|
|
|
+ * left of the considered one
|
|
|
+ */
|
|
|
+ tRoadPath *right; /**< Pointer to a struct for the <em>Path</em>
|
|
|
+ * right of the considered one
|
|
|
+ */
|
|
|
+ tRoadPathIOList in; /**< List of all <em>Paths</em> merging with
|
|
|
+ * the considered <em>Path</em>
|
|
|
+ */
|
|
|
+ tRoadPathIOList out; /**< List of all <em>Paths</em> splitting from
|
|
|
+ * the considered <em>Path</em>
|
|
|
+ */
|
|
|
+};
|
|
|
+
|
|
|
+/** Function to get a <em>Path</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] pathObjId Object id of the <em>Path</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to the <em>Path</em>\n
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+tRoadPath *RoadGetRoadPathByObjId(tRoad *road, tObjId pathObjId);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to check whether a given <em>Path</em> runs in or counter link
|
|
|
+ * direction
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] pathObjId Object id of the <em>Path</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> flag indicating the direction of the <em>Path</em>: <tr><td><td>
|
|
|
+ * - -1 ↔ counter link direction
|
|
|
+ * - 1 ↔ in link direction\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> possible error codes: <tr><td><td>
|
|
|
+ * - 0 ↔ invalid pathObjId or given pathObjId does not belong to a path
|
|
|
+ * object
|
|
|
+ * - -151 ↔ using a rd5 file with an old route definition\n
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadPathGetInLinkDir(tRoad *road, tObjId pathObjId);
|
|
|
+/** Function delivering the distances between a given position on a
|
|
|
+ * <em>Path</em> and the next and the last <em>Junction</em> or <em>Link</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] pathObjId Object id of the <em>Path</em>
|
|
|
+ * \param[in] sPath Offset of the given position on the <em>Path</em>
|
|
|
+ * \param[out] dist2last
|
|
|
+ * - <em>Path</em> on <em>Link</em>: Distance to the last <em>Junction</em>
|
|
|
+ * - <em>Path</em> on <em>Junction</em>: Distance to the last <em>Link</em>
|
|
|
+ * \param[out] dist2next
|
|
|
+ * - <em>Path</em> on <em>Link</em>: Distance to the next <em>Junction</em>
|
|
|
+ * - <em>Path</em> on <em>Junction</em>: Distance to the next <em>Link</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadPathGetDistances(tRoad *road, tObjId pathObjId,
|
|
|
+ double sPath, double *dist2last, double *dist2next);
|
|
|
+
|
|
|
+//! Path evaluation: input
|
|
|
+/** Struct for the input parameters of RoadPathGeoEval()\n
|
|
|
+ * \note See \ref tRoadInType "input options".
|
|
|
+ */
|
|
|
+typedef struct tRoadPathIn {
|
|
|
+ double st[2]; /**< Given position in the <em>Path's</em>
|
|
|
+ * local coordinate system
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ tObjId actObjId; /**< Object id of the current <em>Path</em>
|
|
|
+ */
|
|
|
+ tObjId nextObjId; /**< Object id of the next <em>Path</em>
|
|
|
+ */
|
|
|
+} tRoadPathIn;
|
|
|
+//! Path evaluation: output
|
|
|
+/** Struct for the output parameters of RoadPathGeoEval()
|
|
|
+ */
|
|
|
+typedef struct tRoadPathOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz":\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Path</em>
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz":\n
|
|
|
+ * Unit vector in t-direction of the
|
|
|
+ * <em>Path</em>
|
|
|
+ */
|
|
|
+ double st[2]; /**< Calculated position in the <em>Path's
|
|
|
+ * </em> local coordinate system
|
|
|
+ */
|
|
|
+ double sOnRef; /**< Projection of the \ref tRoadPathOut::st
|
|
|
+ * "s-coordinate" on the <em>Reference line
|
|
|
+ * </em>
|
|
|
+ */
|
|
|
+ double pathT; /**< Lateral offset from the <em>Reference
|
|
|
+ * line</em> at \ref tRoadPathOut::st "s"
|
|
|
+ * \note The sign of the variable refers to
|
|
|
+ * the <em>Path's</em> direction, not to the
|
|
|
+ * direction of the <em>Reference line</em>.
|
|
|
+ * \note This parameter is only valid in case
|
|
|
+ * the <em>Path's</em> root object is a
|
|
|
+ * <em>Link</em>.
|
|
|
+ */
|
|
|
+ double pathDT; /**< Derivation of the lateral offset from the
|
|
|
+ * <em>Reference line</em> with respect to the
|
|
|
+ * t-coordinate at \ref tRoadPathOut::st "s"
|
|
|
+ * \note This parameter is only valid in case
|
|
|
+ * the <em>Path's</em> root object is a
|
|
|
+ * <em>Link</em>.
|
|
|
+ */
|
|
|
+ double curveXY; /**< Curvature of the curve in the (x,y)-plane
|
|
|
+ * at \ref tRoadPathIn::xyz "xyz"
|
|
|
+ */
|
|
|
+ double width[2]; /**< Width of the <em>Path</em> at \ref
|
|
|
+ * tRoadPathOut::st "s" left/right in meters\n
|
|
|
+ * For <em>Lane paths</em> the width of the
|
|
|
+ * associated <em>Lane</em>
|
|
|
+ * is divided in half, for <em>Connector</em>
|
|
|
+ * or <em>User paths</em> the path width is
|
|
|
+ * used.
|
|
|
+ * \note There are special values for the
|
|
|
+ * width of <em>Connector</em> and <em>User
|
|
|
+ * paths</em>:
|
|
|
+ * - -2 ↔ The distance to the left/right
|
|
|
+ * road border is used (only valid on a
|
|
|
+ * <em>Link</em>).
|
|
|
+ * - -1 ↔ The width of the associated
|
|
|
+ * <em>Lane</em> is used.
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * \name
|
|
|
+ * The following output variables do not consider <em>Bumps</em>.
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/* --- The following outputs do not consider Bumps ---------------- */
|
|
|
+ double grade; /**< Longitudinal gradient at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in s-direction
|
|
|
+ * of the <em>Path</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double slope; /**< Lateral gradient at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in t-direction
|
|
|
+ * of the <em>Path</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double curveZ; /**< Longitudinal z-curvature at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz":\n
|
|
|
+ * Curvature of the curve in the (s,z)-plane
|
|
|
+ * (change of \ref tRoadPathOut::grade
|
|
|
+ * "grade" in s-direction of the
|
|
|
+ * <em>Path</em>)
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+/** @} */
|
|
|
+
|
|
|
+/* ---------------------------------------------------------------- */
|
|
|
+ double fric; /**< Friction coefficient at
|
|
|
+ * \ref tRoadPathOut::xyz "xyz"\note
|
|
|
+ * <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double nextDist; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * distance to the next junction entry
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * distance to the next <em>Link</em>
|
|
|
+ */
|
|
|
+ double lastDist; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * distance to the last junction entry
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * distance to the last <em>Link</em>
|
|
|
+ */
|
|
|
+ int onJunction; /**< Flag indicating whether
|
|
|
+ * \ref tRoadPathOut::xyz "xyz" is on a
|
|
|
+ * <em>Link</em> or on a <em>Junction</em>:
|
|
|
+ * - 0 ↔ <em>Link</em>
|
|
|
+ * - 1 ↔ <em>Junction</em>\n
|
|
|
+ */
|
|
|
+ tObjId linkObjId; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * object id of the current <em>Link</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * object id of the last <em>Link</em>
|
|
|
+ */
|
|
|
+ tObjId juncObjId; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * object id of the last <em>Junction</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * object id of the current <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId nextJuncObjId;/**< Object id of the next <em>Junction</em>
|
|
|
+ * \note Set to #ROAD_InvalidObjId if \ref
|
|
|
+ * tRoadPathOut::xyz "xyz" is \ref
|
|
|
+ * tRoadPathOut::onJunction "on a Junction".
|
|
|
+ */
|
|
|
+ tRoadLaneOutExt lanes; /**< Struct with the <em>Lanes</em> defined
|
|
|
+ * at the calculated \ref tRoadPathOut::st
|
|
|
+ * "s-offset"
|
|
|
+ */
|
|
|
+ tRoadPath *path; /**< Pointer to a struct with the parameters
|
|
|
+ * of the <em>Path</em>
|
|
|
+ */
|
|
|
+} tRoadPathOut;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Path</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] it Input type describing which variables of <b>in</b> are used
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadPathGeoEval(tRoadEval *re, const char *errMsgPre, tRoadInType it,
|
|
|
+ const tRoadPathIn *in, tRoadPathOut *out);
|
|
|
+
|
|
|
+//! Path speed evaluation: input
|
|
|
+/** Struct for the input parameters of RoadPathGetSpeed()
|
|
|
+ */
|
|
|
+typedef struct tRoadPathSpeedIn {
|
|
|
+ tObjId *objId; /**< List of the object ids of all <em>Paths</em>
|
|
|
+ * belonging to the <em>Driving path</em> starting with
|
|
|
+ * the current <em>Path</em>
|
|
|
+ * \note The last entry has to be a negative value.
|
|
|
+ */
|
|
|
+ double sOnRef; /**< Offset in s-direction on the <em>Reference
|
|
|
+ * line</em> relative to the current
|
|
|
+ * <em>Path's</em> start where the search for speed
|
|
|
+ * limits is started
|
|
|
+ */
|
|
|
+ double range; /**< Range in s-direction on the <em>Reference lines
|
|
|
+ * </em> along the <em>Paths</em> where it is searched
|
|
|
+ * for speed limits
|
|
|
+ */
|
|
|
+} tRoadPathSpeedIn;
|
|
|
+//! Path speed evaluation: output
|
|
|
+/** Struct for the output parameters of RoadPathGetSpeed()
|
|
|
+ * \see tRoadSpeedOut()
|
|
|
+ */
|
|
|
+typedef struct tRoadPathSpeedOut {
|
|
|
+ double speed; /**< Speed limit in m/s
|
|
|
+ */
|
|
|
+ double sOnRefOff; /**< Offset of the speed limit in s-direction on
|
|
|
+ * the <em>Reference lines</em> along the
|
|
|
+ * <em>Paths</em> relative to the
|
|
|
+ * \ref tRoadPathSpeedIn::sOnRef
|
|
|
+ * "input offset"
|
|
|
+ */
|
|
|
+} tRoadPathSpeedOut;
|
|
|
+
|
|
|
+/** Function to get the next three speed limits of the <em>Paths</em> of a given
|
|
|
+ * <em>Driving path</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Array of structs for the parameters of the three next speed
|
|
|
+ * sections
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found speed sections (at most three)
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteGetSpeed() \see RoadPathGetTrfLights()
|
|
|
+ */
|
|
|
+int RoadPathGetSpeed(tRoad *road,
|
|
|
+ tRoadPathSpeedIn *in , tRoadPathSpeedOut out[3]);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to get the actual wind speed and angle on a <em>Path</em> at a
|
|
|
+ * given offset in s-direction
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] pathObjId Object id of the <em>Path</em>
|
|
|
+ * \param[in] sPath Offset of the given position on the <em>Path</em>
|
|
|
+ * \param[out] wind Pointer to a struct for the parameters of the
|
|
|
+ * <em>Marker</em> of type <em>Wind</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadPathGetWind (tRoad *road, tObjId pathObjId, double sPath,
|
|
|
+ tRM_Wind *wind);
|
|
|
+
|
|
|
+/** Function to get the actual values of a marker on a <em>Path</em> at a
|
|
|
+ * given offset in s-direction. This function works only for markers with a an
|
|
|
+ * extension, e.g. RMT_DrvSpeed, RMT_EnvWind and UserDefined markers
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] pathObjId Object id of the <em>Path</em>
|
|
|
+ * \param[in] sPath Offset of the given position on the <em>Path</em>
|
|
|
+ * \param[in] type Type of the <em>Marker</em> \see RoadGetMarkerType()
|
|
|
+ * \param[out] valid Flag indicating if the marker is valid at the position
|
|
|
+ * given by <em>sPath</em>
|
|
|
+ * \param[out] marker Void pointer to a struct for the parameters of the
|
|
|
+ * <em>Marker</em> depending on the marker type
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadPathGetMarker (tRoad *road, tObjId pathObjId, double sPath, int type,
|
|
|
+ int *valid, void *marker);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Routes +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup RoutesEval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to get the object id of a certain <em>Route</em> from its internal
|
|
|
+ * identifier
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjIdGetRouteId()
|
|
|
+ */
|
|
|
+tObjId RoadRouteIdGetRouteObjId(tRoad *road, int routeId);
|
|
|
+/** Function to get the identifier of a certain <em>Route</em> from its object id
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeObjId Object id of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadObjIdGetInternalId() \see RoadRouteIdGetRouteObjId()
|
|
|
+ */
|
|
|
+int RoadRouteObjIdGetRouteId(tRoad *road, tObjId routeObjId);
|
|
|
+/** Function to get the object ids of all <em>Routes</em> of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[out] objIds Pointer to an array for the object ids of the
|
|
|
+ * <em>Routes</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Routes</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadRouteGetRouteObjIds (tRoad *road, tObjId **objIds);
|
|
|
+
|
|
|
+/** Function to get the name of a given <em>Route</em>\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> name of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteGetNameByObjId() to get the name of a given
|
|
|
+ * <em>Route</em>.
|
|
|
+ */
|
|
|
+char* RoadRouteGetNameById (tRoad *road, int routeId);
|
|
|
+/** Function to get the name of a given <em>Route</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> name of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjSetName() \see RoadRouteGetObjIdByName()
|
|
|
+ */
|
|
|
+char* RoadRouteGetNameByObjId(tRoad *road, tObjId rObjId);
|
|
|
+/** Function to get the internal identifier of a certain <em>Route</em> from its
|
|
|
+ * name
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] name Name of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> identifier of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteGetObjIdByName() to get the object id of a certain
|
|
|
+ * <em>Route</em> from its name.
|
|
|
+ */
|
|
|
+int RoadRouteGetIdByName (tRoad *road, const char *name);
|
|
|
+/** Function to get the object id of a certain <em>Route</em> from its name
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] name Name of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjSetName() \see RoadRouteGetNameByObjId()
|
|
|
+ */
|
|
|
+tObjId RoadRouteGetObjIdByName(tRoad *road, const char *name);
|
|
|
+/** Function to set the name of a <em>Route</em>\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[in] name Name of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjSetName() to set the name of a <em>Route</em>.
|
|
|
+ */
|
|
|
+int RoadRouteSetName (tRoad *road, int routeId, const char *name);
|
|
|
+/** Function to set the name of a <em>Route</em>
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] name Name of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteGetNameByObjId()
|
|
|
+ */
|
|
|
+int RoadRouteObjSetName (tRoad *road, tObjId rObjId, const char *name);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to get the length of a given <em>Route</em>\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> length of the <em>Route</em> in meters
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetLength() to get the length of a given
|
|
|
+ * <em>Route</em>.
|
|
|
+ */
|
|
|
+double RoadRouteGetLength (tRoad *road, int routeId);
|
|
|
+/** Function to get the length of a given <em>Route</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> length of the <em>Route</em> in meters
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteGetWidth() \see RoadRouteGetBorderT()
|
|
|
+ */
|
|
|
+double RoadRouteObjGetLength(tRoad *road, tObjId rObjId);
|
|
|
+
|
|
|
+/** Function to get the width at a certain offset of a <em>Route</em>\n
|
|
|
+ * The <em>Route</em> \ref RoadEvalSetRouteByObjId "stored" in the road
|
|
|
+ * evaluation handle is used.
|
|
|
+ * \param[in] re Evaluation handle of the instance of the road
|
|
|
+ * \param[in] s Offset given in the <em>Route's</em> coordinate system
|
|
|
+ * \param[out] width Width of the <em>Route</em> or the <em>Path</em> left/right
|
|
|
+ * at <b>s</b> in meters\n
|
|
|
+ * Depending on the \ref RoadEvalSetRouteByObjId "output mask" of the road
|
|
|
+ * evaluation handle either the <em>Route</em> or the <em>Path</em> are used as
|
|
|
+ * reference:
|
|
|
+ * - <em>Route</em>: The distance between the left/right road border and the
|
|
|
+ * <em>Center line</em> is calculated.\n
|
|
|
+ * <b>Note:</b> Only valid if the given position is not on a Junction.
|
|
|
+ * - <em>Path</em>: For <em>Lane paths</em> the width of the associated
|
|
|
+ * <em>Lane</em> is divided in half, for <em>Connector</em> or <em>User
|
|
|
+ * paths</em> the path width is used.\n
|
|
|
+ * <b>Note:</b> There are special values for the width of <em>Connector</em> and
|
|
|
+ * <em>User paths</em>:
|
|
|
+ * - -2 ↔ The distance to the left/right road border is used
|
|
|
+ * (only valid on a <em>Link</em>).
|
|
|
+ * - -1 ↔ The width of the associated <em>Lane</em> is used.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjGetLength() \see RoadRouteGetBorderT()
|
|
|
+ */
|
|
|
+int RoadRouteGetWidth (tRoadEval *re, double s, double width[2]);
|
|
|
+/** Function to get the lateral offset to the road border at a certain offset
|
|
|
+ * of a <em>Route</em>\n
|
|
|
+ * The <em>Route</em> \ref RoadEvalSetRouteByObjId "stored" in the road
|
|
|
+ * evaluation handle is used.
|
|
|
+ * \param[in] re Evaluation handle of the instance of the road
|
|
|
+ * \param[in] s Offset given in the <em>Route's</em> coordinate system
|
|
|
+ * \param[out] t Lateral offset of the left/right road border from the
|
|
|
+ * <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjGetLength() \see RoadRouteGetWidth()
|
|
|
+ */
|
|
|
+int RoadRouteGetBorderT(tRoadEval *re, double s, double t[2]);
|
|
|
+
|
|
|
+/** Function to check whether a given <em>Route</em> is closed and in that case
|
|
|
+ * get the loop's start offset and length\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[out] start Start of the loop
|
|
|
+ * \param[out] length Length of the loop
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> flag indicating whether the <em>Route</em> is closed:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - 0 ↔ The <em>Route</em> is not closed.
|
|
|
+ * - 1 ↔ The <em>Route</em> is closed.
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjClosed() to check whether a given <em>Route</em>
|
|
|
+ * is closed.
|
|
|
+ */
|
|
|
+int RoadRouteClosed (tRoad *road, int routeId, double *start,
|
|
|
+ double *length);
|
|
|
+/** Function to check whether a given <em>Route</em> is closed and in that case
|
|
|
+ * get the loop's start offset and length
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[out] start Start of the loop
|
|
|
+ * \param[out] length Length of the loop
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> flag indicating whether the <em>Route</em> is closed:
|
|
|
+ * <tr><td><td>
|
|
|
+ * - 0 ↔ The <em>Route</em> is not closed.
|
|
|
+ * - 1 ↔ The <em>Route</em> is closed.
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadRouteObjClosed(tRoad *road, tObjId rObjId, double *start,
|
|
|
+ double *length);
|
|
|
+
|
|
|
+/** Function to get the object id of the <em>Driving path</em> corresponding to
|
|
|
+ * a given <em>Route</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeObjId Object id of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the <em>Driving path</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+tObjId RoadRouteGetDrvPathObjId(tRoad *road, tObjId routeObjId);
|
|
|
+/** Function to get a list of the <em>Paths</em> belonging to a given driving
|
|
|
+ * path
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] drvPathObjId Object id of the <em>Driving path</em>
|
|
|
+ * \param[out] objIds Pointer to an array for the object ids of the
|
|
|
+ * <em>Paths</em>
|
|
|
+ * \param[out] s0 Pointer to an array for the offsets on the <em>Paths</em>
|
|
|
+ * where they become part of the <em>Driving path</em>
|
|
|
+ * \param[out] s1 Pointer to an array for the offsets on the <em>Paths</em>
|
|
|
+ * where they cease to be part of the <em>Driving path</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Paths</em> belonging to the <em>Driving path</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadDrvPathGetPathList (tRoad *road, tObjId drvPathObjId,
|
|
|
+ tObjId **objIds, double **s0, double **s1);
|
|
|
+
|
|
|
+/** Function to get the number of <em>Links</em> a given <em>Route</em> runs
|
|
|
+ * along\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Links</em> the <em>Route</em> runs along
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetLinkCount() to get the number of
|
|
|
+ * <em>Links</em> a given <em>Route</em> runs along.
|
|
|
+ */
|
|
|
+int RoadRouteGetNumOfLinks (tRoad *road, int routeId);
|
|
|
+/** Function to get the number of <em>Links</em> a given <em>Route</em> runs
|
|
|
+ * along\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Links</em> the <em>Route</em> runs along
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetLinkCount() to get the number of
|
|
|
+ * <em>Links</em> a given <em>Route</em> runs along.
|
|
|
+ */
|
|
|
+int RoadRouteGetLinkCount (tRoad *road, int routeId);
|
|
|
+/** Function to get the number of <em>Links</em> a given <em>Route</em> runs
|
|
|
+ * along
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Links</em> the <em>Route</em> runs along
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjGetJuncCount() \see RoadRouteObjGetLinkList()
|
|
|
+ */
|
|
|
+int RoadRouteObjGetLinkCount(tRoad *road, tObjId rObjId);
|
|
|
+/** Function to get the number of <em>Junctions</em> a given <em>Route</em>
|
|
|
+ * runs through\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Junctions</em> the <em>Route</em> runs through
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetJuncCount() to get the number of
|
|
|
+ * <em>Junctions</em> a given <em>Route</em> runs through.
|
|
|
+ */
|
|
|
+int RoadRouteGetJuncCount (tRoad *road, int routeId);
|
|
|
+/** Function to get the number of <em>Junctions</em> a given <em>Route</em>
|
|
|
+ * runs through
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Junctions</em> the <em>Route</em> runs through
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjGetLinkCount() \see RoadRouteObjGetJuncList()
|
|
|
+ */
|
|
|
+int RoadRouteObjGetJuncCount(tRoad *road, tObjId rObjId);
|
|
|
+
|
|
|
+//! Link with regard to a Route
|
|
|
+/** Struct for the parameters describing how a <em>Route</em> runs along a
|
|
|
+ * <em>Link</em>\n
|
|
|
+ * \see RoadRouteObjGetLinkList()
|
|
|
+ * \see tRoadRouteJunc \see tRoadRouteLanes
|
|
|
+ */
|
|
|
+typedef struct tRoadRouteLink {
|
|
|
+ int isInDir;/**< Flag indicating whether the <em>Route</em> runs
|
|
|
+ * in the same direction as the <em>Link</em>:
|
|
|
+ * - 0 ↔ counter link direction
|
|
|
+ * - 1 ↔ in link direction
|
|
|
+ */
|
|
|
+ double s0; /**< Offset of the <em>Link's</em> start
|
|
|
+ * (junction entry) on the <em>Route</em>\n
|
|
|
+ * Negative values indicate that the <em>Route</em>
|
|
|
+ * starts within the <em>Link</em>.
|
|
|
+ */
|
|
|
+ double s1; /**< Offset of the <em>Link's</em> end
|
|
|
+ * (junction entry) on the <em>Route</em>\n
|
|
|
+ * Negative values indicate that the <em>Route</em>
|
|
|
+ * ends within the <em>Link</em>.
|
|
|
+ */
|
|
|
+ tRoadLinkInfo info; /**< Struct with information about the <em>Link</em>
|
|
|
+ */
|
|
|
+} tRoadRouteLink;
|
|
|
+
|
|
|
+/** Function delivering a list of the <em>Links</em> a given <em>Route</em> runs
|
|
|
+ * along\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \note The user is responsible to free the memory allocated by this function.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[out] link Pointer to a list of the <em>Links</em> the <em>Route</em>
|
|
|
+ * runs along
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Links</em> the <em>Route</em> runs along
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetLinkList() to get a list of the <em>Links</em>
|
|
|
+ * a given <em>Route</em> runs along.
|
|
|
+ */
|
|
|
+int RoadRouteGetLinkList (tRoad *road, int routeId, tRoadRouteLink **link);
|
|
|
+/** Function delivering a list of the <em>Links</em> a given <em>Route</em> runs
|
|
|
+ * along
|
|
|
+ * \note The user is responsible to free the memory allocated by this function.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[out] link Pointer to a list of the <em>Links</em> the <em>Route</em>
|
|
|
+ * runs along
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Links</em> the <em>Route</em> runs along
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadAddRouteByLinkList() \see RoadRouteObjGetJuncList()
|
|
|
+ * \see RoadRouteObjGetLinkCount()
|
|
|
+ */
|
|
|
+int RoadRouteObjGetLinkList(tRoad *road, tObjId rObjId,
|
|
|
+ tRoadRouteLink **link);
|
|
|
+/** Function to add a new <em>Route</em> given by a list of the <em>Links</em>
|
|
|
+ * it runs along
|
|
|
+ * \param[in,out] road Handle of the road instance
|
|
|
+ * \param[in] addPath Currently unused: Reserved for future use.
|
|
|
+ * \param[in] link List of <em>Links</em> defining the new <em>Route</em>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> object id of the new <em>Route</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjGetLinkList()
|
|
|
+ */
|
|
|
+tObjId RoadAddRouteByLinkList (tRoad *road, int addPath, tRoadRouteLink **link);
|
|
|
+
|
|
|
+//! Junction with regard to a Route
|
|
|
+/** Struct for the parameters describing a <em>Route's</em> way through a
|
|
|
+ * <em>Junction</em>
|
|
|
+ * \see RoadRouteObjGetJuncList()
|
|
|
+ * \see tRoadRouteLink \see tRoadRouteLanes
|
|
|
+ */
|
|
|
+typedef struct tRoadRouteJunc {
|
|
|
+ tRoadJuncInfo info; /**< Struct with information about the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId jArmObjIdIn; /**< Object id of the <em>Junction arm</em>
|
|
|
+ * the <em>Route</em> follows into the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId jArmObjIdOut; /**< Object id of the <em>Junction arm</em>
|
|
|
+ * the <em>Route</em> follows out of the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId lObjIdIn; /**< Object id of the <em>Link</em> the
|
|
|
+ * <em>Route</em> follows into the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ tObjId lObjIdOut; /**< Object id of the <em>Link</em> the
|
|
|
+ * <em>Route</em> follows out of the
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+} tRoadRouteJunc;
|
|
|
+
|
|
|
+/** Function delivering a list of the <em>Junctions</em> a given <em>Route</em>
|
|
|
+ * runs through\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \note The user is responsible to free the memory allocated by this function.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[out] junc Pointer to a list of the <em>Junctions</em> the
|
|
|
+ * <em>Route</em> runs through
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Junctions</em> the <em>Route</em> runs through
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetJuncList() to get a list of the
|
|
|
+ * <em>Junctions</em> a given <em>Route</em> runs through.
|
|
|
+ */
|
|
|
+int RoadRouteGetJuncList (tRoad *road, int routeId, tRoadRouteJunc **junc);
|
|
|
+/** Function to get the list of the <em>Junctions</em> a given <em>Route</em>
|
|
|
+ * runs through
|
|
|
+ * \note The user is responsible to free the memory allocated by this function.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[out] junc Pointer to a list of the <em>Junctions</em> the
|
|
|
+ * <em>Route</em> runs through
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Junctions</em> the <em>Route</em> runs through
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteObjGetLinkList() \see RoadRouteObjGetJuncCount()
|
|
|
+ */
|
|
|
+int RoadRouteObjGetJuncList(tRoad *road, tObjId rObjId,
|
|
|
+ tRoadRouteJunc **junc);
|
|
|
+
|
|
|
+//! Lanes with regard to a Route
|
|
|
+/** Struct used to describe the <em>Lanes</em> in tRoadRouteOut
|
|
|
+ * \see tRoadRouteLink \see tRoadRouteJunc
|
|
|
+ */
|
|
|
+typedef struct tRoadRouteLanes {
|
|
|
+ int nLanesL; /**< Number of left <em>Lanes</em>
|
|
|
+ * \note The term "left" refers to the
|
|
|
+ * <em>Route's</em> direction, which can be
|
|
|
+ * either in or counter link direction.
|
|
|
+ */
|
|
|
+ int nLanesR; /**< Number of right <em>Lanes</em> in route
|
|
|
+ * \note The term "right" refers to the
|
|
|
+ * <em>Route's</em> direction, which can be
|
|
|
+ * either in or counter link direction.
|
|
|
+ */
|
|
|
+ int laneIdx; /**< Index of the current <em>Lane</em>
|
|
|
+ * in struct \ref tRoadRouteLanes::left "left"
|
|
|
+ * or \ref tRoadRouteLanes::right "right"
|
|
|
+ */
|
|
|
+ int isRight; /**< Flag indicating the side of the current
|
|
|
+ * <em>Lane</em>:
|
|
|
+ * - 0 ↔ left
|
|
|
+ * - 1 ↔ right
|
|
|
+ *
|
|
|
+ * \note The terms "left" and "right" refer to
|
|
|
+ * the <em>Route's</em> direction, which can be
|
|
|
+ * either in or counter link direction.
|
|
|
+ */
|
|
|
+ struct tRoadRouteLane {
|
|
|
+ double width; /**< Width of the <em>Lane</em> in meters
|
|
|
+ */
|
|
|
+ double tMidLane; /**< Lateral offset of the middle of the
|
|
|
+ * <em>Lane</em> from the <em>Link's</em>
|
|
|
+ * <em>Reference line</em>
|
|
|
+ * \note The sign of the variable refers to the
|
|
|
+ * <em>Route's</em> direction, which can be
|
|
|
+ * either in or counter link direction.
|
|
|
+ */
|
|
|
+ tRoadLaneType type; /**< Type of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ int drvDir; /**< Driving direction of the <em>Lane</em>:
|
|
|
+ * - -1 ↔ contrary to route direction
|
|
|
+ * - 1 ↔ in route direction
|
|
|
+ */
|
|
|
+ int laneId; /**< Internal identifier of the <em>Lane</em>
|
|
|
+ */
|
|
|
+ } left[ROAD_MAX_LANES], /**< Array of structs containing the information
|
|
|
+ * about all left <em>Lanes</em> of the current
|
|
|
+ * <em>Lane section</em>
|
|
|
+ * \note The term "left" refers to the
|
|
|
+ * <em>Route's</em> direction, which can be
|
|
|
+ * either in or counter link direction.
|
|
|
+ */
|
|
|
+ right[ROAD_MAX_LANES]; /**< Array of structs containing the
|
|
|
+ * information about all right <em>Lanes</em>
|
|
|
+ * of the current <em>Lane section</em>
|
|
|
+ * \note The term "right" refers to the
|
|
|
+ * <em>Route's</em> direction, which can be
|
|
|
+ * either in or counter link direction.
|
|
|
+ */
|
|
|
+} tRoadRouteLanes;
|
|
|
+//! Route evaluation: input
|
|
|
+/** Struct for the input parameters of RoadRouteEval() and RoadRouteEvalExt()
|
|
|
+ * \note See \ref tRoadInType "input options".
|
|
|
+ */
|
|
|
+typedef struct tRoadRouteIn {
|
|
|
+ double st[2]; /**< Given position in the <em>Route's</em>
|
|
|
+ * local coordinate system
|
|
|
+ */
|
|
|
+ double xyz[3]; /**< Given position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+} tRoadRouteIn;
|
|
|
+//! Route evaluation: output
|
|
|
+/** Struct for the output parameters of RoadRouteEval()
|
|
|
+ * \note It is recommended to use tRoadRouteOutExt and RoadRouteEvalExt().
|
|
|
+ */
|
|
|
+typedef struct tRoadRouteOut {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz":\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Route</em>
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz":\n
|
|
|
+ * Unit vector in t-direction of the
|
|
|
+ * <em>Route</em>
|
|
|
+ */
|
|
|
+ double st[2]; /**< Calculated position in the <em>Route's</em>
|
|
|
+ * local coordinate system
|
|
|
+ */
|
|
|
+ double curveXY; /**< Curvature of the curve of the
|
|
|
+ * <em>Route</em> or the <em>Path</em> in the
|
|
|
+ * (x,y)-plane at \ref tRoadRouteOut::xyz "xyz"
|
|
|
+ * \note The \ref RoadEvalSetRouteByObjId
|
|
|
+ * "usePath" option is considered.
|
|
|
+ */
|
|
|
+ double width[2]; /**< Width of the <em>Route</em> or the
|
|
|
+ * <em>Path</em> left/right at \ref
|
|
|
+ * tRoadRouteOut::st "s" in meters\n
|
|
|
+ * Depending on the \ref RoadEvalSetRouteByObjId
|
|
|
+ * "output mask" of the road evaluation handle
|
|
|
+ * either the <em>Route</em> or the
|
|
|
+ * <em>Path</em> are used as reference:
|
|
|
+ * - <em>Route</em>: The distance between the
|
|
|
+ * left/right road border and the
|
|
|
+ * <em>Center line</em> is calculated.
|
|
|
+ * \note Only valid if \ref tRoadRouteOut::xyz
|
|
|
+ * "xyz" is not on a Junction.
|
|
|
+ * - <em>Path</em>: For <em>Lane paths</em>
|
|
|
+ * the width of the associated <em>Lane</em>
|
|
|
+ * is divided in half, for <em>Connector</em>
|
|
|
+ * or <em>User paths</em> the path width is
|
|
|
+ * used.
|
|
|
+ * \note There are special values for the
|
|
|
+ * width of <em>Connector</em> and <em>User
|
|
|
+ * paths</em>:
|
|
|
+ * - -2 ↔ The distance to the
|
|
|
+ * left/right road border is used
|
|
|
+ * (only valid on a <em>Link</em>).
|
|
|
+ * - -1 ↔ The width of the associated
|
|
|
+ * <em>Lane</em> is used.
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * \name
|
|
|
+ * The following output variables do not consider <em>Bumps</em>.
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/* --- The following outputs do not consider Bumps ---------------- */
|
|
|
+ double grade; /**< Longitudinal gradient at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in s-direction
|
|
|
+ * of the <em>Route</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double slope; /**< Lateral gradient at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in t-direction
|
|
|
+ * of the <em>Route</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double curveZ; /**< Longitudinal z-curvature at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz":\n
|
|
|
+ * Curvature of the curve in the (s,z)-plane
|
|
|
+ * (change of \ref tRoadRouteOut::grade
|
|
|
+ * "grade" in s-direction of the <em>Route</em>)
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+/** @} */
|
|
|
+
|
|
|
+/* ---------------------------------------------------------------- */
|
|
|
+ double fric; /**< Friction coefficient at
|
|
|
+ * \ref tRoadRouteOut::xyz "xyz"
|
|
|
+ */
|
|
|
+ tRoadRouteLanes lanes; /**< Struct for the information about the
|
|
|
+ * <em>Lanes</em>
|
|
|
+ */
|
|
|
+} tRoadRouteOut;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Route</em>
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] it Input type describing which variables of <b>in</b> are used
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \note It is recommended to use RoadRouteEvalExt().
|
|
|
+ */
|
|
|
+int RoadRouteEval(tRoadEval *re, const char *errMsgPre, tRoadInType it,
|
|
|
+ const tRoadRouteIn *in, tRoadRouteOut *out);
|
|
|
+
|
|
|
+//! Route evaluation: output (extended version)
|
|
|
+/** Struct for the output parameters of RoadRouteEvalExt()\n
|
|
|
+ */
|
|
|
+typedef struct tRoadRouteOutExt {
|
|
|
+ double xyz[3]; /**< Calculated position in the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ */
|
|
|
+ double nuv[3]; /**< Road surface normal unit vector at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz"
|
|
|
+ */
|
|
|
+ double suv[3]; /**< Longitudinal unit vector at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz":\n
|
|
|
+ * Unit vector in s-direction of the
|
|
|
+ * <em>Route</em>
|
|
|
+ */
|
|
|
+ double tuv[3]; /**< Lateral unit vector at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz":\n
|
|
|
+ * Unit vector in t-direction of the
|
|
|
+ * <em>Route</em>
|
|
|
+ */
|
|
|
+ double st[2]; /**< Calculated position in the <em>Route's
|
|
|
+ * </em> local coordinate system
|
|
|
+ */
|
|
|
+ double curveXY; /**< Curvature of the curve of the
|
|
|
+ * <em>Route</em> or the <em>Path</em> in the
|
|
|
+ * (x,y)-plane at \ref tRoadRouteOutExt::xyz
|
|
|
+ * "xyz"
|
|
|
+ * \note The \ref RoadEvalSetRouteByObjId
|
|
|
+ * "usePath" option is considered.
|
|
|
+ */
|
|
|
+ double width[2]; /**< Width of the <em>Route</em> or the
|
|
|
+ * <em>Path</em> left/right at \ref
|
|
|
+ * tRoadRouteOutExt::st "s" in meters\n
|
|
|
+ * Depending on the \ref
|
|
|
+ * RoadEvalSetRouteByObjId "output mask" of
|
|
|
+ * the road evaluation handle either the
|
|
|
+ * <em>Route</em> or the <em>Path</em> are
|
|
|
+ * used as reference:
|
|
|
+ * - <em>Route</em>: The distance between the
|
|
|
+ * left/right road border and the <em>Center
|
|
|
+ * line</em> is calculated.
|
|
|
+ * \note Only valid if
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz" is not
|
|
|
+ * \ref tRoadRouteOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ * - <em>Path</em>: For <em>Lane paths</em>
|
|
|
+ * the width of the associated <em>Lane</em>
|
|
|
+ * is divided in half, for <em>Connector</em>
|
|
|
+ * or <em>User paths</em> the path width is
|
|
|
+ * used.
|
|
|
+ * \note There are special values for the
|
|
|
+ * width of <em>Connector</em> and <em>User
|
|
|
+ * paths</em>:
|
|
|
+ * - -2 ↔ The distance to the
|
|
|
+ * left/right road border is used
|
|
|
+ * (only valid on a <em>Link</em>).
|
|
|
+ * - -1 ↔ The width of the associated
|
|
|
+ * <em>Lane</em> is used.
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * \name
|
|
|
+ * The following output variables do not consider <em>Bumps</em>.
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/* --- The following outputs do not consider Bumps ---------------- */
|
|
|
+ double grade; /**< Longitudinal gradient at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in s-direction
|
|
|
+ * of the <em>Route</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double slope; /**< Lateral gradient at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz":\n
|
|
|
+ * Gradient of the z-coordinate in t-direction
|
|
|
+ * of the <em>Route</em>
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+ double curveZ; /**< Longitudinal z-curvature at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz":\n
|
|
|
+ * Curvature of the curve in the (s,z)-plane
|
|
|
+ * (change of \ref tRoadRouteOutExt::grade
|
|
|
+ * "grade" in s-direction of the
|
|
|
+ * <em>Route</em>).
|
|
|
+ * \note <em>Bumps</em> are not considered.
|
|
|
+ */
|
|
|
+/** @} */
|
|
|
+/* ---------------------------------------------------------------- */
|
|
|
+ double fric; /**< Friction coefficient at
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz"
|
|
|
+ */
|
|
|
+ double pathT; /**< Lateral offset from the <em>Reference
|
|
|
+ * line</em> at \ref tRoadRouteOutExt::st "s"
|
|
|
+ * \note The sign of the variable refers to
|
|
|
+ * the <em>Route's</em> direction, not to the
|
|
|
+ * direction of the <em>Reference line</em>.
|
|
|
+ * \note This parameter is only valid in case
|
|
|
+ * the <em>Route's</em> root object is a
|
|
|
+ * <em>Link</em>.
|
|
|
+ */
|
|
|
+ double nextJuncDist;/**< Distance to the next junction entry
|
|
|
+ */
|
|
|
+ double lastJuncDist;/**< Distance to the last junction entry
|
|
|
+ */
|
|
|
+ double links0; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * Offset of the start (junction entry) of the
|
|
|
+ * current <em>Link</em> on the <em>Route</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * Offset of the start (junction entry) of the
|
|
|
+ * last <em>Link</em> on the <em>Route</em>
|
|
|
+ */
|
|
|
+ double links1; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * Offset of the end (junction entry) of the
|
|
|
+ * current <em>Link</em> on the <em>Route</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * Offset of the end (junction entry) of the
|
|
|
+ * last <em>Link</em> on the <em>Route</em>
|
|
|
+ */
|
|
|
+ tRoadPosKind onRoad; /**< Kind of position:\n
|
|
|
+ * On or (in some extent) off the road
|
|
|
+ */
|
|
|
+ tRoadLaneOutExt lanes; /**< Struct with the <em>Lanes</em> defined
|
|
|
+ * at the calculated \ref tRoadRouteOutExt::st
|
|
|
+ * "s-offset"
|
|
|
+ * \note Only valid if
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz" is not
|
|
|
+ * \ref tRoadRouteOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ */
|
|
|
+ int onJunction; /**< Flag indicating whether
|
|
|
+ * \ref tRoadRouteOutExt::xyz "xyz" is on a
|
|
|
+ * <em>Link</em> or on a <em>Junction</em>:\n
|
|
|
+ * - 0 ↔ <em>Link</em>
|
|
|
+ * - 1 ↔ <em>Junction</em>
|
|
|
+ */
|
|
|
+ int linkObjId; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * object id of the current <em>Link</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * object id of the last
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+ int juncObjId; /**< - <b>xyz</b> on <em>Link</em>:
|
|
|
+ * object id of the last <em>Junction</em>
|
|
|
+ * - <b>xyz</b> on <em>Junction</em>:
|
|
|
+ * object id identifier of the current
|
|
|
+ * <em>Junction</em>
|
|
|
+ */
|
|
|
+ int nextJuncObjId; /**< Object id of the next <em>Junction</em>
|
|
|
+ * \note Set to #ROAD_InvalidObjId if \ref
|
|
|
+ * tRoadRouteOutExt::xyz "xyz" is \ref
|
|
|
+ * tRoadRouteOutExt::onJunction
|
|
|
+ * "on a Junction".
|
|
|
+ */
|
|
|
+ struct tRoadPath *path; /**< Pointer to a struct with the parameters
|
|
|
+ * of the current <em>Path</em>
|
|
|
+ */
|
|
|
+} tRoadRouteOutExt;
|
|
|
+
|
|
|
+/** Function to evaluate a <em>Route</em>: extended version
|
|
|
+ * \param[in,out] re Evaluation handle of the road instance
|
|
|
+ * \param[in] errMsgPre Prefix for the error messages
|
|
|
+ * \param[in] it Input type describing which variables of <b>in</b> are used
|
|
|
+ * \param[in] in Pointer to a struct for the input parameters
|
|
|
+ * \param[out] out Pointer to a struct for the output parameters
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadRouteEvalExt(tRoadEval *re, const char *errMsgPre, tRoadInType it,
|
|
|
+ const tRoadRouteIn *in, tRoadRouteOutExt *out);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to set the <em>Route</em> of a road evaluation handle and adjust
|
|
|
+ * its output mask\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \note Whereas <em>Routes</em> run along the <em>Reference lines</em>,
|
|
|
+ * <em>Paths</em> have a lateral offset from them. Therefore, the longitudinal
|
|
|
+ * and the lateral direction of the local coordinate systems of a
|
|
|
+ * <em>Path</em> and the <em>Route</em> it belongs to can be entirely
|
|
|
+ * different. However, since the length of a <em>Path</em> is considered as
|
|
|
+ * the length of its projection on the <em>Reference line</em>, the
|
|
|
+ * s-coordinate is the same in both cases.
|
|
|
+ * \param[in,out] re Road evaluation handle
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>.
|
|
|
+ * \param[in] usePath Parameter determining whether the <em>Route</em> or its
|
|
|
+ * <em>Paths</em> are used as reference for the output calculated with the road
|
|
|
+ * evaluation handle:
|
|
|
+ * - 0 ↔ The <em>Route</em> is used as reference for the output.
|
|
|
+ * - 1 ↔ The <em>Paths</em> are used as reference for the output.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadEvalSetRouteByObjId() to set the <em>Route</em> of a
|
|
|
+ * road evaluation handle.
|
|
|
+ */
|
|
|
+int RoadEvalSetRoute (tRoadEval *re, int routeId, int usePath);
|
|
|
+/** Function to set the <em>Route</em> of a road evaluation handle and adjust
|
|
|
+ * its output mask
|
|
|
+ * \note Whereas <em>Routes</em> run along the <em>Reference lines</em>,
|
|
|
+ * <em>Paths</em> have a lateral offset from them. Therefore, the longitudinal
|
|
|
+ * and the lateral direction of the local coordinate systems of a
|
|
|
+ * <em>Path</em> and the <em>Route</em> it belongs to can be entirely
|
|
|
+ * different. However, since the length of a <em>Path</em> is considered as
|
|
|
+ * the length of its projection on the <em>Reference line</em>, the
|
|
|
+ * s-coordinate is the same in both cases.
|
|
|
+ * \param[in,out] re Road evaluation handle
|
|
|
+ * \param[in] routeObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] usePath Parameter determining whether the <em>Route</em> or its
|
|
|
+ * <em>Paths</em> are used as reference for the output calculated with the road
|
|
|
+ * evaluation handle:
|
|
|
+ * - 0 ↔ The <em>Route</em> is used as reference for the output.
|
|
|
+ * - 1 ↔ The <em>Paths</em> are used as reference for the output.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadEvalSetRouteByName() \see RoadEvalGetRouteObjId()
|
|
|
+ */
|
|
|
+int RoadEvalSetRouteByObjId(tRoadEval *re, tObjId routeObjId, int usePath);
|
|
|
+/** Function to set the <em>Route</em> of a road evaluation handle and adjust
|
|
|
+ * its output mask\n
|
|
|
+ * The <em>Route</em> is identified by its name.
|
|
|
+ * \note Whereas <em>Routes</em> run along the <em>Reference lines</em>,
|
|
|
+ * <em>Paths</em> have a lateral offset from them. Therefore, the longitudinal
|
|
|
+ * and the lateral direction of the local coordinate systems of a
|
|
|
+ * <em>Path</em> and the <em>Route</em> it belongs to can be entirely
|
|
|
+ * different. However, since the length of a <em>Path</em> is considered as
|
|
|
+ * the length of its projection on the <em>Reference line</em>, the
|
|
|
+ * s-coordinate is the same in both cases.
|
|
|
+ * \param[in,out] re Road evaluation handle
|
|
|
+ * \param[in] name Name of the <em>Route</em>
|
|
|
+ * \param[in] usePath Parameter determining whether the <em>Route</em> or its
|
|
|
+ * <em>Paths</em> are used as reference for the output calculated with the road
|
|
|
+ * evaluation handle:
|
|
|
+ * - 0 ↔ The <em>Route</em> is used as reference for the output.
|
|
|
+ * - 1 ↔ The <em>Paths</em> are used as reference for the output.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadEvalSetRouteByObjId() \see RoadEvalGetRouteObjId()
|
|
|
+ */
|
|
|
+int RoadEvalSetRouteByName (tRoadEval *re, const char* name, int usePath);
|
|
|
+/** Function to get the internal identifier of the <em>Route</em> attached to a
|
|
|
+ * given road evaluation handle
|
|
|
+ * \param[in] re Road evaluation handle
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> internal identifier of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadEvalGetRouteObjId() to get the object id of the
|
|
|
+ * <em>Route</em> attached to a given road evaluation handle.
|
|
|
+ */
|
|
|
+int RoadEvalGetRoute (tRoadEval *re);
|
|
|
+/** Function to get the object id of the <em>Route</em> attached to a given road
|
|
|
+ * evaluation handle
|
|
|
+ * \param[in] re Road evaluation handle
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> Object id of the <em>Route</em>
|
|
|
+ * <tr><td> In case of failure: <td> error code #ROAD_InvalidObjId
|
|
|
+ * </table>
|
|
|
+ * \see RoadEvalSetRouteByObjId() \see RoadEvalSetRouteByName()
|
|
|
+ */
|
|
|
+tObjId RoadEvalGetRouteObjId (tRoadEval *re);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate and initialize a route speed evaluation handle\n
|
|
|
+ * The <em>Route</em> is identified by its internal identifier.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] routeId Identifier of the <em>Route</em>
|
|
|
+ * \param[in] range Range in s-direction along the <em>Route</em> where it is
|
|
|
+ * searched for speed limits
|
|
|
+ * \param[in] module Internal use only. Set this parameter to NULL.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> route speed evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteObjGetSpeedEval() to generate and initialize a route
|
|
|
+ * speed evaluation handle.
|
|
|
+ */
|
|
|
+tRoadRouteSpeedEval *RoadRouteGetSpeedEval (tRoad *road, int routeId,
|
|
|
+ double range, const char *module);
|
|
|
+/** Function to generate and initialize a route speed evaluation handle
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] range Range in s-direction along the <em>Route</em> where it is
|
|
|
+ * searched for speed limits
|
|
|
+ * \param[in] module Internal use only. Set this parameter to NULL.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> route speed evaluation handle
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteDeleteSpeedEval() \see RoadRouteResetSpeedEval()
|
|
|
+ */
|
|
|
+tRoadRouteSpeedEval *RoadRouteObjGetSpeedEval(tRoad *road, tObjId rObjId,
|
|
|
+ double range, const char *module);
|
|
|
+/** Function to reset a route speed evaluation handle
|
|
|
+ * \param[in,out] rse Route speed evaluation handle
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] range Range in s-direction along the <em>Route</em> where it is
|
|
|
+ * searched for speed limits
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteDeleteSpeedEval()\see RoadRouteObjGetSpeedEval()
|
|
|
+ */
|
|
|
+int RoadRouteResetSpeedEval (tRoadRouteSpeedEval *rse,
|
|
|
+ tObjId rObjId, double range);
|
|
|
+/** Function to free the memory of a route speed evaluation handle
|
|
|
+ * \param[in] rse Route speed evaluation handle that should be deleted
|
|
|
+ * \see RoadRouteObjGetSpeedEval() \see RoadRouteResetSpeedEval()
|
|
|
+ */
|
|
|
+void RoadRouteDeleteSpeedEval(tRoadRouteSpeedEval *rse);
|
|
|
+
|
|
|
+//! Route speed evaluation: output
|
|
|
+/** Struct for the output parameters of RoadRouteGetSpeed()
|
|
|
+ * \see tRoadPathSpeedOut
|
|
|
+ */
|
|
|
+typedef struct tRoadSpeedOut {
|
|
|
+ double speed; /**< Speed limit in m/s
|
|
|
+ */
|
|
|
+ double sRoute; /**< Offset of the speed limit in s-direction on the
|
|
|
+ * <em>Route</em>
|
|
|
+ */
|
|
|
+} tRoadSpeedOut;
|
|
|
+
|
|
|
+/** Function to get the next three speed limits of a <em>Route</em>
|
|
|
+ * \param[in] rse Route speed evaluation handle
|
|
|
+ * \param[in] s Offset in s-direction on the <em>Route</em>
|
|
|
+ * \param[out] out Array of structs for the three next speed sections
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of found speed sections (at most three)
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadPathGetSpeed()
|
|
|
+ */
|
|
|
+int RoadRouteGetSpeed (tRoadRouteSpeedEval *rse, double s,
|
|
|
+ tRoadSpeedOut out[3]);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* --- Routes of version 6.0.X and lower ------------------------------------ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup Routes6Eval
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to convert the offset in s-direction given on a 8.0-<em>Route</em>
|
|
|
+ * to the offset in s-direction on a 6.0-<em>Route</em>\note
|
|
|
+ * The calculation method for the offset on a <em>Route</em> has changed
|
|
|
+ * which can lead to minor differences regarding the s-offsets.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] sRoute Offset in s-direction calculated using the 8.0-method
|
|
|
+ * \param[out] sRoute6 Offset in s-direction calculated using the 6.0-method
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRoute6GetSOnRoute()
|
|
|
+ */
|
|
|
+int RoadRouteGetSOnRoute6(tRoad *road, tObjId rObjId,
|
|
|
+ double sRoute, double *sRoute6);
|
|
|
+/** Function to convert the offset in s-direction given on a 6.0-<em>Route</em>
|
|
|
+ * to the offset in s-direction on a 8.0-<em>Route</em>
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rObjId Object id of the <em>Route</em>
|
|
|
+ * \param[in] sRoute6 Offset in s-direction calculated using the 6.0-method
|
|
|
+ * \param[out] sRoute Offset in s-direction calculated using the 8.0-method
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadRouteGetSOnRoute6()
|
|
|
+ */
|
|
|
+int RoadRoute6GetSOnRoute(tRoad *road, tObjId rObjId,
|
|
|
+ double sRoute6, double *sRoute);
|
|
|
+
|
|
|
+/** Function to get the distance between a given offset on a <em>Route</em> and
|
|
|
+ * the next <em>Junction</em>
|
|
|
+ * \param[in] re Evaluation handle of the instance of the road
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> distance to the next <em>Junction</em> in meters
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadRouteEvalExt() to get the distance between a given offset
|
|
|
+ * on a <em>Route</em> and the next <em>Junction</em>.
|
|
|
+ */
|
|
|
+double RoadRouteGetDistToNextJunction(tRoadEval *re);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* === Additional functions ================================================= */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Statistics +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup Statistics
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to print the <em>Road Statistics</em>:
|
|
|
+ * Number of <em>Links</em>, number of <em>Junctions</em> and length of the
|
|
|
+ * <em>Road network</em>
|
|
|
+ * \note The information is displayed using the function pointer #RoadLogInfo().
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \see RoadPrintInfo()
|
|
|
+ */
|
|
|
+void RoadPrintStatistics(tRoad *road);
|
|
|
+
|
|
|
+/** Function to get the number of <em>Links</em> of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Links</em> of the road instance
|
|
|
+ * <tr><td> In case of failure: <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetJunctionCount() \see RoadGetObjectCount()
|
|
|
+ * \see RoadGetRouteCount()
|
|
|
+ */
|
|
|
+int RoadGetLinkCount (tRoad *road);
|
|
|
+/** Function to count the number of <em>Junctions</em> of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Junctions</em> of the road instance
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetLinkCount() \see RoadGetObjectCount() \see RoadGetRouteCount()
|
|
|
+ */
|
|
|
+int RoadGetJunctionCount(tRoad *road);
|
|
|
+/** Function to count the number of objects of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of objects of the road instance
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetLinkCount() \see RoadGetJunctionCount() \see RoadGetRouteCount()
|
|
|
+ */
|
|
|
+int RoadGetObjectCount (tRoad *road);
|
|
|
+/** Function to count the number of <em>Routes</em> of the road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Routes</em> of the road instance
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use RoadGetRouteCount() to get the number of <em>Routes</em>
|
|
|
+ * of a road instance.
|
|
|
+ */
|
|
|
+int RoadGetNumOfRoutes (tRoad *road);
|
|
|
+/** Function to count the number of <em>Routes</em> of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of <em>Routes</em> of the road instance
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetLinkCount() \see RoadGetJunctionCount() \see RoadGetObjectCount()
|
|
|
+ */
|
|
|
+int RoadGetRouteCount (tRoad *road);
|
|
|
+
|
|
|
+/** Function to determine the total length of the <em>Road network</em> of a
|
|
|
+ * road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return Total length of the <em>Road network</em>
|
|
|
+ */
|
|
|
+double RoadGetNetworkLength(tRoad *road);
|
|
|
+/** Function to get the bounding box of a road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[out] min Minimum x/y/z-coordinate of the road instance
|
|
|
+ * \param[out] max Maximum x/y/z-coordinate of the road instance
|
|
|
+ * \see RoadGetBBCount()
|
|
|
+ */
|
|
|
+void RoadGetBoundingBox (tRoad *road, double min[3], double max[3]);
|
|
|
+/** Function to get the number of look-up bounding boxes of a road instance\n
|
|
|
+ * In order to simplify the evaluation of a road instance, every <em>Link</em>
|
|
|
+ * and <em>Junction</em> is covered with slightly overlapping rectangles,
|
|
|
+ * so-called look-up boxes.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return Number of look-up bounding boxes of the road instance
|
|
|
+ * \see RoadGetBoundingBox()
|
|
|
+ */
|
|
|
+int RoadGetBBCount (tRoad *road);
|
|
|
+
|
|
|
+/** Function to get the total number of Bézier Patch Mappings of a road
|
|
|
+ * instance\n
|
|
|
+ * The surface of a road instance is depicted with so-called Bézier
|
|
|
+ * Patch Mappings. These are patches with four Bézier curves as boundary
|
|
|
+ * curves.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of Bézier Patch Mappings used for the road instance
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetInvalidBPMCount()
|
|
|
+ */
|
|
|
+int RoadGetBPMCount (tRoad *road);
|
|
|
+/** Function to get the number of invalid Bézier Patch Mappings of a road
|
|
|
+ * instance\n
|
|
|
+ * Sometimes the parameters chosen for a part of a road instance don't allow to
|
|
|
+ * depict this part's boundary with Bézier curves (e.g. the area between
|
|
|
+ * two arms of a junction that are defined too close to each other). The
|
|
|
+ * Bézier Patch Mapping of this part is then marked and included in the
|
|
|
+ * statistics as invalid.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of invalid Bézier Patch Mappings\n
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadGetBPMCount()
|
|
|
+ */
|
|
|
+int RoadGetInvalidBPMCount(tRoad *road);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Log Function Pointers ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \cond
|
|
|
+ */
|
|
|
+extern void (*RoadLogInfo) (const char* fmt,...)
|
|
|
+ __attribute__((format(printf,1,2)));
|
|
|
+extern void (*RoadLogWarn) (unsigned type, const char* fmt,...)
|
|
|
+ __attribute__((format(printf,2,3)));
|
|
|
+extern void (*RoadLogErr) (unsigned type, const char* fmt,...)
|
|
|
+ __attribute__((format(printf,2,3)));
|
|
|
+
|
|
|
+
|
|
|
+/** \endcond
|
|
|
+ */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Error Functions ++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup ErrMsg
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+
|
|
|
+/** Message types
|
|
|
+ */
|
|
|
+typedef enum tRoadMsgType {
|
|
|
+ RMT_Error = (1<<0), /**< <b>1</b> Error
|
|
|
+ */
|
|
|
+ RMT_Warn = (1<<1), /**< <b>2</b> Warning
|
|
|
+ */
|
|
|
+ RMT_Info = (1<<2), /**< <b>4</b> Information
|
|
|
+ */
|
|
|
+ RMT_Debug = (1<<3), /**< <b>8</b> Debug
|
|
|
+ */
|
|
|
+ RMT_Ext = (1<<4), /**< <b>16</b> External
|
|
|
+ */
|
|
|
+} tRoadMsgType;
|
|
|
+
|
|
|
+/** All message types:\n
|
|
|
+ * Flag indicating that messages of all types except the \ref RMT_Ext
|
|
|
+ * "external messages" are considered.
|
|
|
+ * \see tRoadMessage \see RoadGetMsgList() \see RoadClearMsgList()
|
|
|
+ * \see RoadAddMessage() \see RoadAddMsg()
|
|
|
+ */
|
|
|
+#define RMT_ALL RMT_Error|RMT_Warn|RMT_Info|RMT_Debug
|
|
|
+//! Message
|
|
|
+/** Struct for the parameters of a message
|
|
|
+ */
|
|
|
+typedef struct tRoadMessage {
|
|
|
+ tRoadMsgType rmt; /**< Message type
|
|
|
+ */
|
|
|
+ int code; /**< \ref ErrorCodes "Error code" of the message
|
|
|
+ */
|
|
|
+ char *msg; /**< Text of the message
|
|
|
+ */
|
|
|
+} tRoadMessage;
|
|
|
+
|
|
|
+//! Message list
|
|
|
+/** Struct for a list of messages
|
|
|
+ */
|
|
|
+typedef struct tRoadMessageList {
|
|
|
+ tRoadMessage *msg; /**< List of messages
|
|
|
+ */
|
|
|
+ int nMsgList; /**< Number of the messages listed
|
|
|
+ */
|
|
|
+} tRoadMessageList;
|
|
|
+
|
|
|
+//! Error
|
|
|
+/** Struct for the parameters of an error
|
|
|
+ * \deprecated Use a \ref tRoadMessage "message" of \ref tRoadMsgType "type"
|
|
|
+ * \ref RMT_Error for an error message.
|
|
|
+ */
|
|
|
+typedef struct tRoadError {
|
|
|
+ int code; /**< Error code
|
|
|
+ */
|
|
|
+ char *err; /**< Error message
|
|
|
+ */
|
|
|
+} tRoadError;
|
|
|
+
|
|
|
+/** Function to get a list with all errors collected for a given road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] errList List of errors
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> number of errors
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \warning Do not free **errList or *errList!
|
|
|
+ * \deprecated Use \ref RoadGetMessageList() to get a list of all errors of a
|
|
|
+ * road instance.
|
|
|
+ */
|
|
|
+int RoadGetErrorList (tRoad *road, tRoadError **errList);
|
|
|
+/** Function to clear the error list of a given road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \deprecated The errors of a road instance are handled in a new \ref
|
|
|
+ * RoadClearMessageBuffer "message buffer".
|
|
|
+ */
|
|
|
+void RoadClearErrorList(tRoad *road);
|
|
|
+
|
|
|
+/** Function to get a list with all messages of a given type collected for a
|
|
|
+ * given road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rmt Type of message
|
|
|
+ * \param[out] msgList List of messages
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of messages of the given type
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \warning Do not free **msgList or *msgList!
|
|
|
+ * \deprecated Use \ref RoadGetMessageList() to get a list of all messages of a
|
|
|
+ * certain type.
|
|
|
+ */
|
|
|
+int RoadGetMsgList (tRoad *road, tRoadMsgType rmt, char ***msgList);
|
|
|
+/** Function to clear the list of a certain type of messages of a given road
|
|
|
+ * instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] rmt Type of message
|
|
|
+ * \see RoadGetMsgList()
|
|
|
+ * \deprecated The messages of a road instance are handled in a new \ref
|
|
|
+ * RoadClearMessageBuffer "message buffer".
|
|
|
+ */
|
|
|
+void RoadClearMsgList(tRoad *road, tRoadMsgType rmt);
|
|
|
+
|
|
|
+/** Function to add a message to the internal message list of a given road
|
|
|
+ * instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] msgType Type of the message
|
|
|
+ * \param[in] msg Text of the message
|
|
|
+ * \param[in] errCode \ref ErrorCodes "Error code" of the message
|
|
|
+ * \return Pass through of <b>errCode</b>
|
|
|
+ * \see RoadAddMsg() \see RoadClearMessageBuffer() \see RoadGetMessageList()
|
|
|
+ * \see RoadDeleteMessageList()
|
|
|
+ */
|
|
|
+int RoadAddMessage (tRoad *road, tRoadMsgType msgType,
|
|
|
+ const char *msg, int errCode);
|
|
|
+/** Function to add a formatted message to the internal message list of a given
|
|
|
+ * road instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] msgType Type of the message
|
|
|
+ * \param[in] errCode \ref ErrorCodes "Error code" of the message
|
|
|
+ * \param[in] msgfmt Formatted text of the message
|
|
|
+ * \return Pass through of <b>errCode</b>
|
|
|
+ * \see RoadAddMessage() \see RoadClearMessageBuffer() \see RoadGetMessageList()
|
|
|
+ * \see RoadDeleteMessageList()
|
|
|
+ */
|
|
|
+int RoadAddMsg (tRoad *road, tRoadMsgType msgType, int errCode,
|
|
|
+ const char *msgfmt, ...);
|
|
|
+/** Function to clear all messages of the specified types for a given road
|
|
|
+ * instance
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] msgTypes Message types which will be deleted: The binary system is
|
|
|
+ * used to generate combinations of the message types #RMT_Error, #RMT_Warn,
|
|
|
+ * #RMT_Info and #RMT_Debug.
|
|
|
+ * \see RoadAddMsg() \see RoadAddMessage() \see RoadGetMessageList()
|
|
|
+ * \see RoadDeleteMessageList()
|
|
|
+ */
|
|
|
+void RoadClearMessageBuffer(tRoad *road, int msgTypes);
|
|
|
+/** Function to get a list with all messages of the specified types collected
|
|
|
+ * for a given road instance
|
|
|
+ * \note The user is responsible to free the memory of the the message list
|
|
|
+ * after usage via \ref RoadDeleteMessageList().
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] msgTypes Message types which will be considered: The binary system
|
|
|
+ * is used to generate combinations of the message types #RMT_Error, #RMT_Warn,
|
|
|
+ * #RMT_Info and #RMT_Debug.
|
|
|
+ * \param[out] msgList Pointer to the struct in which the messages will be
|
|
|
+ * stored
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> Number of elements in the message list
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see RoadAddMsg() \see RoadAddMessage() \see RoadClearMessageBuffer()
|
|
|
+ * \see RoadDeleteMessageList()
|
|
|
+ */
|
|
|
+int RoadGetMessageList (tRoad *road, int msgTypes,
|
|
|
+ tRoadMessageList *msgList);
|
|
|
+/** Function to delete a message list which was prior allocated by
|
|
|
+ * \ref RoadGetMessageList()
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] msgList Pointer to the message list
|
|
|
+ * \see RoadAddMsg() \see RoadAddMessage() \see RoadClearMessageBuffer()
|
|
|
+ * \see RoadGetMessageList()
|
|
|
+ */
|
|
|
+void RoadDeleteMessageList (tRoad *road, tRoadMessageList *msgList);
|
|
|
+
|
|
|
+/** Function to set which types of message are suppress by the internal message
|
|
|
+ * handler. By default no message are suppressed. It is not possible to
|
|
|
+ * suppress messages of type #RMT_Ext. To create messages of all types set
|
|
|
+ * <em>typeMask</em> to 0.
|
|
|
+ * \param[in] road Handle of the road instance
|
|
|
+ * \param[in] typeMask mask of message types \see tRoadMsgType
|
|
|
+ * \see RoadAddMsg() \see RoadAddMessage() \see RoadClearMessageBuffer()
|
|
|
+ * \see RoadGetMessageList()
|
|
|
+ */
|
|
|
+void RoadSetMsgTypesToSuppress (tRoad *road, int typeMask);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Binary File Functions ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup BinFileInfo
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/*** Binary file information options ***/
|
|
|
+
|
|
|
+/** Binary file information: \n
|
|
|
+ * The name of a track is at most 32 bits long.
|
|
|
+ */
|
|
|
+#define ROAD_BIN_NAME_SIZE 32
|
|
|
+/** Binary file information: \n
|
|
|
+ * The size of the version number covers at most 8 bits.
|
|
|
+ */
|
|
|
+#define ROAD_BIN_VER_SIZE 8
|
|
|
+/** Binary file information:\n
|
|
|
+ * The size of a comment is limited to 256 bits.
|
|
|
+ */
|
|
|
+#define ROAD_BIN_TXT_SIZE 256
|
|
|
+
|
|
|
+//! Binary file information
|
|
|
+/** Struct for the information about a binary file describing a <em>\ref
|
|
|
+ * SegmentsEdit "Segment"</em> of type <em>File</em>
|
|
|
+ * \see RoadGetBinFileInfo()
|
|
|
+ */
|
|
|
+typedef struct tRoadBinInfo {
|
|
|
+ double gcs_xyz[3]; /**< GCS position in the IPGRoad coordinate
|
|
|
+ * system (Fr0): (x,y,z)-coordinates
|
|
|
+ * [m,m,m]
|
|
|
+ */
|
|
|
+ double gcs_lle[3]; /**< GCS position in WGS84: latitude, longitude
|
|
|
+ * and elevation of the global coordinates
|
|
|
+ * [deg, deg, m]
|
|
|
+ */
|
|
|
+ double width[2]; /**< Width left/right [m]
|
|
|
+ */
|
|
|
+ double startDir; /**< Start direction [deg]
|
|
|
+ */
|
|
|
+ double smooth[3]; /**< Smoothing factors (xy,z,q)
|
|
|
+ */
|
|
|
+ int gcs_mode; /**< \ref tGCSMode "GCS projection mode"
|
|
|
+ */
|
|
|
+ int nPts; /**< Number of digitized points
|
|
|
+ */
|
|
|
+ char name[ROAD_BIN_NAME_SIZE]; /**< Name of the track
|
|
|
+ */
|
|
|
+ char version[ROAD_BIN_VER_SIZE];/**< Version number
|
|
|
+ */
|
|
|
+ char comment[ROAD_BIN_TXT_SIZE];/**< Comment
|
|
|
+ */
|
|
|
+} tRoadBinInfo;
|
|
|
+
|
|
|
+/** Function to get the information about a binary file\n
|
|
|
+ * Used to display the information about binary files containing the
|
|
|
+ * description of a <em>Segment</em> of type <em>File</em>
|
|
|
+ * \param[in] binFName Name of the binary file
|
|
|
+ * \param[out] info Pointer to a struct for the information about the binary
|
|
|
+ * file
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int RoadGetBinFileInfo(const char *binFName, tRoadBinInfo *info);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* === Road Independent Functions =========================================== */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ GCS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup RIGCS
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+
|
|
|
+#ifndef GCS_UNKNOWN_ELEVATION
|
|
|
+/** Unknown elevation of GCS:\n
|
|
|
+ * Return value for GCSGetHM_Z() indicating that a given position is not within
|
|
|
+ * the range of the given <em>Height map's</em> GCS module.
|
|
|
+ */
|
|
|
+#define GCS_UNKNOWN_ELEVATION 0x80000000
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+/** GCS module:\n
|
|
|
+ * Besides some parameters for the GCS projection mode, this struct includes a
|
|
|
+ * reference position in IPGRoad and WGS84 coordinates.
|
|
|
+ */
|
|
|
+typedef struct tGCS tGCS;
|
|
|
+
|
|
|
+/** Function to generate and initialize a new GCS module\n
|
|
|
+ * This function sets the GCS projection mode and the reference position of the
|
|
|
+ * GCS module in IPGRoad and WGS84 coordinates.
|
|
|
+ * \param[in] xyzRef Reference position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates of the reference point [m,m,m]
|
|
|
+ * \param[in] lleRef Reference position in WGS84:
|
|
|
+ * (lat,lon,elev)-coordinates of the reference point [deg, deg, m]
|
|
|
+ * \param[in] mode GCS projection mode
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to the new GCS module\n
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see GCSDelete()
|
|
|
+ */
|
|
|
+tGCS *GCSNew (double xyzRef[3], double lleRef[3], tGCSMode mode);
|
|
|
+/** Function to delete a GCS module
|
|
|
+ * \param[in] gcs Pointer to the GCS module that should be deleted
|
|
|
+ * \see GCSNew() \see RoadDeleteGCS()
|
|
|
+ */
|
|
|
+void GCSDelete (tGCS *gcs);
|
|
|
+/** Function to convert a given position in WGS84 to the corresponding position
|
|
|
+ * in the IPGRoad coordinate system using a given GCS module
|
|
|
+ * \param[in] gcs Pointer to the GCS module
|
|
|
+ * \param[in] lle Position in WGS84: (lat,lon,elev)-coordinates
|
|
|
+ * [deg,deg,m]
|
|
|
+ * \param[out] xyz Position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates [m,m,m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see GCSxyz2lle() \see Roadlle2xyz()
|
|
|
+ */
|
|
|
+int GCSlle2xyz(tGCS *gcs, double lle[3], double xyz[3]);
|
|
|
+/** Function to convert a given position in the IPGRoad coordinate system to the
|
|
|
+ * corresponding position in WGS84 using a given GCS module
|
|
|
+ * \param[in] gcs Pointer to the GCS module
|
|
|
+ * \param[in] xyz Position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates [m,m,m]
|
|
|
+ * \param[out] lle Position in WGS84: (lat,lon,elev)-coordinates
|
|
|
+ * [deg,deg,m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see GCSlle2xyz() \see Roadxyz2lle()
|
|
|
+ */
|
|
|
+int GCSxyz2lle(tGCS *gcs, double xyz[3], double lle[3]);
|
|
|
+
|
|
|
+
|
|
|
+/** Height map:\n
|
|
|
+ * In case the height data stored in <em>.srtm</em> files should be used for
|
|
|
+ * the terrain generation, it is included in form of a <em>Height map</em>.
|
|
|
+ * The struct has a GCS module as a member.
|
|
|
+ * \note <em>Height maps</em> are NOT suitable for the generation of a
|
|
|
+ * <em>Height profile</em> for the road.
|
|
|
+ */
|
|
|
+typedef struct tHM tHM;
|
|
|
+
|
|
|
+/** Function to generate and initialize a new <em>Height map</em>\n
|
|
|
+ * This function sets the directory of the <em>Height map's</em> files and its
|
|
|
+ * GCS module.
|
|
|
+ * \note To use this function special <em>Height map</em> files are needed.
|
|
|
+ * \param[in] fpath Path of the <em>Height map</em> files
|
|
|
+ * \param[in] lleRef Reference position in WGS84: latitude, longitude and
|
|
|
+ * elevation of the global coordinates of the reference point
|
|
|
+ * [deg, deg, m]
|
|
|
+ * \param[in] xyzRef Reference position in the IPGRoad coordinate system (Fr0):
|
|
|
+ * (x,y,z)-coordinates of the reference point [m,m,m]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to the new <em>Height map</em>
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see GCSDeleteHM()
|
|
|
+ */
|
|
|
+tHM* GCSNewHM (char *fpath, double lleRef[3], double xyzRef[3]);
|
|
|
+/** Function to delete a <em>Height map</em>
|
|
|
+ * \param[in] hm Pointer to the <em>Height map</em> that should be deleted
|
|
|
+ * \see GCSNewHM()
|
|
|
+ */
|
|
|
+void GCSDeleteHM(tHM **hm);
|
|
|
+/** Function to read the files of a <em>Height map</em>
|
|
|
+ * \note To use this function special <em>Height map</em> files are needed.
|
|
|
+ * \param[in] hm Pointer to the <em>Height map</em> that should be read
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int GCSReadHM (tHM **hm);
|
|
|
+/** Function to get the z-coordinate of a <em>Height map</em> at a given
|
|
|
+ * position in the (x,y)-plane of the global IPGRoad coordinate system (Fr0)
|
|
|
+ * \note To use this function special <em>Height map</em> files are needed.
|
|
|
+ * \param[in] hm Pointer to the <em>Height map</em>
|
|
|
+ * \param[in] x X-coordinate of the given position
|
|
|
+ * \param[in] y Y-coordinate of the given position
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> z-coordinate of the <em>Height map</em> at (<b>x</b>,<b>y</b>)
|
|
|
+ * <tr><td> In case of failure: <td> #GCS_UNKNOWN_ELEVATION
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+double GCSGetHM_Z (tHM *hm, double x, double y);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* +++ Splines ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup Splines
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Types of spline:\n
|
|
|
+ * It is distinguished between <b>interpolation</b>, where the spline is
|
|
|
+ * passing through all nodes, and <b>approximation</b>, where a spline
|
|
|
+ * approximating the nodes permitting a maximum deviation is used.
|
|
|
+ */
|
|
|
+typedef enum tSplineType {
|
|
|
+
|
|
|
+ ST_IntPol_NaturalCubic = 0, /**< <b>0</b>
|
|
|
+ * Interpolation with a natural cubic
|
|
|
+ * spline:\n
|
|
|
+ * S'(0) = S'(n) = S''(0) = S''(n)
|
|
|
+ * = S'''(0) = S'''(n) = 0
|
|
|
+ */
|
|
|
+ ST_IntPol_GivenBorderCurvature, /**< <b>1</b>
|
|
|
+ * Interpolation with a cubic spline
|
|
|
+ * with given border curvature:\n
|
|
|
+ * S'(0) = a, S'(n)=b
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_IntPol_GivenBorderTangent, /**< <b>2</b>
|
|
|
+ * Interpolation with a cubic spline
|
|
|
+ * with given border tangent:\n
|
|
|
+ * S''(0) = a, S''(n)=b
|
|
|
+ */
|
|
|
+ ST_IntPol_GivenThirdBorderDeriv, /**< <b>3</b>
|
|
|
+ * Interpolation with a cubic spline:
|
|
|
+ * \n S'''(0)= a, S'''(n)=b
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_IntPol_Periodic, /**< <b>4</b> Interpolation with
|
|
|
+ * a periodic cubic spline
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_IntPol_NotANode, /**< <b>5</b>
|
|
|
+ * Interpolation with a cubic spline
|
|
|
+ * with not-a-node condition
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_Approx_NaturalCubic, /**< <b>6</b>
|
|
|
+ * Approximation with a natural cubic
|
|
|
+ * spline\n
|
|
|
+ * S'(0) = S'(n) = S''(0) = S''(n)
|
|
|
+ * = S'''(0) = S'''(n) = 0
|
|
|
+ */
|
|
|
+ ST_Approx_GivenBorderTangent, /**< <b>7</b>
|
|
|
+ * Approximation with a cubic spline
|
|
|
+ * with given border tangent:\n
|
|
|
+ * S''(0) = a, S''(n)=b
|
|
|
+ */
|
|
|
+ ST_Approx_GivenBorderCurvature, /**< <b>8</b>
|
|
|
+ * Approximation with a cubic spline
|
|
|
+ * with given border curvature:\n
|
|
|
+ * S'(0) = a, S'(n)=b
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_Approx_GivenThirdBorderDeriv, /**< <b>9</b>
|
|
|
+ * Approximation with a cubic spline:
|
|
|
+ * \n S'''(0)= a, S'''(n)=b
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_Approx_Periodic, /**< <b>10</b> Approximation with
|
|
|
+ * a periodic cubic spline
|
|
|
+ * \warning Not yet implemented!
|
|
|
+ */
|
|
|
+ ST_NSTypes /**< <b>11</b>
|
|
|
+ * Maximum number of spline types
|
|
|
+ */
|
|
|
+} tSplineType;
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* --- One-dimensional splines ---------------------------------------------- */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup OneDimSplines
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Function to generate a one-dimensional spline
|
|
|
+ * \param[in] n Number of nodes:
|
|
|
+ * The resulting number of intervals is <b>n</b>-1.
|
|
|
+ * \param[in] s List of distances between the nodes (array of size <b>n</b>)
|
|
|
+ * \param[in] fs Values at the nodes (array of size <b>n</b>)
|
|
|
+ * \param[in] type Type of the spline
|
|
|
+ * \param[in] w List of the weights of the nodes (array of size <b>n</b>)
|
|
|
+ * \param[in] ds0 Derivation at the first node <b>s</b>[0]
|
|
|
+ * \param[in] ds1 Derivation at the last node <b>s</b>[<b>n</b>-1]
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct containing the data of the new spline
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see SplineDelete()
|
|
|
+ */
|
|
|
+tSpline *SplineNew (int n, double *s, double *fs, tSplineType type,
|
|
|
+ double *w, double ds0, double ds1);
|
|
|
+/** Function to delete a one-dimensional spline\n
|
|
|
+ * The memory of the spline is freed and the pointer to it is set to NULL.
|
|
|
+ * \param[in] sp Spline that should be deleted
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see SplineNew()
|
|
|
+ */
|
|
|
+int SplineDelete(tSpline **sp);
|
|
|
+
|
|
|
+/** Function to get the number of nodes of a one-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of nodes of the spline
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use SplineGetNodeCount() to get the number of nodes of a
|
|
|
+ * one-dimensional spline.
|
|
|
+ */
|
|
|
+int SplineGetNumOfNodes(tSpline *sp);
|
|
|
+/** Function to get the number of nodes of a one-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of nodes of the spline
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int SplineGetNodeCount (tSpline *sp);
|
|
|
+/** Function to get the length of a one-dimensional spline
|
|
|
+ * \param[in] sp Pointer to a one-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> length of the spline in meters
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+double SplineLength (tSpline *sp);
|
|
|
+
|
|
|
+/** Function to calculate the value of a one-dimensional spline at a given
|
|
|
+ * offset
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] fs Pointer to the value at <b>s</b>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval of the spline <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int SplineCalc(tSpline *sp, double s, double *fs);
|
|
|
+
|
|
|
+/** Function to get the coefficients of a one-dimensional spline in the interval
|
|
|
+ * a given offset belongs to
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] si Offset of <b>s</b> from the start of the interval <b>s</b>
|
|
|
+ * belongs to
|
|
|
+ * \param[out] c Array for the coefficients of the spline in the interval
|
|
|
+ * <b>s</b> belongs to
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see SplineGetCoeffByIdx()
|
|
|
+ */
|
|
|
+int SplineGetCoefficients(tSpline *sp, double s, double *si, double c[4]);
|
|
|
+/** Function to get the inclination of a one-dimensional spline in the interval
|
|
|
+ * a given offset belongs to
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] inclination Inclination of the spline in the interval <b>s</b>
|
|
|
+ * belongs to
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int SplineGetInclination (tSpline *sp, double s, double *inclination);
|
|
|
+
|
|
|
+/** Function to get the offset of a certain node of a given one-dimensional
|
|
|
+ * spline
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \param[in] idx Index of the given node
|
|
|
+ * \param[out] s Offset of the node
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> index of the node
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int SplineGetSByIdx (tSpline *sp, int idx, double *s);
|
|
|
+/** Function to get the coefficients of a given one-dimensional spline in a
|
|
|
+ * certain interval
|
|
|
+ * \param[in] sp Pointer to the one-dimensional spline
|
|
|
+ * \param[in] idx Index of the given interval
|
|
|
+ * \param[out] c Array for the coefficients of the spline in the given interval
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> index of the interval
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int SplineGetCoeffByIdx(tSpline *sp, int idx, double c[4]);
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* --- Parametric splines --------------------------------------------------- */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup TwoThreeDimSplines
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+/** Types of parametrization:\n
|
|
|
+ * Parametrization types used for two- and three-dimensional splines.
|
|
|
+ */
|
|
|
+typedef enum tSplineParametrisationType {
|
|
|
+ SPT_Chordal, /**< <b>0</b>
|
|
|
+ * Using the Euclidean distance
|
|
|
+ */
|
|
|
+ SPT_ArcLength, /**< <b>1</b>
|
|
|
+ * Using an estimation of the arc length
|
|
|
+ */
|
|
|
+ SPT_ChordalXY, /**< <b>2</b>
|
|
|
+ * Using the Euclidean distance in XY
|
|
|
+ * \note
|
|
|
+ * This type allows to use a three dimensional
|
|
|
+ * spline, but the parametrization is done in
|
|
|
+ * the (x,y)-plane (not considering z).
|
|
|
+ */
|
|
|
+ SPT_ArcLengthXY, /**< <b>3</b>
|
|
|
+ * Using an estimation of the arc length in XY
|
|
|
+ * \note
|
|
|
+ * This type allows to use a three dimensional
|
|
|
+ * spline, but the parametrization is done in
|
|
|
+ * the (x,y)-plane (not considering z).
|
|
|
+ */
|
|
|
+ SPT_Integrated, /**< <b>4</b>
|
|
|
+ * Using the polygonal chain through vertices
|
|
|
+ * at a distance of 0.25 meters: The lengths of
|
|
|
+ * all line segments is summarized.
|
|
|
+ */
|
|
|
+ SPT_IntegratedXY, /**< <b>5</b>
|
|
|
+ * Using the polygonal chain through vertices
|
|
|
+ * at a distance of 0.25 meters in XY:
|
|
|
+ * The lengths of
|
|
|
+ * all line segments is summarized.
|
|
|
+ * \note
|
|
|
+ * This type allows to use a three dimensional
|
|
|
+ * spline, but the parametrization is done in
|
|
|
+ * the (x,y)-plane (not considering z).
|
|
|
+ */
|
|
|
+} tSplineParametrisationType;
|
|
|
+
|
|
|
+/** Function to generate a new two-dimensional spline
|
|
|
+ * \param[in] n Number of nodes: The resulting number of intervals is
|
|
|
+ * <b>n</b>-1.
|
|
|
+ * \param[in] xy List of nodes in the two-dimensional plane
|
|
|
+ * (array of size <b>n</b>)
|
|
|
+ * \param[in] sType Type of spline
|
|
|
+ * \param[in] pType Type of parametrization
|
|
|
+ * \param[in] w List of weights of the nodes (array of size <b>n</b>):
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv0 Direction vector for the first node <b>xy</b>[0]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv1 Direction vector for the last node <b>xy</b>[<b>n</b>-1]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct containing the data of the new spline
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see Spline2DNewExt() \see Spline2DDelete()
|
|
|
+ */
|
|
|
+tSpline2D *Spline2DNew (int n, double (*xy)[2],
|
|
|
+ tSplineType sType, tSplineParametrisationType pType,
|
|
|
+ double *w, double dv0[2], double dv1[2]);
|
|
|
+/** Function to generate a new two-dimensional spline\n
|
|
|
+ * <em><b>Extended version:</b></em> A given parametrization can be used.
|
|
|
+ * \param[in] n Number of nodes: The resulting number of intervals is
|
|
|
+ * <b>n</b>-1.
|
|
|
+ * \param[in] xy List of nodes in the two-dimensional plane
|
|
|
+ * (array of size <b>n</b>)
|
|
|
+ * \param[in] s Pointer to the given parametrization (array of size <b>n</b>)\n
|
|
|
+ * If this parameter is the NULL pointer, the parametrization is done
|
|
|
+ * considering the parametrization type.
|
|
|
+ * \param[in] sType Type of spline
|
|
|
+ * \param[in] pType Type of parametrization (only relevant if no parametrization
|
|
|
+ * is given)
|
|
|
+ * \param[in] w List of weights of the nodes (array of size <b>n</b>):
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv0 Direction vector for the first node <b>xy</b>[0]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv1 Direction vector for the last node <b>xy</b>[<b>n</b>-1]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct containing the data of the new spline
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see Spline2DNew()
|
|
|
+ */
|
|
|
+tSpline2D *Spline2DNewExt(int n, double (*xy)[2], double *s,
|
|
|
+ tSplineType sType, tSplineParametrisationType pType,
|
|
|
+ double *w, double dv0[2], double dv1[2]);
|
|
|
+/** Function to delete a two-dimensional spline\n
|
|
|
+ * The memory of the spline is freed and the pointer to it is set to NULL.
|
|
|
+ * \param[in] sp Two-dimensional spline that should be deleted
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DDelete(tSpline2D **sp);
|
|
|
+
|
|
|
+/** Function to get the number of nodes of a given two-dimensional
|
|
|
+ * spline
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of nodes of the spline
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use Spline2DNodeCount() get the number of nodes of a
|
|
|
+ * two-dimensional spline.
|
|
|
+ */
|
|
|
+int Spline2DNumOfNodes(tSpline2D *sp);
|
|
|
+/** Function to get the number of nodes of a given two-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of nodes of the spline
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DNodeCount (tSpline2D *sp);
|
|
|
+/** Function to get the length of a given two-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> length of the spline in meters
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+double Spline2DLength (tSpline2D *sp);
|
|
|
+
|
|
|
+/** Function to calculate the value and the direction vector of a
|
|
|
+ * two-dimensional spline at a given offset
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] xy Value of the spline at <b>s</b>
|
|
|
+ * \param[out] dvXY Direction vector of the spline at <b>s</b>\n
|
|
|
+ * <em><b>Note</b></em>: Discarded in case this parameter is the NULL pointer.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DCalc(tSpline2D *sp, double s, double xy[2], double dvXY[2]);
|
|
|
+
|
|
|
+/** Function to convert a given position in the (x,y)-plane of the global
|
|
|
+ * IPGRoad coordinate system (Fr0) to the corresponding position in the local
|
|
|
+ * coordinate system of a given two-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] dir Given search direction
|
|
|
+ * \param[in] s Given s-offset on the spline
|
|
|
+ * \param[in] xy Given position in the (x,y)-plane of the global IPGRoad
|
|
|
+ * coordinate system (Fr0)
|
|
|
+ * \param[out] st Calculated position in the local coordinate system of the
|
|
|
+ * spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>st</b>[0] belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DXY2ST (tSpline2D *sp, int dir, double s,
|
|
|
+ double xy[2], double st[2]);
|
|
|
+
|
|
|
+/** Function to set the coefficients of a two-dimensional spline in a given
|
|
|
+ * interval
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] idx Index of the given interval
|
|
|
+ * \param[in] s Offset of the interval relative to the start of the spline
|
|
|
+ * \param[in] cx Array with the coefficients of the two-dimensional spline in
|
|
|
+ * the interval in x-direction
|
|
|
+ * \param[in] cy Array with the coefficients of the two-dimensional spline in
|
|
|
+ * the interval in y-direction
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the given interval
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DSetCoefficients (tSpline2D *sp, int idx, double s,
|
|
|
+ double cx[4], double cy[4]);
|
|
|
+/** Function to get the coefficients of a two-dimensional spline in the interval
|
|
|
+ * a given offset belongs to
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] s Given s-offset on the spline
|
|
|
+ * \param[out] si Offset of <b>s</b> from the start of the interval <b>s</b>
|
|
|
+ * belongs to
|
|
|
+ * \param[out] cx Array for the coefficients of the two-dimensional spline in
|
|
|
+ * the interval <b>s</b> belongs to in x-direction
|
|
|
+ * \param[out] cy Array for the coefficients of the two-dimensional spline in
|
|
|
+ * the interval <b>s</b> belongs to in y-direction
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DGetCoefficients (tSpline2D *sp, double s, double *si,
|
|
|
+ double cx[4], double cy[4]);
|
|
|
+
|
|
|
+/** Function to get position and s-offset of a certain node of a two-dimensional
|
|
|
+ * spline
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] idx Index of the interval starting with the node
|
|
|
+ * \param[out] s Offset of the node on the spline
|
|
|
+ * \param[out] x x-coordinate of the node
|
|
|
+ * \param[out] y y-coordinate of the node
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the given interval
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DGetNode (tSpline2D *sp, int idx, double *s,
|
|
|
+ double *x, double *y);
|
|
|
+/** Function to get the normal unit vector and the curvature of a
|
|
|
+ * two-dimensional spline at a given offset
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] normVec Normal unit vector of the spline at <b>s</b>
|
|
|
+ * \param[out] curvature Curvature of the spline at <b>s</b>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DGetNormVecAndCurvature(tSpline2D *sp, double s,
|
|
|
+ double normVec[2], double *curvature);
|
|
|
+/** Function to get the normal unit vector and the curvature of a
|
|
|
+ * two-dimensional spline at a given node
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] nodeIdx Index of the given node
|
|
|
+ * \param[out] normVec Normal unit vector of the spline at the given node
|
|
|
+ * \param[out] curvature Curvature of the spline at the given node
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DGetNormVecAndCurvatureAtNode ( tSpline2D *sp, int nodeIdx,
|
|
|
+ double normVec[2], double *curvature);
|
|
|
+/** Function to get the normalized direction vector of a two-dimensional spline
|
|
|
+ * at a given node
|
|
|
+ * \param[in] sp Pointer to the two-dimensional spline
|
|
|
+ * \param[in] nodeIdx Index of the given node
|
|
|
+ * \param[out] dir Normalized direction vector
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline2DGetNormDirectionVectorAtNode (tSpline2D *sp, int nodeIdx,
|
|
|
+ double dir[2]);
|
|
|
+
|
|
|
+
|
|
|
+/** Function to generate a new three-dimensional spline
|
|
|
+ * \param[in] n Number of nodes: The resulting number of intervals is
|
|
|
+ * <b>n</b>-1.
|
|
|
+ * \param[in] xyz List of nodes in the three-dimensional space
|
|
|
+ * (array of size <b>n</b>)
|
|
|
+ * \param[in] sType Type of spline
|
|
|
+ * \param[in] pType Type of parametrization
|
|
|
+ * \param[in] w List of weights of the nodes (array of size <b>n</b>:
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv0 Direction vector for the first node <b>xyz</b>[0]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv1 Direction vector for the last node <b>xyz</b>[<b>n</b>-1]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct containing the data of the new spline
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see Spline3DNewExt() \see Spline3DDelete()
|
|
|
+ */
|
|
|
+tSpline3D *Spline3DNew (int n, double (*xyz)[3],
|
|
|
+ tSplineType sType, tSplineParametrisationType pType,
|
|
|
+ double *w, double dv0[3], double dv1[3]);
|
|
|
+/** Function to generate a new three-dimensional spline\n
|
|
|
+ * <em><b>Extended version:</b></em> A given parametrization can be used.
|
|
|
+ * \param[in] n Number of nodes: The resulting number of intervals is
|
|
|
+ * <b>n</b>-1.
|
|
|
+ * \param[in] xyz List of nodes in the three-dimensional space
|
|
|
+ * (array of size <b>n</b>)
|
|
|
+ * \param[in] s Pointer to the given parametrization (array of size <b>n</b>)\n
|
|
|
+ * If this parameter is the NULL pointer, the parametrization is done
|
|
|
+ * considering the parametrization type.
|
|
|
+ * \param[in] sType Type of spline
|
|
|
+ * \param[in] pType Type of parametrization (only relevant if no parametrization
|
|
|
+ * is given)
|
|
|
+ * \param[in] w List of weights of the nodes (array of size <b>n</b>):
|
|
|
+ * depending on the spline type;
|
|
|
+ * \param[in] dv0 Direction vector for the first node <b>xyz</b>[0]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \param[in] dv1 Direction vector for the last node<b>xyz</b>[0]:
|
|
|
+ * depending on the spline type
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> pointer to a struct containing the data of the new spline
|
|
|
+ * <tr><td> In case of failure: <td> NULL pointer
|
|
|
+ * </table>
|
|
|
+ * \see Spline3DNew()
|
|
|
+ */
|
|
|
+tSpline3D *Spline3DNewExt(int n, double (*xyz)[3], double *s,
|
|
|
+ tSplineType sType, tSplineParametrisationType pType,
|
|
|
+ double *w, double dv0[3], double dv1[3]);
|
|
|
+/** Function to delete a three-dimensional spline\n
|
|
|
+ * The memory of the spline is freed and the pointer to it is set to NULL.
|
|
|
+ * \param[in] sp Three-dimensional spline that should be deleted
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success: <td> #ROAD_Ok
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \see Spline3DNew()
|
|
|
+ */
|
|
|
+int Spline3DDelete(tSpline3D **sp);
|
|
|
+
|
|
|
+/** Function to get the number of nodes of a given three-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the three-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of nodes of the spline
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ * \deprecated Use Spline3DNodeCount() to get the number of nodes of a three-
|
|
|
+ * dimensional spline.
|
|
|
+ */
|
|
|
+int Spline3DNumOfNodes(tSpline3D *sp);
|
|
|
+/** Function to get the number of nodes of a given three-dimensional spline
|
|
|
+ * \param[in] sp Pointer to the three-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> number of nodes of the spline
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline3DNodeCount (tSpline3D *sp);
|
|
|
+/** Function to get the length of a given three-dimensional spline
|
|
|
+ * \param[in] sp Pointer to a three-dimensional spline
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> length of the spline in meters
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+double Spline3DLength (tSpline3D *sp);
|
|
|
+
|
|
|
+/** Function to calculate the value and the direction vector of a
|
|
|
+ * three-dimensional spline at a given offset
|
|
|
+ * \param[in] sp Pointer to the three-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] xyz Value of the spline at <b>s</b>
|
|
|
+ * \param[out] dvXYZ Direction vector of the spline at <b>s</b>\n
|
|
|
+ * <em><b>Note</b></em>: Discarded in case this parameter is the NULL pointer.
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline3DCalc(tSpline3D *sp, double s, double xyz[3], double dvXYZ[3]);
|
|
|
+
|
|
|
+/** Function to get the coefficients of a three-dimensional spline
|
|
|
+ * in the interval a given offset belongs to
|
|
|
+ * \param[in] sp Pointer to the three-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] si Offset of <b>s</b> from the end of the interval <b>s</b>
|
|
|
+ * belongs to
|
|
|
+ * \param[out] cx Array for the coefficients of the three-dimensional spline in
|
|
|
+ * the interval <b>s</b> belongs to in x-direction
|
|
|
+ * \param[out] cy Array for the coefficients of the three-dimensional spline in
|
|
|
+ * the interval <b>s</b> belongs to in y-direction
|
|
|
+ * \param[out] cz Array for the coefficients of the three-dimensional spline in
|
|
|
+ * the interval <b>s</b> belongs to in z-direction
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline3DGetCoefficients (tSpline3D *sp, double s, double *si,
|
|
|
+ double cx[4], double cy[4], double cz[4]);
|
|
|
+/** Function to get the normal unit vector and the curvature of a
|
|
|
+ * three-dimensional spline at a given offset
|
|
|
+ * \param[in] sp Pointer to the three-dimensional spline
|
|
|
+ * \param[in] s Given offset
|
|
|
+ * \param[out] normVec Normal unit vector of the spline at <b>s</b>
|
|
|
+ * \param[out] curvature Curvature of the spline at <b>s</b>
|
|
|
+ * \return <table frame=void cellspacing="0" frame=void cellspacing="0">
|
|
|
+ * <tr><td style="width:120px"> In case of success:
|
|
|
+ * <td> index of the interval <b>s</b> belongs to
|
|
|
+ * <tr><td> In case of failure:
|
|
|
+ * <td> see \ref ErrorCodes "error codes" for the road.
|
|
|
+ * </table>
|
|
|
+ */
|
|
|
+int Spline3DGetNormVecAndCurvature(tSpline3D *sp, double s,
|
|
|
+ double normVec[3], double *curvature);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+/******************************************************************************/
|
|
|
+/* === Error Codes ========================================================== */
|
|
|
+/******************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+/** \addtogroup ErrorCodes
|
|
|
+ * @{
|
|
|
+ */
|
|
|
+
|
|
|
+/*** General Errors ***/
|
|
|
+
|
|
|
+/** General error: no builder finish necessary\note
|
|
|
+ * Possible return value of #RoadBuilderFinish().
|
|
|
+ */
|
|
|
+#define ROAD_NoBF 2
|
|
|
+/** General error: cancel
|
|
|
+ */
|
|
|
+#define ROAD_Cancel 1
|
|
|
+/** General error: all correct
|
|
|
+ */
|
|
|
+#define ROAD_Ok 0
|
|
|
+/** General error: general error
|
|
|
+ */
|
|
|
+#define ROAD_Error -1
|
|
|
+/** General error: warning
|
|
|
+ */
|
|
|
+#define ROAD_Warn -2
|
|
|
+/** General error: license error
|
|
|
+ */
|
|
|
+#define ROAD_LicError -3
|
|
|
+/** General error: memory error
|
|
|
+ */
|
|
|
+#define ROAD_MemError -4
|
|
|
+/** General error: invalid road handle
|
|
|
+ * \see ROAD_RoadHandleError
|
|
|
+ */
|
|
|
+#define ROAD_BadRoad -5
|
|
|
+/** General error: invalid road\n
|
|
|
+ * Builder finish necessary
|
|
|
+ */
|
|
|
+#define ROAD_InvalidRoad -6
|
|
|
+/** General error: object id error\n
|
|
|
+ * \see ROAD_InvalidObjId
|
|
|
+ */
|
|
|
+#define ROAD_ObjIdErr -7
|
|
|
+/** General error: maximum number of errors reached
|
|
|
+ */
|
|
|
+#define ROAD_ReachedMaxError -8
|
|
|
+/** General error: empty road\n
|
|
|
+ * An instance of the road is called empty, if no <em>Link</em> is defined.
|
|
|
+ */
|
|
|
+#define ROAD_EmptyRoad -9
|
|
|
+
|
|
|
+
|
|
|
+/*** Road Definition Errors ***/
|
|
|
+
|
|
|
+/** Road definition error: data error
|
|
|
+ * \see ROAD_ParamError
|
|
|
+ */
|
|
|
+#define ROAD_DataError -10
|
|
|
+/** Road definition error: external file error
|
|
|
+ */
|
|
|
+#define ROAD_ExtFileError -11
|
|
|
+/** Road definition error: Link error
|
|
|
+ */
|
|
|
+#define ROAD_LinkError -12
|
|
|
+/** Road definition error: Junction error
|
|
|
+ */
|
|
|
+#define ROAD_JuncError -13
|
|
|
+/** Road definition error: Segment error
|
|
|
+ */
|
|
|
+#define ROAD_SegmentError -14
|
|
|
+/** Road definition error: Lane section error
|
|
|
+ */
|
|
|
+#define ROAD_LaneSectionError -15
|
|
|
+/** Road definition error: Lane error
|
|
|
+ */
|
|
|
+#define ROAD_LaneError -25
|
|
|
+/** Road definition error: Height profile error
|
|
|
+ */
|
|
|
+#define ROAD_LaneZProfileError -16
|
|
|
+/** Road definition error: Bump error
|
|
|
+ */
|
|
|
+#define ROAD_BumpError -17
|
|
|
+/** Road definition error: Marker error
|
|
|
+ */
|
|
|
+#define ROAD_MarkerError -18
|
|
|
+/** Road definition error: Sensor object error
|
|
|
+ */
|
|
|
+#define ROAD_SensorObjectError -19
|
|
|
+/** Road definition error: object list error
|
|
|
+ */
|
|
|
+#define ROAD_ObjectListError -20
|
|
|
+/** Road definition error: Route error
|
|
|
+ */
|
|
|
+#define ROAD_RouteError -21
|
|
|
+/** Road definition error: Path error
|
|
|
+ */
|
|
|
+#define ROAD_PathError -22
|
|
|
+/** Road definition error: parameter error
|
|
|
+ * \see ROAD_DataError
|
|
|
+ */
|
|
|
+#define ROAD_ParamError -23
|
|
|
+
|
|
|
+
|
|
|
+/*** Road File IO Errors ***/
|
|
|
+
|
|
|
+/** Road file IO error: file not found
|
|
|
+ */
|
|
|
+#define ROAD_FileNotFound -30
|
|
|
+/** Road file IO error: unknown file format
|
|
|
+ */
|
|
|
+#define ROAD_FileUnknownFormat -31
|
|
|
+/** Road file IO error: error reading from a file
|
|
|
+ */
|
|
|
+#define ROAD_FileReadError -32
|
|
|
+/** Road file IO error: error writing on a file
|
|
|
+ */
|
|
|
+#define ROAD_FileWriteError -33
|
|
|
+/** Road file IO error: error reading from a road 4.5 file
|
|
|
+ */
|
|
|
+#define ROAD_File45Error -34
|
|
|
+/** Road file IO error: file ident error
|
|
|
+ */
|
|
|
+#define ROAD_FileIdentError -35
|
|
|
+/** Road file IO error: invalid binary file
|
|
|
+ */
|
|
|
+#define ROAD_BadBinFile -36
|
|
|
+/** Road file IO error: invalid external file
|
|
|
+ */
|
|
|
+#define ROAD_BadDigFile -37
|
|
|
+/** Road file IO error: error opening a file
|
|
|
+ */
|
|
|
+#define ROAD_FileOpenError -38
|
|
|
+/** Road file IO error: file name error
|
|
|
+ */
|
|
|
+#define ROAD_FileNameError -39
|
|
|
+
|
|
|
+
|
|
|
+/*** Road InfoFile Errors ***/
|
|
|
+
|
|
|
+/** Road InfoFile error: InfoFile error
|
|
|
+ */
|
|
|
+#define ROAD_InfError -40
|
|
|
+/** Road InfoFile error: InfoFile warning
|
|
|
+ */
|
|
|
+#define ROAD_InfWarn -41
|
|
|
+/** Road InfoFile error: missing key in InfoFile
|
|
|
+ */
|
|
|
+#define ROAD_InfMissingKey -42
|
|
|
+
|
|
|
+
|
|
|
+/*** Road Spline Errors ***/
|
|
|
+
|
|
|
+/** Road spline error: spline error
|
|
|
+ */
|
|
|
+#define ROAD_SplineError -50
|
|
|
+
|
|
|
+
|
|
|
+/*** Road GCS Errors ***/
|
|
|
+
|
|
|
+/** Road GCS error: GCS error
|
|
|
+ */
|
|
|
+#define ROAD_GCSError -60
|
|
|
+
|
|
|
+
|
|
|
+/*** Road Update Errors ***/
|
|
|
+
|
|
|
+/** Update error: error updating a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkError -70
|
|
|
+/** Update error: error updating a <em>Segment</em> of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkSegError -71
|
|
|
+/** Update error: error updating a <em>Lane section</em> of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkLSError -72
|
|
|
+/** Update error: error updating the <em>Elevation profile</em> of a
|
|
|
+ * <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkZElevError -73
|
|
|
+/** Update error: error updating the <em>Slope profile</em> of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkZSlopeError -74
|
|
|
+/** Update error: error updating the <em>Camber profile</em> of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkZCamberError -75
|
|
|
+/** Update error: error updating a <em>Bump</em> of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkBumpError -76
|
|
|
+/** Update error: error updating a marker of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkMarkerError -77
|
|
|
+/** Update error: error updating a sensor object of a <em>Link</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateLinkSensorObjError -78
|
|
|
+
|
|
|
+/** Update error: error updating a <em>Junction</em>
|
|
|
+ */
|
|
|
+#define ROAD_UpdateJuncError -80
|
|
|
+
|
|
|
+
|
|
|
+/*** Road Connect Errors ***/
|
|
|
+
|
|
|
+/** Connect error: error connecting a <em>Link</em> to a <em>Junction</em>\n
|
|
|
+ * The <em>Link</em> is already connected.\note
|
|
|
+ * Possible return value of #RoadJunctionArmConnectLink().
|
|
|
+ */
|
|
|
+#define ROAD_JuncConnectError -90
|
|
|
+/** Connect error: position error connecting a <em>Link</em> and a
|
|
|
+ * <em>Junction</em>\n
|
|
|
+ * Link node and junction knot don't match or the <em>Reference line</em>
|
|
|
+ * failed to be updated. \note
|
|
|
+ * Possible return value of #RoadJunctionArmConnectLink().
|
|
|
+ */
|
|
|
+#define ROAD_JuncConnectXYError -91
|
|
|
+/** Connect error: z-offset error connecting a <em>Link</em> and a
|
|
|
+ * <em>Junction</em>\n
|
|
|
+ * The update of the <em>Link's</em> <em>Elevation profile</em> failed or the
|
|
|
+ * elevation in the link node and the junction knot don't match. \note
|
|
|
+ * Possible return value of #RoadJunctionArmConnectLink().
|
|
|
+ */
|
|
|
+#define ROAD_JuncConnectZError -92
|
|
|
+/** Connect error: angle error connecting a <em>Link</em> and a
|
|
|
+ * <em>Junction</em>\note
|
|
|
+ * Possible return value of #RoadJunctionArmConnectLink().
|
|
|
+ */
|
|
|
+#define ROAD_JuncConnectAngleError -93
|
|
|
+
|
|
|
+/** Connect error: general connect error\note
|
|
|
+ * Possible return value of #RoadConnect().
|
|
|
+ */
|
|
|
+#define ROAD_ConnectError -100
|
|
|
+
|
|
|
+
|
|
|
+/*** Handle Errors ***/
|
|
|
+
|
|
|
+/** Handle error: road handle error
|
|
|
+ */
|
|
|
+#define ROAD_RoadHandleError -110
|
|
|
+/** Handle error: evaluation handle error
|
|
|
+ */
|
|
|
+#define ROAD_EvalHandleError -111
|
|
|
+/** Handle error: Route handle error
|
|
|
+ */
|
|
|
+#define ROAD_RouteHandleError -112
|
|
|
+
|
|
|
+
|
|
|
+/*** Evaluation Errors ***/
|
|
|
+
|
|
|
+/** Evaluation error: general evaluation error
|
|
|
+ */
|
|
|
+#define ROAD_EvalError -120
|
|
|
+/** Evaluation error: invalid <em>Link</em>\note
|
|
|
+ * Possible return value of #RoadLinkGeoEval().
|
|
|
+ */
|
|
|
+#define ROAD_EvalInvalidLink -121
|
|
|
+/** Evaluation error: invalid <em>Reference line</em>\note
|
|
|
+ * Possible return value of #RoadRefLineGeoEval().
|
|
|
+ */
|
|
|
+#define ROAD_EvalInvalidRefline -122
|
|
|
+/** Evaluation error: invalid <em>Route</em>
|
|
|
+ */
|
|
|
+#define ROAD_EvalInvalidRoute -123
|
|
|
+/** Evaluation error: invalid <em>Lane</em>
|
|
|
+ */
|
|
|
+#define ROAD_EvalInvalidLane -124
|
|
|
+/** Evaluation error: not a number
|
|
|
+ */
|
|
|
+#define ROAD_EvalNANError -125
|
|
|
+
|
|
|
+
|
|
|
+/*** Route Errors ***/
|
|
|
+
|
|
|
+/** Route error: Route version 6
|
|
|
+ */
|
|
|
+#define ROAD_Route6Error -150
|
|
|
+/** Route error: Route version 7
|
|
|
+ */
|
|
|
+#define ROAD_Route7Error -151
|
|
|
+
|
|
|
+
|
|
|
+/** @} */
|
|
|
+
|
|
|
+#ifdef __cplusplus
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif
|