LCOV - code coverage report
Current view: top level - src/point - Transform.cpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 40 40 100.0 %
Date: 2022-10-04 09:48:07 Functions: 8 8 100.0 %
Branches: 24 48 50.0 %

           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                 :            : #include "ad/map/point/Transform.hpp"
      10                 :            : 
      11                 :            : #include "ad/map/access/Operation.hpp"
      12                 :            : #include "ad/map/point/Operation.hpp"
      13                 :            : 
      14                 :            : namespace ad {
      15                 :            : namespace map {
      16                 :            : namespace point {
      17                 :            : 
      18                 :       2626 : ECEFPoint toECEF(ENUPoint const &point, GeoPoint const &enuReferencePoint)
      19                 :            : {
      20         [ +  - ]:       5252 :   CoordinateTransform coordinateTransform;
      21         [ +  - ]:       2626 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      22         [ +  - ]:       5252 :   return coordinateTransform.ENU2ECEF(point);
      23                 :            : }
      24                 :            : 
      25                 :          2 : GeoPoint toGeo(ENUPoint const &point, GeoPoint const &enuReferencePoint)
      26                 :            : {
      27         [ +  - ]:          4 :   CoordinateTransform coordinateTransform;
      28         [ +  - ]:          2 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      29         [ +  - ]:          4 :   return coordinateTransform.ENU2Geo(point);
      30                 :            : }
      31                 :            : 
      32                 :          2 : ENUPoint toENU(ECEFPoint const &point, GeoPoint const &enuReferencePoint)
      33                 :            : {
      34         [ +  - ]:          4 :   CoordinateTransform coordinateTransform;
      35         [ +  - ]:          2 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      36         [ +  - ]:          4 :   return coordinateTransform.ECEF2ENU(point);
      37                 :            : }
      38                 :            : 
      39                 :          2 : ENUPoint toENU(GeoPoint const &point, GeoPoint const &enuReferencePoint)
      40                 :            : {
      41         [ +  - ]:          4 :   CoordinateTransform coordinateTransform;
      42         [ +  - ]:          2 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      43         [ +  - ]:          4 :   return coordinateTransform.Geo2ENU(point);
      44                 :            : }
      45                 :            : 
      46                 :          1 : ECEFEdge toECEF(ENUEdge const &edge, GeoPoint const &enuReferencePoint)
      47                 :            : {
      48         [ +  - ]:          2 :   CoordinateTransform coordinateTransform;
      49         [ +  - ]:          1 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      50                 :          1 :   ECEFEdge resultEdge;
      51         [ +  - ]:          1 :   coordinateTransform.convert(edge, resultEdge);
      52                 :          2 :   return resultEdge;
      53                 :            : }
      54                 :            : 
      55                 :          1 : GeoEdge toGeo(ENUEdge const &edge, GeoPoint const &enuReferencePoint)
      56                 :            : {
      57         [ +  - ]:          2 :   CoordinateTransform coordinateTransform;
      58         [ +  - ]:          1 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      59                 :          1 :   GeoEdge resultEdge;
      60         [ +  - ]:          1 :   coordinateTransform.convert(edge, resultEdge);
      61                 :          2 :   return resultEdge;
      62                 :            : }
      63                 :            : 
      64                 :         12 : ENUEdge toENU(ECEFEdge const &edge, GeoPoint const &enuReferencePoint)
      65                 :            : {
      66         [ +  - ]:         24 :   CoordinateTransform coordinateTransform;
      67         [ +  - ]:         12 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      68                 :         12 :   ENUEdge resultEdge;
      69         [ +  - ]:         12 :   coordinateTransform.convert(edge, resultEdge);
      70                 :         24 :   return resultEdge;
      71                 :            : }
      72                 :            : 
      73                 :          1 : ENUEdge toENU(GeoEdge const &edge, GeoPoint const &enuReferencePoint)
      74                 :            : {
      75         [ +  - ]:          2 :   CoordinateTransform coordinateTransform;
      76         [ +  - ]:          1 :   coordinateTransform.setENUReferencePoint(enuReferencePoint);
      77                 :          1 :   ENUEdge resultEdge;
      78         [ +  - ]:          1 :   coordinateTransform.convert(edge, resultEdge);
      79                 :          2 :   return resultEdge;
      80                 :            : }
      81                 :            : 
      82                 :            : } // namespace point
      83                 :            : } // namespace map
      84                 :            : } // namespace ad

Generated by: LCOV version 1.14