ad_map_access
MapMatchedObjectBoundingBoxValidInputRange.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <cmath>
21 #include <limits>
25 #include "ad/physics/DistanceValidInputRange.hpp"
26 #include "spdlog/fmt/ostr.h"
27 #include "spdlog/spdlog.h"
28 
40  bool const logErrors = true)
41 {
42  // check for generic member input ranges
43  bool inValidInputRange = true;
44  inValidInputRange = withinValidInputRange(input.laneOccupiedRegions, logErrors)
45  && withinValidInputRange(input.referencePointPositions, logErrors)
46  && withinValidInputRange(input.samplingDistance, logErrors) && withinValidInputRange(input.matchRadius, logErrors);
47  if (!inValidInputRange && logErrors)
48  {
49  spdlog::error("withinValidInputRange(::ad::map::match::MapMatchedObjectBoundingBox)>> {} has invalid member",
50  input); // LCOV_EXCL_BR_LINE
51  }
52 
53  return inValidInputRange;
54 }
withinValidInputRange
bool withinValidInputRange(::ad::map::match::MapMatchedObjectBoundingBox const &input, bool const logErrors=true)
check if the given MapMatchedObjectBoundingBox is within valid input range
Definition: MapMatchedObjectBoundingBoxValidInputRange.hpp:39
LaneOccupiedRegionListValidInputRange.hpp
MapMatchedObjectBoundingBox.hpp
MapMatchedObjectReferencePositionListValidInputRange.hpp
ad::map::match::MapMatchedObjectBoundingBox::matchRadius
::ad::physics::Distance matchRadius
Definition: MapMatchedObjectBoundingBox.hpp:132
ad::map::match::MapMatchedObjectBoundingBox
DataType MapMatchedObjectBoundingBox.
Definition: MapMatchedObjectBoundingBox.hpp:45
ad::map::match::MapMatchedObjectBoundingBox::samplingDistance
::ad::physics::Distance samplingDistance
Definition: MapMatchedObjectBoundingBox.hpp:127