LCOV - code coverage report
Current view: top level - impl/tests - RssSceneCreationTest.hpp (source / functions) Hit Total Coverage
Test: ad_rss_map_integration Lines: 185 192 96.4 %
Date: 2021-08-31 11:35:01 Functions: 34 34 100.0 %
Branches: 80 279 28.7 %

           Branch data     Line data    Source code
       1                 :            : // ----------------- BEGIN LICENSE BLOCK ---------------------------------
       2                 :            : //
       3                 :            : // Copyright (C) 2019-2020 Intel Corporation
       4                 :            : //
       5                 :            : // SPDX-License-Identifier: LGPL-2.1-only
       6                 :            : //
       7                 :            : // ----------------- END LICENSE BLOCK -----------------------------------
       8                 :            : 
       9                 :            : #include <ad/map/access/Logging.hpp>
      10                 :            : #include <ad/map/access/Operation.hpp>
      11                 :            : #include <ad/map/match/AdMapMatching.hpp>
      12                 :            : #include <ad/map/route/Planning.hpp>
      13                 :            : #include <ad/rss/core/RssCheck.hpp>
      14                 :            : #include <ad/rss/map/Logging.hpp>
      15                 :            : #include <ad/rss/map/RssSceneCreation.hpp>
      16                 :            : #include <ad/rss/situation/SituationSnapshot.hpp>
      17                 :            : #include <ad/rss/state/ProperResponse.hpp>
      18                 :            : #include <ad/rss/state/RssStateSnapshot.hpp>
      19                 :            : #include <ad/rss/world/WorldModelValidInputRange.hpp>
      20                 :            : #include <gtest/gtest.h>
      21                 :            : 
      22                 :            : #include <fstream>
      23                 :            : #include <streambuf>
      24                 :            : 
      25                 :            : struct RssSceneCreationTest : ::testing::Test
      26                 :            : {
      27                 :            :   const ::ad::physics::Duration cResponseTimeEgoVehicle{1};
      28                 :            :   const ::ad::physics::Duration cResponseTimeOtherVehicles{2};
      29                 :            : 
      30                 :            :   const ::ad::physics::Acceleration cMaximumLongitudinalAcceleration{3.5};
      31                 :            :   const ::ad::physics::Acceleration cMinimumLongitudinalBrakingDeceleleration{-4};
      32                 :            :   const ::ad::physics::Acceleration cMaximumLongitudinalBrakingDeceleleration{-8};
      33                 :            :   const ::ad::physics::Acceleration cMinimumLongitudinalBrakingDecelelerationCorrect{-3};
      34                 :            : 
      35                 :            :   const ::ad::physics::Acceleration cMaximumLateralAcceleration{0.2};
      36                 :            :   const ::ad::physics::Acceleration cMinimumLateralBrakingDeceleleration{-0.8};
      37                 :            : 
      38                 :            :   typedef std::tuple<::ad::rss::situation::SituationType, size_t, size_t, ::ad::physics::Speed> ExpectedResultTuple;
      39                 :            :   typedef std::tuple<::ad::map::point::Longitude, ::ad::map::point::Latitude, double> ObjectGeoLocationTuple;
      40                 :            : 
      41                 :            :   enum class TestMode
      42                 :            :   {
      43                 :            :     withRouteWithSpeedLimit,
      44                 :            :     withoutRouteWithoutSpeedLimit
      45                 :            :   };
      46                 :            : 
      47                 :        916 :   ::ad::rss::world::UnstructuredSettings getUnstructuredSettings()
      48                 :            :   {
      49                 :        916 :     ::ad::rss::world::UnstructuredSettings unstructuredSettings;
      50                 :        916 :     unstructuredSettings.pedestrianTurningRadius = ad::physics::Distance(2.0);
      51                 :        916 :     unstructuredSettings.driveAwayMaxAngle = ad::physics::Angle(2.4);
      52                 :        916 :     unstructuredSettings.vehicleYawRateChange = ad::physics::AngularAcceleration(0.3);
      53                 :        916 :     unstructuredSettings.vehicleMinRadius = ad::physics::Distance(3.5);
      54                 :        916 :     unstructuredSettings.vehicleTrajectoryCalculationStep = ad::physics::Duration(0.2);
      55                 :        916 :     return unstructuredSettings;
      56                 :            :   }
      57                 :            : 
      58                 :        428 :   ::ad::rss::world::RssDynamics getEgoVehicleDynamics(::ad::physics::Speed const maxSpeedOnAcceleration
      59                 :            :                                                       = ::ad::physics::Speed(100.))
      60                 :            :   {
      61                 :        428 :     ::ad::rss::world::RssDynamics result;
      62                 :        428 :     result.alphaLat.accelMax = cMaximumLateralAcceleration;
      63                 :        428 :     result.alphaLat.brakeMin = cMinimumLateralBrakingDeceleleration;
      64                 :            : 
      65                 :        428 :     result.alphaLon.accelMax = cMaximumLongitudinalAcceleration;
      66                 :        428 :     result.alphaLon.brakeMinCorrect = cMinimumLongitudinalBrakingDecelelerationCorrect;
      67                 :        428 :     result.alphaLon.brakeMin = cMinimumLongitudinalBrakingDeceleleration;
      68                 :        428 :     result.alphaLon.brakeMax = cMaximumLongitudinalBrakingDeceleleration;
      69                 :            : 
      70                 :        428 :     result.lateralFluctuationMargin = ::ad::physics::Distance(0.);
      71                 :            : 
      72                 :        428 :     result.responseTime = cResponseTimeEgoVehicle;
      73                 :        428 :     result.maxSpeedOnAcceleration = maxSpeedOnAcceleration;
      74                 :            : 
      75                 :        428 :     result.unstructuredSettings = getUnstructuredSettings();
      76                 :            : 
      77                 :        428 :     return result;
      78                 :            :   }
      79                 :            : 
      80                 :        488 :   ::ad::rss::world::RssDynamics getObjectVehicleDynamics(::ad::physics::Speed const maxSpeedOnAcceleration
      81                 :            :                                                          = ::ad::physics::Speed(100.))
      82                 :            :   {
      83                 :        488 :     ::ad::rss::world::RssDynamics result;
      84                 :        488 :     result.alphaLat.accelMax = cMaximumLateralAcceleration;
      85                 :        488 :     result.alphaLat.brakeMin = cMinimumLateralBrakingDeceleleration;
      86                 :            : 
      87                 :        488 :     result.alphaLon.accelMax = cMaximumLongitudinalAcceleration;
      88                 :        488 :     result.alphaLon.brakeMinCorrect = cMinimumLongitudinalBrakingDecelelerationCorrect;
      89                 :        488 :     result.alphaLon.brakeMin = cMinimumLongitudinalBrakingDeceleleration;
      90                 :        488 :     result.alphaLon.brakeMax = cMaximumLongitudinalBrakingDeceleleration;
      91                 :            : 
      92                 :        488 :     result.lateralFluctuationMargin = ::ad::physics::Distance(0.);
      93                 :            : 
      94                 :        488 :     result.responseTime = cResponseTimeOtherVehicles;
      95                 :        488 :     result.maxSpeedOnAcceleration = maxSpeedOnAcceleration;
      96                 :            : 
      97                 :        488 :     result.unstructuredSettings = getUnstructuredSettings();
      98                 :            : 
      99                 :        488 :     return result;
     100                 :            :   }
     101                 :            : 
     102                 :            :   enum class MapToLoad
     103                 :            :   {
     104                 :            :     Town01,
     105                 :            :     Town04,
     106                 :            :     None
     107                 :            :   };
     108                 :            : 
     109                 :            :   virtual MapToLoad getMapToLoad() = 0;
     110                 :            : 
     111                 :        214 :   void initMap()
     112                 :            :   {
     113                 :            :     static MapToLoad loadedMap = MapToLoad::None;
     114                 :            : 
     115                 :        214 :     MapToLoad mapToLoad = getMapToLoad();
     116         [ +  + ]:        214 :     if (mapToLoad != loadedMap)
     117                 :            :     {
     118                 :          2 :       ::ad::map::access::cleanup();
     119      [ +  +  - ]:          2 :       switch (mapToLoad)
     120                 :            :       {
     121                 :          1 :         case MapToLoad::Town01:
     122                 :            :           // using priority to the right intersections
     123   [ +  -  +  -  :          1 :           ASSERT_TRUE(::ad::map::access::init("resources/Town01.txt"));
          -  +  -  -  -  
             -  -  -  -  
                      - ]
     124                 :          1 :           break;
     125                 :          1 :         case MapToLoad::Town04:
     126                 :            :         {
     127         [ +  - ]:          1 :           std::ifstream fileStream("resources/Town04.xodr");
     128                 :            :           std::string town04OpenDriveContent((std::istreambuf_iterator<char>(fileStream)),
     129         [ +  - ]:          1 :                                              std::istreambuf_iterator<char>());
     130   [ +  -  -  +  :          1 :           ASSERT_TRUE(::ad::map::access::initFromOpenDriveContent(
          -  -  -  -  -  
                -  -  - ]
     131                 :            :             town04OpenDriveContent, 0.2, ::ad::map::intersection::IntersectionType::TrafficLight));
     132                 :          1 :           break;
     133                 :            :         }
     134                 :          0 :         case MapToLoad::None:
     135                 :            :         default:
     136   [ #  #  #  #  :          0 :           ASSERT_TRUE(false);
          #  #  #  #  #  
                      # ]
     137                 :          0 :           break;
     138                 :            :       }
     139                 :          2 :       loadedMap = mapToLoad;
     140                 :            :     }
     141                 :            :   }
     142                 :            : 
     143                 :            :   virtual void initializeEgoVehicle() = 0;
     144                 :            : 
     145                 :        214 :   void SetUp() override
     146                 :            :   {
     147                 :            :     //::ad::rss::map::getLogger()->set_level(spdlog::level::debug);
     148                 :            :     //::ad::map::access::getLogger()->set_level(spdlog::level::trace);
     149                 :        214 :     initMap();
     150                 :        214 :     initializeEgoVehicle();
     151                 :        214 :   }
     152                 :            : 
     153                 :        214 :   void TearDown() override
     154                 :            :   {
     155                 :        214 :   }
     156                 :            : 
     157                 :        849 :   void initializeObjectGeo(ObjectGeoLocationTuple const &objectLocation, ::ad::map::match::Object &object)
     158                 :            :   {
     159                 :        849 :     auto const lon = std::get<0>(objectLocation);
     160                 :        849 :     auto const lat = std::get<1>(objectLocation);
     161         [ +  - ]:        849 :     auto const yawAngle = ::ad::map::point::createENUHeading(std::get<2>(objectLocation));
     162                 :        849 :     auto positionGeo = ::ad::map::point::createGeoPoint(lon, lat, ::ad::map::point::Altitude(0.));
     163   [ +  -  +  - ]:        849 :     initializeObjectENU(::ad::map::point::toENU(positionGeo), yawAngle, object);
     164                 :        849 :   }
     165                 :            : 
     166                 :        851 :   void initializeObjectENU(::ad::map::point::ENUPoint const &position,
     167                 :            :                            ::ad::map::point::ENUHeading const &heading,
     168                 :            :                            ::ad::map::match::Object &object)
     169                 :            :   {
     170                 :        851 :     object.enuPosition.centerPoint = position;
     171                 :        851 :     object.enuPosition.heading = heading;
     172                 :        851 :     object.enuPosition.dimension.length = ::ad::physics::Distance(4.5);
     173                 :        851 :     object.enuPosition.dimension.width = ::ad::physics::Distance(2.);
     174                 :        851 :     object.enuPosition.dimension.height = ::ad::physics::Distance(1.5);
     175         [ +  - ]:        851 :     object.enuPosition.enuReferencePoint = ::ad::map::access::getENUReferencePoint();
     176                 :            : 
     177         [ +  - ]:        851 :     ::ad::map::match::AdMapMatching mapMatching;
     178                 :            :     object.mapMatchedBoundingBox
     179         [ +  - ]:        851 :       = mapMatching.getMapMatchedBoundingBox(object.enuPosition, ::ad::physics::Distance(2.0));
     180                 :            : 
     181   [ +  -  -  +  :        851 :     ASSERT_GE(object.mapMatchedBoundingBox.referencePointPositions.size(),
          -  -  -  -  -  
                      - ]
     182                 :            :               static_cast<uint64_t>(::ad::map::match::ObjectReferencePoints::Center));
     183   [ +  -  -  +  :        851 :     ASSERT_GE(object.mapMatchedBoundingBox
          -  -  -  -  -  
                      - ]
     184                 :            :                 .referencePointPositions[static_cast<uint64_t>(::ad::map::match::ObjectReferencePoints::Center)]
     185                 :            :                 .size(),
     186                 :            :               0u);
     187                 :            :   }
     188                 :            : 
     189                 :        212 :   void checkSceneResults(::ad::rss::world::WorldModel const &worldModel,
     190                 :            :                          ::ad::rss::world::ObjectId const &otherVehicleId,
     191                 :            :                          std::vector<ExpectedResultTuple> const &expectedResults)
     192                 :            :   {
     193   [ +  -  -  +  :        212 :     EXPECT_TRUE(withinValidInputRange(worldModel));
          -  -  -  -  -  
                -  -  - ]
     194   [ +  -  -  +  :        212 :     ASSERT_EQ(expectedResults.size(), worldModel.scenes.size());
          -  -  -  -  -  
                      - ]
     195                 :            : 
     196         [ +  - ]:        424 :     std::vector<ExpectedResultTuple> notMatchedResults = expectedResults;
     197         [ +  + ]:        487 :     for (auto i = 0u; i < worldModel.scenes.size(); ++i)
     198                 :            :     {
     199                 :        275 :       auto &scene = worldModel.scenes[i];
     200   [ +  -  -  +  :        275 :       EXPECT_TRUE(withinValidInputRange(scene)) << i;
          -  -  -  -  -  
             -  -  -  -  
                      - ]
     201   [ +  -  -  +  :        275 :       EXPECT_EQ(::ad::rss::world::ObjectType::OtherVehicle, scene.object.objectType) << i;
          -  -  -  -  -  
                -  -  - ]
     202   [ +  -  -  +  :        275 :       EXPECT_EQ(otherVehicleId, scene.object.objectId) << i;
          -  -  -  -  -  
                -  -  - ]
     203                 :            :       auto findResult
     204                 :            :         = std::find_if(notMatchedResults.begin(),
     205                 :            :                        notMatchedResults.end(),
     206                 :        556 :                        [this, scene](ExpectedResultTuple const &expectedResultTuple) {
     207                 :        281 :                          return (std::get<0>(expectedResultTuple) == scene.situationType)
     208         [ +  - ]:        275 :                            && (std::get<1>(expectedResultTuple) == scene.egoVehicleRoad.size())
     209         [ +  - ]:        275 :                            && (std::get<2>(expectedResultTuple) == scene.intersectingRoad.size())
     210   [ +  +  +  -  :        556 :                            && (getObjectVehicleDynamics(std::get<3>(expectedResultTuple)) == scene.objectRssDynamics);
                   +  - ]
     211   [ +  -  +  - ]:        275 :                        });
     212         [ +  - ]:        275 :       if (findResult != notMatchedResults.end())
     213                 :            :       {
     214         [ +  - ]:        275 :         notMatchedResults.erase(findResult);
     215                 :            :       }
     216                 :            :       else
     217                 :            :       {
     218   [ #  #  #  #  :          0 :         EXPECT_TRUE(false) << " scene index: " << i << " not found" << scene;
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     219                 :            :       }
     220                 :            :     }
     221   [ -  +  -  -  :        212 :     EXPECT_TRUE(notMatchedResults.empty())
             -  -  -  - ]
     222   [ #  #  #  #  :          0 :       << " not all expected results observed: " << std::get<0>(notMatchedResults[0]) << ", "
                   #  # ]
     223   [ #  #  #  #  :          0 :       << std::get<1>(notMatchedResults[0]) << ", " << std::get<2>(notMatchedResults[0]) << ", "
             #  #  #  # ]
     224   [ #  #  #  # ]:          0 :       << getObjectVehicleDynamics(std::get<3>(notMatchedResults[0]));
     225                 :            :   }
     226                 :            : 
     227                 :        212 :   void shortenEgoRoute(ObjectGeoLocationTuple const &egoGeoLocation)
     228                 :            :   {
     229                 :        212 :     initializeObjectGeo(egoGeoLocation, egoMatchObject);
     230                 :            : 
     231                 :        212 :     ::ad::map::route::shortenRoute(
     232                 :            :       egoMatchObject.mapMatchedBoundingBox
     233                 :        212 :         .referencePointPositions[int32_t(::ad::map::match::ObjectReferencePoints::Center)],
     234                 :        212 :       egoRoute,
     235                 :            :       ::ad::map::route::ShortenRouteMode::DontCutIntersectionAndPrependIfSucceededBeforeRoute);
     236                 :        212 :   }
     237                 :            : 
     238                 :            :   virtual TestMode getTestMode() = 0;
     239                 :            : 
     240                 :        212 :   void performSceneTest(ObjectGeoLocationTuple const &egoLocation,
     241                 :            :                         ObjectGeoLocationTuple const &otherLocation,
     242                 :            :                         std::vector<ExpectedResultTuple> const &expectedResults)
     243                 :            :   {
     244         [ +  - ]:        424 :     ::ad::rss::map::RssSceneCreation sceneCreation(1u, getEgoVehicleDynamics());
     245                 :            : 
     246         [ +  - ]:        212 :     initializeEgoVehicle();
     247         [ +  - ]:        212 :     shortenEgoRoute(egoLocation);
     248                 :            : 
     249                 :        212 :     ::ad::rss::world::ObjectId otherVehicleId{10};
     250                 :        212 :     ::ad::physics::Speed otherVehicleSpeed{10.};
     251                 :        212 :     ::ad::physics::AngularVelocity otherVehicleYawRate{0.};
     252                 :        212 :     ::ad::physics::Angle otherVehicleSteeringAngle{0.};
     253                 :            : 
     254                 :        424 :     ::ad::map::match::Object otherMatchObject;
     255                 :            : 
     256         [ +  - ]:        212 :     initializeObjectGeo(otherLocation, otherMatchObject);
     257                 :            : 
     258                 :        424 :     ::ad::map::route::FullRoute testRoute;
     259                 :        212 :     auto speedLimitMode{::ad::rss::map::RssSceneCreation::RestrictSpeedLimitMode::None};
     260   [ +  -  +  + ]:        212 :     if (getTestMode() == TestMode::withRouteWithSpeedLimit)
     261                 :            :     {
     262         [ +  - ]:        150 :       testRoute = egoRoute;
     263                 :        150 :       speedLimitMode = ::ad::rss::map::RssSceneCreation::RestrictSpeedLimitMode::IncreasedSpeedLimit10;
     264                 :            :     }
     265                 :            : 
     266                 :        424 :     ::ad::rss::map::RssObjectData egoObjectData;
     267                 :        212 :     egoObjectData.id = egoVehicleId;
     268                 :        212 :     egoObjectData.type = ::ad::rss::world::ObjectType::EgoVehicle;
     269         [ +  - ]:        212 :     egoObjectData.matchObject = egoMatchObject;
     270                 :        212 :     egoObjectData.speed = egoSpeed;
     271                 :        212 :     egoObjectData.yawRate = egoYawRate;
     272                 :        212 :     egoObjectData.steeringAngle = egoSteeringAngle;
     273                 :        212 :     egoObjectData.rssDynamics = getEgoVehicleDynamics();
     274                 :            : 
     275                 :        424 :     ::ad::rss::map::RssObjectData otherObjectData;
     276                 :        212 :     otherObjectData.id = otherVehicleId;
     277                 :        212 :     otherObjectData.type = ::ad::rss::world::ObjectType::OtherVehicle;
     278         [ +  - ]:        212 :     otherObjectData.matchObject = otherMatchObject;
     279                 :        212 :     otherObjectData.speed = otherVehicleSpeed;
     280                 :        212 :     otherObjectData.yawRate = otherVehicleYawRate;
     281                 :        212 :     otherObjectData.steeringAngle = otherVehicleSteeringAngle;
     282                 :        212 :     otherObjectData.rssDynamics = getObjectVehicleDynamics();
     283                 :            : 
     284   [ +  -  -  +  :        212 :     EXPECT_TRUE(sceneCreation.appendScenes(egoObjectData,
          -  -  -  -  -  
                -  -  - ]
     285                 :            :                                            testRoute,
     286                 :            :                                            otherObjectData,
     287                 :            :                                            speedLimitMode,
     288                 :            :                                            ::ad::map::landmark::LandmarkIdSet(),
     289                 :            :                                            ::ad::rss::map::RssMode::Structured));
     290                 :            : 
     291         [ +  - ]:        424 :     auto const worldModel = sceneCreation.getWorldModel();
     292         [ +  - ]:        212 :     checkSceneResults(worldModel, otherVehicleId, expectedResults);
     293                 :        212 :   }
     294                 :            : 
     295                 :            :   ::ad::rss::world::ObjectId egoVehicleId{123u};
     296                 :            :   ::ad::physics::Speed egoSpeed;
     297                 :            :   ::ad::physics::AngularVelocity egoYawRate;
     298                 :            :   ::ad::physics::Angle egoSteeringAngle;
     299                 :            :   ::ad::map::match::Object egoMatchObject;
     300                 :            :   ::ad::map::route::FullRoute egoRoute;
     301                 :            : };
     302                 :            : 
     303                 :            : struct RssSceneCreationTestTown01 : RssSceneCreationTest
     304                 :            : {
     305                 :        213 :   MapToLoad getMapToLoad() override
     306                 :            :   {
     307                 :        213 :     return MapToLoad::Town01;
     308                 :            :   }
     309                 :            : 
     310                 :        425 :   void initializeEgoVehicle() override
     311                 :            :   {
     312                 :            :     // laneId: offset 240151:0.55
     313                 :            :     auto egoGeoLocation = std::make_tuple(
     314         [ +  - ]:        425 :       ::ad::map::point::Longitude(8.00125444865324766), ::ad::map::point::Latitude(48.99758627528235877), M_PI_2);
     315                 :            : 
     316         [ +  - ]:        425 :     initializeObjectGeo(egoGeoLocation, egoMatchObject);
     317                 :            : 
     318                 :        425 :     egoSpeed = ::ad::physics::Speed(5.);
     319                 :        425 :     egoYawRate = ::ad::physics::AngularVelocity(0.);
     320                 :        425 :     egoSteeringAngle = ::ad::physics::Angle(0.);
     321                 :            : 
     322                 :            :     // laneId: offset  120149:0.52  (ego turn right)
     323                 :            :     auto positionEndGeo = ::ad::map::point::createGeoPoint(::ad::map::point::Longitude(8.003),
     324                 :            :                                                            ::ad::map::point::Latitude(48.99821051747871792),
     325                 :        425 :                                                            ::ad::map::point::Altitude(0.));
     326                 :            : 
     327                 :        425 :     egoRoute = ::ad::map::route::planning::planRoute(
     328                 :            :       egoMatchObject.mapMatchedBoundingBox
     329                 :        425 :         .referencePointPositions[static_cast<uint64_t>(::ad::map::match::ObjectReferencePoints::Center)][0]
     330         [ +  - ]:        425 :         .lanePoint.paraPoint,
     331                 :        425 :       positionEndGeo);
     332                 :        425 :   }
     333                 :            : 
     334                 :            :   /*
     335                 :            :    *    |  NorthIncoming  NorthOutgoing  |
     336                 :            :    *    |                                |
     337                 :            :    *    |                                |
     338                 :            :    *    |  NorthEntering  NorthExiting   |______________________
     339                 :            :    *    |
     340                 :            :    *    |                           EastEntering    EastIncoming
     341                 :            :    *    |
     342                 :            :    *    |                           EastExiting     EastOutgoing
     343                 :            :    *    |                                _______________________
     344                 :            :    *    |  SouthExiting   SouthEntering  |
     345                 :            :    *    |                                |
     346                 :            :    *    |                                |
     347                 :            :    *    |  SouthOutgoing  SouthIncoming  |
     348                 :            :    *
     349                 :            :    */
     350                 :            : 
     351                 :         68 :   ObjectGeoLocationTuple locationSouthIncoming()
     352                 :            :   {
     353                 :            :     // laneId: 240151 directly in front of intersection
     354                 :            :     return std::make_tuple(
     355         [ +  - ]:        136 :       ::ad::map::point::Longitude(8.00125444865324766), ::ad::map::point::Latitude(48.9980), M_PI_2);
     356                 :            :   }
     357                 :            : 
     358                 :         60 :   ObjectGeoLocationTuple locationSouthEntering()
     359                 :            :   {
     360                 :            :     // laneId: 240151:0. & 1290149:0. (right turn lane) & 1360149:0. (straight lane)
     361         [ +  - ]:        120 :     return std::make_tuple(::ad::map::point::Longitude(8.0012619), ::ad::map::point::Latitude(48.9981266), M_PI_2);
     362                 :            :   }
     363                 :            : 
     364                 :         54 :   ObjectGeoLocationTuple locationSouth2East()
     365                 :            :   {
     366                 :            :     // laneId: 1290149:0.3, starting right turn
     367         [ +  - ]:        108 :     return std::make_tuple(::ad::map::point::Longitude(8.0012731), ::ad::map::point::Latitude(48.9981734), M_PI_2 / 2.);
     368                 :            :   }
     369                 :            : 
     370                 :         55 :   ObjectGeoLocationTuple locationEastExiting()
     371                 :            :   {
     372                 :            :     // laneId:  120149:0 & 1290149:1. right turn around the intersection
     373         [ +  - ]:        110 :     return std::make_tuple(::ad::map::point::Longitude(8.0013843), ::ad::map::point::Latitude(48.9982095), 0.);
     374                 :            :   }
     375                 :            : 
     376                 :         56 :   ObjectGeoLocationTuple locationEastOutgoing()
     377                 :            :   {
     378                 :            :     // laneId:  120149:0.16 right turn around the intersection
     379                 :            :     return std::make_tuple(
     380         [ +  - ]:        112 :       ::ad::map::point::Longitude(8.00188527300496979), ::ad::map::point::Latitude(48.99821051747871792), 0.);
     381                 :            :   }
     382                 :            : 
     383                 :         14 :   ObjectGeoLocationTuple locationEastIncoming()
     384                 :            :   {
     385                 :            :     // laneId: 120151:0.16
     386                 :            :     return std::make_tuple(
     387         [ +  - ]:         28 :       ::ad::map::point::Longitude(8.00188527300496979), ::ad::map::point::Latitude(48.99824), M_PI);
     388                 :            :   }
     389                 :            : 
     390                 :         10 :   ObjectGeoLocationTuple locationEastEntering()
     391                 :            :   {
     392                 :            :     // laneId: 120151:0.16
     393         [ +  - ]:         20 :     return std::make_tuple(::ad::map::point::Longitude(8.0013870), ::ad::map::point::Latitude(48.9982463), M_PI);
     394                 :            :   }
     395                 :            : 
     396                 :          5 :   ObjectGeoLocationTuple locationEast2North()
     397                 :            :   {
     398                 :            :     // laneId: 1370149:0.5
     399                 :            :     return std::make_tuple(
     400         [ +  - ]:         10 :       ::ad::map::point::Longitude(8.0012889), ::ad::map::point::Latitude(48.9982608), 3. * M_PI_2 / 2.);
     401                 :            :   }
     402                 :            : 
     403                 :         10 :   ObjectGeoLocationTuple locationSouth2North()
     404                 :            :   {
     405                 :            :     // laneId: 13690249:0.5, second half of intersection when driving straight
     406         [ +  - ]:         20 :     return std::make_tuple(::ad::map::point::Longitude(8.0012631), ::ad::map::point::Latitude(48.9982781), M_PI_2);
     407                 :            :   }
     408                 :            : 
     409                 :         15 :   ObjectGeoLocationTuple locationNorthExiting()
     410                 :            :   {
     411                 :            :     // laneId: 13690249:1. & 230151:1., outgoing border of the intersection when driving straight
     412         [ +  - ]:         30 :     return std::make_tuple(::ad::map::point::Longitude(8.0012623), ::ad::map::point::Latitude(48.9983242), M_PI_2);
     413                 :            :   }
     414                 :            : 
     415                 :         16 :   ObjectGeoLocationTuple locationNorthOutgoing()
     416                 :            :   {
     417                 :            :     // laneId: 230151:0.94 after the intersection when driving straight
     418         [ +  - ]:         32 :     return std::make_tuple(::ad::map::point::Longitude(8.0012635), ::ad::map::point::Latitude(48.9984330), M_PI_2);
     419                 :            :   }
     420                 :            : 
     421                 :         14 :   ObjectGeoLocationTuple locationNorthIncoming()
     422                 :            :   {
     423                 :            :     // laneId: 230149, straight through the intersection in opposite direction
     424         [ +  - ]:         28 :     return std::make_tuple(::ad::map::point::Longitude(8.00120), ::ad::map::point::Latitude(48.9985), -M_PI_2);
     425                 :            :   }
     426                 :            : 
     427                 :         10 :   ObjectGeoLocationTuple locationNorthEntering()
     428                 :            :   {
     429                 :            :     // laneId: 230149:1.0 &  1350251:1.0  touching straight through the intersection in opposite direction
     430         [ +  - ]:         20 :     return std::make_tuple(::ad::map::point::Longitude(8.0012081), ::ad::map::point::Latitude(48.9983242), -M_PI_2);
     431                 :            :   }
     432                 :            : 
     433                 :          5 :   ObjectGeoLocationTuple locationNorth2East()
     434                 :            :   {
     435                 :            :     // laneId: 1380149:0.5
     436                 :            :     return std::make_tuple(
     437         [ +  - ]:         10 :       ::ad::map::point::Longitude(8.0012391), ::ad::map::point::Latitude(48.9982440), -M_PI_2 / 2.);
     438                 :            :   }
     439                 :            : 
     440                 :          5 :   ObjectGeoLocationTuple locationNorth2South()
     441                 :            :   {
     442                 :            :     // laneId: 1350151:0.5, mid straight through the intersection in opposite direction
     443         [ +  - ]:         10 :     return std::make_tuple(::ad::map::point::Longitude(8.0012077), ::ad::map::point::Latitude(48.9981817), -M_PI_2);
     444                 :            :   }
     445                 :            : 
     446                 :          5 :   ObjectGeoLocationTuple locationEast2South()
     447                 :            :   {
     448                 :            :     // laneId: 1300149:0.5
     449                 :            :     return std::make_tuple(
     450         [ +  - ]:         10 :       ::ad::map::point::Longitude(8.0012368), ::ad::map::point::Latitude(48.9982053), 5. * M_PI_2 / 2.);
     451                 :            :   }
     452                 :            : 
     453                 :         10 :   ObjectGeoLocationTuple locationSouthExiting()
     454                 :            :   {
     455                 :            :     // laneId: 240149:0.  opposite direction in front across intersection
     456         [ +  - ]:         20 :     return std::make_tuple(::ad::map::point::Longitude(8.0012069), ::ad::map::point::Latitude(48.9981252), -M_PI_2);
     457                 :            :   }
     458                 :            : 
     459                 :         12 :   ObjectGeoLocationTuple locationSouthOutgoing()
     460                 :            :   {
     461                 :            :     // laneId: 240149, opposite direction no intersection in between
     462         [ +  - ]:         24 :     return std::make_tuple(::ad::map::point::Longitude(8.00120), ::ad::map::point::Latitude(48.9980), -M_PI_2);
     463                 :            :   }
     464                 :            : };
     465                 :            : 
     466                 :            : struct RssSceneCreationTestWithRoute : public RssSceneCreationTestTown01
     467                 :            : {
     468                 :        150 :   TestMode getTestMode() override
     469                 :            :   {
     470                 :        150 :     return TestMode::withRouteWithSpeedLimit;
     471                 :            :   }
     472                 :            : };
     473                 :            : 
     474                 :            : struct RssSceneCreationTestWithoutRoute : public RssSceneCreationTestTown01
     475                 :            : {
     476                 :         62 :   TestMode getTestMode() override
     477                 :            :   {
     478                 :         62 :     return TestMode::withoutRouteWithoutSpeedLimit;
     479                 :            :   }
     480                 :            : };

Generated by: LCOV version 1.14