ad_rss
RssDynamics.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 <iostream>
21 #include <limits>
22 #include <memory>
23 #include <sstream>
24 #include "ad/physics/Distance.hpp"
25 #include "ad/physics/Duration.hpp"
26 #include "ad/physics/Speed.hpp"
33 namespace ad {
37 namespace rss {
41 namespace world {
42 
51 {
55  typedef std::shared_ptr<RssDynamics> Ptr;
56 
60  typedef std::shared_ptr<RssDynamics const> ConstPtr;
61 
65  RssDynamics() = default;
66 
70  ~RssDynamics() = default;
71 
75  RssDynamics(const RssDynamics &other) = default;
76 
80  RssDynamics(RssDynamics &&other) = default;
81 
89  RssDynamics &operator=(const RssDynamics &other) = default;
90 
98  RssDynamics &operator=(RssDynamics &&other) = default;
99 
107  bool operator==(const RssDynamics &other) const
108  {
109  return (alphaLon == other.alphaLon) && (alphaLat == other.alphaLat)
113  }
114 
122  bool operator!=(const RssDynamics &other) const
123  {
124  return !operator==(other);
125  }
126 
131 
136 
140  ::ad::physics::Distance lateralFluctuationMargin{0.0};
141 
145  ::ad::physics::Duration responseTime;
146 
154  ::ad::physics::Speed maxSpeedOnAcceleration{100};
155 
160 };
161 
162 } // namespace world
163 } // namespace rss
164 } // namespace ad
165 
169 #ifndef GEN_GUARD_AD_RSS_WORLD_RSSDYNAMICS
170 #define GEN_GUARD_AD_RSS_WORLD_RSSDYNAMICS
171 
174 namespace ad {
178 namespace rss {
182 namespace world {
183 
193 inline std::ostream &operator<<(std::ostream &os, RssDynamics const &_value)
194 {
195  os << "RssDynamics(";
196  os << "alphaLon:";
197  os << _value.alphaLon;
198  os << ",";
199  os << "alphaLat:";
200  os << _value.alphaLat;
201  os << ",";
202  os << "lateralFluctuationMargin:";
203  os << _value.lateralFluctuationMargin;
204  os << ",";
205  os << "responseTime:";
206  os << _value.responseTime;
207  os << ",";
208  os << "maxSpeedOnAcceleration:";
209  os << _value.maxSpeedOnAcceleration;
210  os << ",";
211  os << "unstructuredSettings:";
212  os << _value.unstructuredSettings;
213  os << ")";
214  return os;
215 }
216 
217 } // namespace world
218 } // namespace rss
219 } // namespace ad
220 
221 namespace std {
225 inline std::string to_string(::ad::rss::world::RssDynamics const &value)
226 {
227  stringstream sstream;
228  sstream << value;
229  return sstream.str();
230 }
231 } // namespace std
232 #endif // GEN_GUARD_AD_RSS_WORLD_RSSDYNAMICS
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::world::RssDynamics::maxSpeedOnAcceleration
::ad::physics::Speed maxSpeedOnAcceleration
Definition: RssDynamics.hpp:154
ad::rss::world::RssDynamics::operator=
RssDynamics & operator=(const RssDynamics &other)=default
standard assignment operator
ad::rss::world::RssDynamics::operator==
bool operator==(const RssDynamics &other) const
standard comparison operator
Definition: RssDynamics.hpp:107
std::to_string
std::string to_string(::ad::rss::situation::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:160
ad::rss::world::operator<<
std::ostream & operator<<(std::ostream &os, LaneDrivingDirection const &value)
standard ostream operator
Definition: LaneDrivingDirection.hpp:132
ad::rss::world::RssDynamics
DataType RssDynamics.
Definition: RssDynamics.hpp:50
ad::rss::world::RssDynamics::Ptr
std::shared_ptr< RssDynamics > Ptr
Smart pointer on RssDynamics.
Definition: RssDynamics.hpp:55
ad::rss::world::RssDynamics::unstructuredSettings
::ad::rss::world::UnstructuredSettings unstructuredSettings
Definition: RssDynamics.hpp:159
LongitudinalRssAccelerationValues.hpp
ad::rss::world::RssDynamics::lateralFluctuationMargin
::ad::physics::Distance lateralFluctuationMargin
Definition: RssDynamics.hpp:140
ad::rss::world::LateralRssAccelerationValues
DataType LateralRssAccelerationValues.
Definition: LateralRssAccelerationValues.hpp:43
ad::rss::world::LongitudinalRssAccelerationValues
DataType LongitudinalRssAccelerationValues.
Definition: LongitudinalRssAccelerationValues.hpp:43
ad::rss::world::RssDynamics::operator!=
bool operator!=(const RssDynamics &other) const
standard comparison operator
Definition: RssDynamics.hpp:122
ad::rss::world::RssDynamics::ConstPtr
std::shared_ptr< RssDynamics const > ConstPtr
Smart pointer on constant RssDynamics.
Definition: RssDynamics.hpp:60
ad::rss::world::RssDynamics::alphaLon
::ad::rss::world::LongitudinalRssAccelerationValues alphaLon
Definition: RssDynamics.hpp:130
ad::rss::world::RssDynamics::responseTime
::ad::physics::Duration responseTime
Definition: RssDynamics.hpp:145
ad::rss::world::RssDynamics::alphaLat
::ad::rss::world::LateralRssAccelerationValues alphaLat
Definition: RssDynamics.hpp:135
ad::rss::world::RssDynamics::~RssDynamics
~RssDynamics()=default
standard destructor
UnstructuredSettings.hpp
ad::rss::world::UnstructuredSettings
DataType UnstructuredSettings.
Definition: UnstructuredSettings.hpp:47
ad::rss::world::RssDynamics::RssDynamics
RssDynamics()=default
standard constructor
LateralRssAccelerationValues.hpp