LCOV - code coverage report
Current view: top level - include/ad/map/point - Transform.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 23 24 95.8 %
Date: 2022-10-04 09:48:07 Functions: 9 9 100.0 %
Branches: 12 24 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                 :            :  * @file
      10                 :            :  */
      11                 :            : 
      12                 :            : #pragma once
      13                 :            : 
      14                 :            : #include "ad/map/access/Operation.hpp"
      15                 :            : #include "ad/map/point/CoordinateTransform.hpp"
      16                 :            : #include "ad/map/point/Types.hpp"
      17                 :            : 
      18                 :            : /** @brief namespace ad */
      19                 :            : namespace ad {
      20                 :            : /** @brief namespace map */
      21                 :            : namespace map {
      22                 :            : /** @brief namespace point */
      23                 :            : namespace point {
      24                 :            : 
      25                 :            : /**
      26                 :            :  * @brief perform coordinate transformation from GeoPoint to ECEFPoint
      27                 :            :  */
      28                 :     457586 : inline ECEFPoint toECEF(GeoPoint const &point)
      29                 :            : {
      30         [ +  - ]:     915172 :   return access::getCoordinateTransform()->Geo2ECEF(point);
      31                 :            : }
      32                 :            : 
      33                 :            : /**
      34                 :            :  * @brief perform coordinate transformation from ENUPoint to ECEFPoint
      35                 :            :  *
      36                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
      37                 :            :  * (see AdMapAccess::setENUReferencePoint())
      38                 :            :  */
      39                 :       1170 : inline ECEFPoint toECEF(ENUPoint const &point)
      40                 :            : {
      41         [ +  - ]:       2340 :   return access::getCoordinateTransform()->ENU2ECEF(point);
      42                 :            : }
      43                 :            : 
      44                 :            : /**
      45                 :            :  * @brief perform coordinate transformation from ENUPoint to ECEFPoint
      46                 :            :  *
      47                 :            :  * The transformation into ENU coordinate frame makes use of the provided enuReferencePoint
      48                 :            :  */
      49                 :            : ECEFPoint toECEF(ENUPoint const &point, GeoPoint const &enuReferencePoint);
      50                 :            : 
      51                 :            : /**
      52                 :            :  * @brief perform coordinate transformation from ECEFPoint to GeoPoint
      53                 :            :  */
      54                 :      20925 : inline GeoPoint toGeo(ECEFPoint const &point)
      55                 :            : {
      56         [ +  - ]:      41850 :   return access::getCoordinateTransform()->ECEF2Geo(point);
      57                 :            : }
      58                 :            : 
      59                 :            : /**
      60                 :            :  * @brief perform coordinate transformation from ENUPoint to GeoPoint
      61                 :            :  *
      62                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
      63                 :            :  * (see AdMapAccess::setENUReferencePoint())
      64                 :            :  */
      65                 :      20405 : inline GeoPoint toGeo(ENUPoint const &point)
      66                 :            : {
      67         [ +  - ]:      40810 :   return access::getCoordinateTransform()->ENU2Geo(point);
      68                 :            : }
      69                 :            : 
      70                 :            : /**
      71                 :            :  * @brief perform coordinate transformation from ENUPoint to GeoPoint
      72                 :            :  *
      73                 :            :  * The transformation into ENU coordinate frame makes use of the provided enuReferencePoint
      74                 :            :  */
      75                 :            : GeoPoint toGeo(ENUPoint const &point, GeoPoint const &enuReferencePoint);
      76                 :            : 
      77                 :            : /**
      78                 :            :  * @brief perform coordinate transformation from ECEFPoint to ENUPoint
      79                 :            :  *
      80                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
      81                 :            :  * (see AdMapAccess::setENUReferencePoint())
      82                 :            :  */
      83                 :      20421 : inline ENUPoint toENU(ECEFPoint const &point)
      84                 :            : {
      85         [ +  - ]:      40842 :   return access::getCoordinateTransform()->ECEF2ENU(point);
      86                 :            : }
      87                 :            : 
      88                 :            : /**
      89                 :            :  * @brief perform coordinate transformation from GeoPoint to ENUPoint
      90                 :            :  *
      91                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
      92                 :            :  * (see AdMapAccess::setENUReferencePoint())
      93                 :            :  */
      94                 :         11 : inline ENUPoint toENU(GeoPoint const &point)
      95                 :            : {
      96         [ +  - ]:         22 :   return access::getCoordinateTransform()->Geo2ENU(point);
      97                 :            : }
      98                 :            : 
      99                 :            : /**
     100                 :            :  * @brief perform coordinate transformation from ECEFPoint to ENUPoint
     101                 :            :  *
     102                 :            :  * The transformation into ENU coordinate frame makes use of the provided enuReferencePoint
     103                 :            :  */
     104                 :            : ENUPoint toENU(ECEFPoint const &point, GeoPoint const &enuReferencePoint);
     105                 :            : 
     106                 :            : /**
     107                 :            :  * @brief perform coordinate transformation from GeoPoint to ENUPoint
     108                 :            :  *
     109                 :            :  * The transformation into ENU coordinate frame makes use of the provided enuReferencePoint
     110                 :            :  */
     111                 :            : ENUPoint toENU(GeoPoint const &point, GeoPoint const &enuReferencePoint);
     112                 :            : 
     113                 :            : /**
     114                 :            :  * @brief perform coordinate transformation from GeoEdge to ECEFEdge
     115                 :            :  */
     116                 :         14 : inline ECEFEdge toECEF(GeoEdge const &edge)
     117                 :            : {
     118                 :         14 :   ECEFEdge resultEdge;
     119   [ +  -  +  - ]:         14 :   access::getCoordinateTransform()->convert(edge, resultEdge);
     120                 :         14 :   return resultEdge;
     121                 :            : }
     122                 :            : 
     123                 :            : /**
     124                 :            :  * @brief perform coordinate transformation from ENUEdge to ECEFEdge
     125                 :            :  *
     126                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
     127                 :            :  * (see AdMapAccess::setENUReferencePoint())
     128                 :            :  */
     129                 :            : inline ECEFEdge toECEF(ENUEdge const &edge)
     130                 :            : {
     131                 :            :   ECEFEdge resultEdge;
     132                 :            :   access::getCoordinateTransform()->convert(edge, resultEdge);
     133                 :            :   return resultEdge;
     134                 :            : }
     135                 :            : 
     136                 :            : /**
     137                 :            :  * @brief perform coordinate transformation from ENUEdge to ECEFEdge
     138                 :            :  *
     139                 :            :  * The transformation into ENU coordinate frame makes use of the provided ENUReferencePoint
     140                 :            :  */
     141                 :            : ECEFEdge toECEF(ENUEdge const &edge, GeoPoint const &enuReferencePoint);
     142                 :            : 
     143                 :            : /**
     144                 :            :  * @brief perform coordinate transformation from ECEFEdge to GeoEdge
     145                 :            :  */
     146                 :         18 : inline GeoEdge toGeo(ECEFEdge const &edge)
     147                 :            : {
     148                 :         18 :   GeoEdge resultEdge;
     149   [ +  -  +  - ]:         18 :   access::getCoordinateTransform()->convert(edge, resultEdge);
     150                 :         18 :   return resultEdge;
     151                 :            : }
     152                 :            : 
     153                 :            : /**
     154                 :            :  * @brief perform coordinate transformation from ENUEdge to GeoEdge
     155                 :            :  *
     156                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
     157                 :            :  * (see AdMapAccess::setENUReferencePoint())
     158                 :            :  */
     159                 :            : inline GeoEdge toGeo(ENUEdge const &edge)
     160                 :            : {
     161                 :            :   GeoEdge resultEdge;
     162                 :            :   access::getCoordinateTransform()->convert(edge, resultEdge);
     163                 :            :   return resultEdge;
     164                 :            : }
     165                 :            : 
     166                 :            : /**
     167                 :            :  * @brief perform coordinate transformation from ENUEdge to GeoEdge
     168                 :            :  *
     169                 :            :  * The transformation into ENU coordinate frame makes use of the provided ENUReferencePoint
     170                 :            :  */
     171                 :            : GeoEdge toGeo(ENUEdge const &edge, GeoPoint const &enuReferencePoint);
     172                 :            : 
     173                 :            : /**
     174                 :            :  * @brief perform coordinate transformation from ECEFEdge to ENUEdge
     175                 :            :  *
     176                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
     177                 :            :  * (see AdMapAccess::setENUReferencePoint())
     178                 :            :  */
     179                 :          2 : inline ENUEdge toENU(ECEFEdge const &edge)
     180                 :            : {
     181                 :          2 :   ENUEdge resultEdge;
     182   [ +  -  -  + ]:          4 :   access::getCoordinateTransform()->convert(edge, resultEdge);
     183                 :          0 :   return resultEdge;
     184                 :            : }
     185                 :            : 
     186                 :            : /**
     187                 :            :  * @brief perform coordinate transformation from GeoEdge to ENUEdge
     188                 :            :  *
     189                 :            :  * The transformation into ENU coordinate frame makes use of the globally set ENUReferencePoint
     190                 :            :  * (see AdMapAccess::setENUReferencePoint())
     191                 :            :  */
     192                 :            : inline ENUEdge toENU(GeoEdge const &edge)
     193                 :            : {
     194                 :            :   ENUEdge resultEdge;
     195                 :            :   access::getCoordinateTransform()->convert(edge, resultEdge);
     196                 :            :   return resultEdge;
     197                 :            : }
     198                 :            : 
     199                 :            : /**
     200                 :            :  * @brief perform coordinate transformation from ECEFEdge to ENUEdge
     201                 :            :  *
     202                 :            :  * The transformation into ENU coordinate frame makes use of the provided ENUReferencePoint
     203                 :            :  */
     204                 :            : ENUEdge toENU(ECEFEdge const &edge, GeoPoint const &enuReferencePoint);
     205                 :            : 
     206                 :            : /**
     207                 :            :  * @brief perform coordinate transformation from GeoEdge to ENUEdge
     208                 :            :  *
     209                 :            :  * The transformation into ENU coordinate frame makes use of the provided ENUReferencePoint
     210                 :            :  */
     211                 :            : ENUEdge toENU(GeoEdge const &edge, GeoPoint const &enuReferencePoint);
     212                 :            : 
     213                 :            : } // namespace point
     214                 :            : } // namespace map
     215                 :            : } // namespace ad

Generated by: LCOV version 1.14