ad_rss
generated
include
ad
rss
situation
RelativePositionValidInputRange.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: LGPL-2.1-only
7
*
8
* ----------------- END LICENSE BLOCK -----------------------------------
9
*/
10
18
#pragma once
19
20
#include <cmath>
21
#include <limits>
22
#include "ad/physics/DistanceValidInputRange.hpp"
23
#include "
ad/rss/situation/LateralRelativePositionValidInputRange.hpp
"
24
#include "
ad/rss/situation/LongitudinalRelativePositionValidInputRange.hpp
"
25
#include "
ad/rss/situation/RelativePosition.hpp
"
26
#include "spdlog/fmt/ostr.h"
27
#include "spdlog/spdlog.h"
28
39
inline
bool
withinValidInputRange
(::
ad::rss::situation::RelativePosition
const
&input,
bool
const
logErrors =
true
)
40
{
41
// check for generic member input ranges
42
bool
inValidInputRange =
true
;
43
inValidInputRange =
withinValidInputRange
(input.
longitudinalPosition
, logErrors)
44
&&
withinValidInputRange
(input.
longitudinalDistance
, logErrors)
45
&&
withinValidInputRange
(input.
lateralPosition
, logErrors)
46
&&
withinValidInputRange
(input.
lateralDistance
, logErrors);
47
if
(!inValidInputRange && logErrors)
48
{
49
spdlog::error(
"withinValidInputRange(::ad::rss::situation::RelativePosition)>> {} has invalid member"
,
50
input);
// LCOV_EXCL_BR_LINE
51
}
52
53
return
inValidInputRange;
54
}
ad::rss::situation::RelativePosition::longitudinalPosition
::ad::rss::situation::LongitudinalRelativePosition longitudinalPosition
Definition:
RelativePosition.hpp:123
RelativePosition.hpp
LateralRelativePositionValidInputRange.hpp
ad::rss::situation::RelativePosition::lateralPosition
::ad::rss::situation::LateralRelativePosition lateralPosition
Definition:
RelativePosition.hpp:134
ad::rss::situation::RelativePosition::lateralDistance
::ad::physics::Distance lateralDistance
Definition:
RelativePosition.hpp:139
LongitudinalRelativePositionValidInputRange.hpp
ad::rss::situation::RelativePosition::longitudinalDistance
::ad::physics::Distance longitudinalDistance
Definition:
RelativePosition.hpp:129
ad::rss::situation::RelativePosition
DataType RelativePosition.
Definition:
RelativePosition.hpp:45
withinValidInputRange
bool withinValidInputRange(::ad::rss::situation::RelativePosition const &input, bool const logErrors=true)
check if the given RelativePosition is within valid input range
Definition:
RelativePositionValidInputRange.hpp:39
Generated by
1.8.17