Branch data Line data Source code
1 : : // ----------------- BEGIN LICENSE BLOCK --------------------------------- 2 : : // 3 : : // Copyright (C) 2018-2021 Intel Corporation 4 : : // 5 : : // SPDX-License-Identifier: MIT 6 : : // 7 : : // ----------------- END LICENSE BLOCK ----------------------------------- 8 : : 9 : : #pragma once 10 : : 11 : : #include "SyntheticIntersectionTestBase.hpp" 12 : : 13 : : namespace ad { 14 : : namespace map { 15 : : 16 : : /** 17 : : * @brief base class for traffic light intersection tests 18 : : * 19 : : * Strictly speaking this is the base class for all traffic light related 20 : : * tests located at Elfmorgenbruch-Ruschgraben ... 21 : : */ 22 : : struct IntersectionTrafficLightTest : virtual SyntheticIntersectionTestBase 23 : : { 24 : : virtual void prepareMap() const override; 25 : : 26 : 12 : virtual point::GeoPoint getGeoFromNorth() const override 27 : : { 28 : : return point::createGeoPoint( 29 : 12 : point::Longitude(8.45787), point::Latitude(49.02084), point::Altitude(0)); // An der Tagweide 30 : : } 31 : : 32 : 12 : virtual point::GeoPoint getGeoToNorth() const override 33 : : { 34 : : return point::createGeoPoint( 35 : 12 : point::Longitude(8.45782), point::Latitude(49.02073), point::Altitude(0)); // An der Tagweide 36 : : } 37 : : 38 : 12 : virtual point::GeoPoint getGeoFromSouth() const override 39 : : { 40 : : return point::createGeoPoint( 41 : 12 : point::Longitude(8.45765), point::Latitude(49.02046), point::Altitude(0)); // Elfmorgenbruchstrasse 42 : : } 43 : 12 : virtual point::GeoPoint getGeoToSouth() const override 44 : : { 45 : : return point::createGeoPoint( 46 : 12 : point::Longitude(8.45758), point::Latitude(49.02055), point::Altitude(0)); // Elfmorgenbruchstrasse 47 : : } 48 : : 49 : 12 : virtual point::GeoPoint getGeoFromWest() const override 50 : : { 51 : : return point::createGeoPoint( 52 : 12 : point::Longitude(8.45746), point::Latitude(49.02073), point::Altitude(0)); // Ruschgraben 53 : : } 54 : : 55 : 12 : virtual point::GeoPoint getGeoToWest() const override 56 : : { 57 : : return point::createGeoPoint( 58 : 12 : point::Longitude(8.45755), point::Latitude(49.02073), point::Altitude(0)); // Ruschgraben 59 : : } 60 : : 61 : 12 : virtual point::GeoPoint getGeoFromEast() const override 62 : : { 63 : : return point::createGeoPoint( 64 : 12 : point::Longitude(8.45807), point::Latitude(49.02059), point::Altitude(0)); // Am Storrenacker 65 : : } 66 : : 67 : 12 : virtual point::GeoPoint getGeoToEast() const override 68 : : { 69 : : return point::createGeoPoint( 70 : 12 : point::Longitude(8.45795), point::Latitude(49.02057), point::Altitude(0)); // Am Storrenacker 71 : : } 72 : : }; 73 : : 74 : : /** 75 : : * @brief base class for traffic light intersection tests coming from west 76 : : */ 77 : : struct IntersectionTrafficLightFromWestTest : virtual IntersectionTrafficLightTest 78 : : { 79 : : virtual lane::LaneId getRouteStart() const override; 80 : : virtual intersection::IntersectionType expectedIntersectionType() const override; 81 : : }; 82 : : 83 : : /** 84 : : * @brief base class for traffic light intersection tests coming from west to north 85 : : */ 86 : : struct IntersectionTrafficLightWestToNorthTest : IntersectionTrafficLightFromWestTest 87 : : { 88 : : virtual lane::LaneId getRouteEnd() const override; 89 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 90 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 91 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 92 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 93 : : }; 94 : : 95 : : /** 96 : : * @brief base class for traffic light intersection tests coming from west to east 97 : : */ 98 : : struct IntersectionTrafficLightWestToEastTest : IntersectionTrafficLightFromWestTest 99 : : { 100 : : virtual lane::LaneId getRouteEnd() const override; 101 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 102 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 103 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 104 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 105 : : }; 106 : : 107 : : /** 108 : : * @brief base class for traffic light intersection tests coming from west to south 109 : : */ 110 : : struct IntersectionTrafficLightWestToSouthTest : virtual IntersectionTrafficLightFromWestTest 111 : : { 112 : : virtual lane::LaneId getRouteEnd() const override; 113 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 114 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 115 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 116 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 117 : : }; 118 : : 119 : : /** 120 : : * @brief base class for traffic light intersection tests coming from east 121 : : */ 122 : : struct IntersectionTrafficLightFromEastTest : IntersectionTrafficLightTest 123 : : { 124 : : virtual lane::LaneId getRouteStart() const override; 125 : : virtual intersection::IntersectionType expectedIntersectionType() const override; 126 : : }; 127 : : 128 : : /** 129 : : * @brief base class for traffic light intersection tests coming from east to north 130 : : */ 131 : : struct IntersectionTrafficLightEastToNorthTest : IntersectionTrafficLightFromEastTest 132 : : { 133 : : virtual lane::LaneId getRouteEnd() const override; 134 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 135 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 136 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 137 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 138 : : }; 139 : : 140 : : /** 141 : : * @brief base class for traffic light intersection tests coming from east to west 142 : : */ 143 : : struct IntersectionTrafficLightEastToWestTest : IntersectionTrafficLightFromEastTest 144 : : { 145 : : virtual lane::LaneId getRouteEnd() const override; 146 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 147 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 148 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 149 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 150 : : }; 151 : : 152 : : /** 153 : : * @brief base class for traffic light intersection tests coming from east to south 154 : : */ 155 : : struct IntersectionTrafficLightEastToSouthTest : IntersectionTrafficLightFromEastTest 156 : : { 157 : : virtual lane::LaneId getRouteEnd() const override; 158 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 159 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 160 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 161 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 162 : : }; 163 : : 164 : : /** 165 : : * @brief base class for traffic light intersection tests coming from north 166 : : */ 167 : : struct IntersectionTrafficLightFromNorthTest : IntersectionTrafficLightTest 168 : : { 169 : : virtual lane::LaneId getRouteStart() const override; 170 : : virtual intersection::IntersectionType expectedIntersectionType() const override; 171 : : }; 172 : : 173 : : /** 174 : : * @brief base class for traffic light intersection tests coming from north to east 175 : : */ 176 : : struct IntersectionTrafficLightNorthToEastTest : IntersectionTrafficLightFromNorthTest 177 : : { 178 : : virtual lane::LaneId getRouteEnd() const override; 179 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 180 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 181 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 182 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 183 : : }; 184 : : 185 : : /** 186 : : * @brief base class for traffic light intersection tests coming from north to west 187 : : */ 188 : : struct IntersectionTrafficLightNorthToWestTest : IntersectionTrafficLightFromNorthTest 189 : : { 190 : : virtual lane::LaneId getRouteEnd() const override; 191 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 192 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 193 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 194 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 195 : : }; 196 : : 197 : : /** 198 : : * @brief base class for traffic light intersection tests coming from north to south 199 : : */ 200 : : struct IntersectionTrafficLightNorthToSouthTest : IntersectionTrafficLightFromNorthTest 201 : : { 202 : : virtual lane::LaneId getRouteEnd() const override; 203 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 204 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 205 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 206 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 207 : : }; 208 : : 209 : : /** 210 : : * @brief base class for traffic light intersection tests coming from south 211 : : */ 212 : : struct IntersectionTrafficLightFromSouthTest : IntersectionTrafficLightTest 213 : : { 214 : : virtual lane::LaneId getRouteStart() const override; 215 : : virtual intersection::IntersectionType expectedIntersectionType() const override; 216 : : }; 217 : : 218 : : /** 219 : : * @brief base class for traffic light intersection tests coming from south to east 220 : : */ 221 : : struct IntersectionTrafficLightSouthToEastTest : IntersectionTrafficLightFromSouthTest 222 : : { 223 : : virtual lane::LaneId getRouteEnd() const override; 224 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 225 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 226 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 227 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 228 : : }; 229 : : 230 : : /** 231 : : * @brief base class for traffic light intersection tests coming from south to west 232 : : */ 233 : : struct IntersectionTrafficLightSouthToWestTest : IntersectionTrafficLightFromSouthTest 234 : : { 235 : : virtual lane::LaneId getRouteEnd() const override; 236 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 237 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 238 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 239 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 240 : : }; 241 : : 242 : : /** 243 : : * @brief base class for traffic light intersection tests coming from south to north 244 : : */ 245 : : struct IntersectionTrafficLightSouthToNorthTest : IntersectionTrafficLightFromSouthTest 246 : : { 247 : : virtual lane::LaneId getRouteEnd() const override; 248 : : virtual lane::LaneIdSet expectedIncomingLanesWithHigherPriority() const override; 249 : : virtual lane::LaneIdSet expectedIncomingLanesWithLowerPriority() const override; 250 : : virtual lane::LaneIdSet expectedInternalLanesWithHigherPriority() const override; 251 : : virtual lane::LaneIdSet expectedCrossingLanes() const override; 252 : : }; 253 : : 254 : : } // namespace map 255 : : } // namespace ad