ad_rss
Physics.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 
15 #include <vector>
16 #include "ad/physics/Acceleration.hpp"
17 #include "ad/physics/Angle.hpp"
18 #include "ad/physics/AngleRange.hpp"
19 #include "ad/physics/Distance.hpp"
20 #include "ad/physics/Duration.hpp"
21 #include "ad/physics/Speed.hpp"
22 
26 namespace ad {
30 namespace rss {
34 namespace core {
35 
46 bool calculateDistanceOffsetInAcceleratedMovement(physics::Speed const speed,
47  physics::Acceleration const acceleration,
48  physics::Duration const duration,
49  physics::Distance &distanceOffset);
50 
61 bool calculateSpeedInAcceleratedMovement(physics::Speed const speed,
62  physics::Acceleration const acceleration,
63  physics::Duration const duration,
64  physics::Speed &resultingSpeed);
65 
76 bool calculateStoppingDistance(physics::Speed const currentSpeed,
77  physics::Acceleration const deceleration,
78  physics::Distance &stoppingDistance);
79 
100 bool calculateAcceleratedLimitedMovement(physics::Speed const currentSpeed,
101  physics::Speed const max_speed_on_acceleration,
102  physics::Acceleration const acceleration,
103  physics::Duration const duration,
104  physics::Speed &resultingSpeed,
105  physics::Distance &distanceOffset);
106 
127 bool calculateTimeToCoverDistance(physics::Speed const currentSpeed,
128  physics::Speed const max_speed_on_acceleration,
129  physics::Duration const response_time,
130  physics::Acceleration const aUntilResponseTime,
131  physics::Acceleration const aAfterResponseTime,
132  physics::Distance const distanceToCover,
133  physics::Duration &requiredTime);
134 
153 bool calculateSpeedAndDistanceOffset(physics::Duration const duration,
154  physics::Speed const currentSpeed,
155  physics::Duration const response_time,
156  physics::Speed const max_speed_on_acceleration,
157  physics::Acceleration const aUntilReponseTime,
158  physics::Acceleration const aAfterResponseTime,
159  physics::Speed &resultingSpeed,
160  physics::Distance &distanceOffset);
161 
179 bool calculateTimeToStop(physics::Speed const currentSpeed,
180  physics::Duration const response_time,
181  physics::Speed const max_speed_on_acceleration,
182  physics::Acceleration const aUntilResponseTime,
183  physics::Acceleration const aAfterResponseTime,
184  physics::Duration &stopDuration);
185 
186 } // namespace core
187 } // namespace rss
188 } // namespace ad
bool calculateStoppingDistance(physics::Speed const currentSpeed, physics::Acceleration const deceleration, physics::Distance &stoppingDistance)
Calculate the stopping distance for a given speed and deceleration on a constant accelerated movement...
bool calculateTimeToStop(physics::Speed const currentSpeed, physics::Duration const response_time, physics::Speed const max_speed_on_acceleration, physics::Acceleration const aUntilResponseTime, physics::Acceleration const aAfterResponseTime, physics::Duration &stopDuration)
Calculate the stopping time in a two phased limited constant accelerated movement.
bool calculateDistanceOffsetInAcceleratedMovement(physics::Speed const speed, physics::Acceleration const acceleration, physics::Duration const duration, physics::Distance &distanceOffset)
Calculate the distance traveled after a given period of time on a constant accelerated movement.
bool calculateSpeedAndDistanceOffset(physics::Duration const duration, physics::Speed const currentSpeed, physics::Duration const response_time, physics::Speed const max_speed_on_acceleration, physics::Acceleration const aUntilReponseTime, physics::Acceleration const aAfterResponseTime, physics::Speed &resultingSpeed, physics::Distance &distanceOffset)
Calculate the speed and distance offset after a given duration in a two phased limited constant accel...
bool calculateAcceleratedLimitedMovement(physics::Speed const currentSpeed, physics::Speed const max_speed_on_acceleration, physics::Acceleration const acceleration, physics::Duration const duration, physics::Speed &resultingSpeed, physics::Distance &distanceOffset)
Calculate the vehicle speed after a given period of time on a constant accelerated movement.
bool calculateSpeedInAcceleratedMovement(physics::Speed const speed, physics::Acceleration const acceleration, physics::Duration const duration, physics::Speed &resultingSpeed)
Calculate the speed after a given period of time on a constant accelerated movement.
bool calculateTimeToCoverDistance(physics::Speed const currentSpeed, physics::Speed const max_speed_on_acceleration, physics::Duration const response_time, physics::Acceleration const aUntilResponseTime, physics::Acceleration const aAfterResponseTime, physics::Distance const distanceToCover, physics::Duration &requiredTime)
Calculate the time needed to cover a given distance.
namespace ad
Definition: LateralRelativePosition.hpp:28