ad_rss
RssFormulas.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 -----------------------------------
8 
13 #pragma once
14 
17 
21 namespace ad {
25 namespace rss {
29 namespace structured {
30 
35 {
36  return std::numeric_limits<world::ObjectId>::max();
37 }
38 
43 {
44  return std::numeric_limits<world::ObjectId>::max() - 1;
45 }
46 
61 bool calculateLongitudinalDistanceOffsetAfterStatedBrakingPattern(physics::Speed const &currentLongitudinalSpeed,
62  physics::Speed const &max_speed_on_acceleration,
63  physics::Duration const &response_time,
64  physics::Acceleration const &acceleration,
65  physics::Acceleration const &deceleration,
66  physics::Distance &distanceOffset);
67 
81 bool calculateLateralDistanceOffsetAfterStatedBrakingPattern(physics::Speed const &currentLateralSpeed,
82  physics::Duration const &response_time,
83  physics::Acceleration const &acceleration,
84  physics::Acceleration const &deceleration,
85  physics::Distance &distanceOffset);
103  core::RelativeObjectState const &followingObject,
104  physics::Distance &safe_distance);
105 
125  core::RelativeObjectState const &followingObject,
126  physics::Distance const &objectDistance,
127  physics::Distance &safe_distance,
128  bool &isDistanceSafe);
129 
151  core::RelativeObjectState const &oppositeObject,
152  physics::Distance &safe_distance);
153 
177  core::RelativeObjectState const &oppositeObject,
178  physics::Distance const &objectDistance,
179  physics::Distance &safe_distance,
180  bool &isDistanceSafe);
181 
201  physics::Distance &safe_distance,
202  bool &isDistanceSafe);
203 
229  core::RelativeObjectState const &rightObject,
230  physics::Distance &safe_distance);
231 
259  core::RelativeObjectState const &rightObject,
260  physics::Distance const &objectDistance,
261  physics::Distance &safe_distance,
262  bool &isDistanceSafe);
263 
264 } // namespace structured
265 } // namespace rss
266 } // namespace ad
bool calculateLateralDistanceOffsetAfterStatedBrakingPattern(physics::Speed const &currentLateralSpeed, physics::Duration const &response_time, physics::Acceleration const &acceleration, physics::Acceleration const &deceleration, physics::Distance &distanceOffset)
Calculate the lateral distance offset of a object when applying the "stated braking pattern" with giv...
bool checkSafeLongitudinalDistanceOppositeDirection(core::RelativeObjectState const &correctObject, core::RelativeObjectState const &oppositeObject, physics::Distance const &objectDistance, physics::Distance &safe_distance, bool &isDistanceSafe)
Check if the longitudinal distance between to objects driving in opposite direction is safe....
bool checkSafeLongitudinalDistanceSameDirection(core::RelativeObjectState const &leadingObject, core::RelativeObjectState const &followingObject, physics::Distance const &objectDistance, physics::Distance &safe_distance, bool &isDistanceSafe)
Check if the longitudinal distance between the two objects is safe. Assuming: Maximum deceleration fo...
bool checkStopInFrontIntersection(core::RelativeObjectState const &object, physics::Distance &safe_distance, bool &isDistanceSafe)
Check if the object can safely break longitudinaly in front of the intersection. Assuming: Using "sta...
static world::ObjectId getLeftBorderObjectId()
Definition: RssFormulas.hpp:42
bool calculateLongitudinalDistanceOffsetAfterStatedBrakingPattern(physics::Speed const &currentLongitudinalSpeed, physics::Speed const &max_speed_on_acceleration, physics::Duration const &response_time, physics::Acceleration const &acceleration, physics::Acceleration const &deceleration, physics::Distance &distanceOffset)
Calculate the longitudinal distance offset of a object when applying the "stated braking pattern" wit...
bool calculateSafeLateralDistance(core::RelativeObjectState const &leftObject, core::RelativeObjectState const &rightObject, physics::Distance &safe_distance)
Calculate the "safe lateral distance" between the two objects, Assuming: Both objects apply "stated b...
bool calculateSafeLongitudinalDistanceSameDirection(core::RelativeObjectState const &leadingObject, core::RelativeObjectState const &followingObject, physics::Distance &safe_distance)
Calculate the "safe longitudinal distance" between the two objects, Assuming: Maximum deceleration fo...
bool checkSafeLateralDistance(core::RelativeObjectState const &leftObject, core::RelativeObjectState const &rightObject, physics::Distance const &objectDistance, physics::Distance &safe_distance, bool &isDistanceSafe)
Check if the lateral distance between to objects is safe Assuming: Both objects apply "stated breakin...
bool calculateSafeLongitudinalDistanceOppositeDirection(core::RelativeObjectState const &correctObject, core::RelativeObjectState const &oppositeObject, physics::Distance &safe_distance)
Calculate the safe longitudinal distance between to objects driving in opposite direction The calcula...
static world::ObjectId getRightBorderObjectId()
Definition: RssFormulas.hpp:34
uint64_t ObjectId
DataType ObjectId.
Definition: ObjectId.hpp:39
namespace ad
Definition: LateralRelativePosition.hpp:28
DataType RelativeObjectState.
Definition: RelativeObjectState.hpp:48