ad_rss
RssNonIntersectionConstellationChecker.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: LGPL-2.1-only
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
14 #include <map>
18 
22 namespace ad {
26 namespace rss {
30 namespace structured {
31 
43 {
44 public:
49 
54 
65  core::RelativeConstellation const &constellation,
66  state::RssState &rssState);
67 
68 private:
78  bool calculateRssStateSameDirection(core::RelativeConstellation const &constellation, state::RssState &rssState);
79 
89  bool calculateRssStateOppositeDirection(core::RelativeConstellation const &constellation, state::RssState &rssState);
90 
101  bool calculateLongitudinalRssStateSameDirection(core::RelativeConstellation const &constellation,
102  state::LongitudinalRssState &rssState);
103 
114  bool calculateLongitudinalRssStateOppositeDirection(core::RelativeConstellation const &constellation,
115  state::LongitudinalRssState &rssState);
116 
127  bool calculateLateralRssState(core::RelativeConstellation const &constellation,
128  state::LateralRssState &rssStateLeft,
129  state::LateralRssState &rssStateRight);
130 
131  struct RssSafeState
132  {
133  bool longitudinalSafe{false};
134  bool lateralSafe{false};
135  };
136 
140  typedef std::map<core::RelativeConstellationId, RssSafeState> RssSafeStateBeforeDangerThresholdTimeMap;
141 
147  RssSafeStateBeforeDangerThresholdTimeMap mLastStatesBeforeDangerThresholdTime;
152  RssSafeStateBeforeDangerThresholdTimeMap mNewStatesBeforeDangerThresholdTime;
153 
158  world::TimeIndex mCurrentTimeIndex{0u};
159 };
160 
161 } // namespace structured
162 } // namespace rss
163 } // namespace ad
Class to check whether a non-intersection structured constellation is safe and to determine the prope...
Definition: RssNonIntersectionConstellationChecker.hpp:43
bool calculateRssStateNonIntersection(world::TimeIndex const &time_index, core::RelativeConstellation const &constellation, state::RssState &rssState)
Calculate safety checks and determine required rssState for structured non intersection constellation...
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
namespace ad
Definition: LateralRelativePosition.hpp:28
DataType RelativeConstellation.
Definition: RelativeConstellation.hpp:56
DataType LateralRssState.
Definition: LateralRssState.hpp:45
DataType LongitudinalRssState.
Definition: LongitudinalRssState.hpp:45
DataType RssState.
Definition: RssState.hpp:49