ad_rss_map_integration
RssEgoVehicleDynamicsOnRouteValidInputRange.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2022 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/AccelerationValidInputRange.hpp"
24 #include "spdlog/fmt/ostr.h"
25 #include "spdlog/spdlog.h"
26 
38  bool const logErrors = true)
39 {
40  // check for generic member input ranges
41  bool inValidInputRange = true;
42  inValidInputRange = withinValidInputRange(input.route_accel_lon, logErrors)
43  && withinValidInputRange(input.route_accel_lat, logErrors)
44  && withinValidInputRange(input.avg_route_accel_lon, logErrors)
45  && withinValidInputRange(input.avg_route_accel_lat, logErrors);
46  if (!inValidInputRange && logErrors)
47  {
48  spdlog::error("withinValidInputRange(::ad::rss::map::RssEgoVehicleDynamicsOnRoute)>> {} has invalid member",
49  input); // LCOV_EXCL_BR_LINE
50  }
51 
52  return inValidInputRange;
53 }
bool withinValidInputRange(::ad::rss::map::RssEgoVehicleDynamicsOnRoute const &input, bool const logErrors=true)
check if the given RssEgoVehicleDynamicsOnRoute is within valid input range
Definition: RssEgoVehicleDynamicsOnRouteValidInputRange.hpp:37
DataType RssEgoVehicleDynamicsOnRoute.
Definition: RssEgoVehicleDynamicsOnRoute.hpp:46
::ad::physics::Acceleration avg_route_accel_lon
Definition: RssEgoVehicleDynamicsOnRoute.hpp:139
::ad::physics::Acceleration route_accel_lon
Definition: RssEgoVehicleDynamicsOnRoute.hpp:129
::ad::physics::Acceleration route_accel_lat
Definition: RssEgoVehicleDynamicsOnRoute.hpp:134
::ad::physics::Acceleration avg_route_accel_lat
Definition: RssEgoVehicleDynamicsOnRoute.hpp:144