src/demo/braking_control.hpp Source File#

Demo: src/demo/braking_control.hpp Source File
Demo
braking_control.hpp
1#ifndef BRAKING_CONTROL_H
2#define BRAKING_CONTROL_H
3
4#include <string>
5#include <vector>
6
7namespace demo {
8
9 // Enumerations
10
14 enum class ABSType {
15 Standard,
16 Enhanced
17 };
18
22 enum class ESCType {
23 Basic,
24 Advanced
25 };
26
27 // Classes
28
35 public:
36 int wheelId;
37 float speed;
38 };
39
46 public:
47 float traction;
48 float grip;
49 std::string surface;
50 };
51
70 public:
79 void receiveWheelSpeedInput(const std::vector<WheelSpeedSensor>& wheelSpeeds);
80
90 void applyBrakingPressure(const std::vector<float>& wheelPressure);
91
100 void collaborateWithABS(ABSType absMode);
101
111 void collaborateWithESC(ESCType escMode);
112
122 void adaptToRoadConditions(const RoadConditionData& roadCondition);
123 };
124
125} // namespace demo
126
127#endif // BRAKING_CONTROL_H
Braking Control software component.
Definition braking_control.hpp:69
void adaptToRoadConditions(const RoadConditionData &roadCondition)
Provides rapid response and modulation of braking force to adapt to changing road conditions.
void applyBrakingPressure(const std::vector< float > &wheelPressure)
Applies appropriate braking pressure to individual wheels to prevent lock-up and maintain vehicle sta...
void collaborateWithABS(ABSType absMode)
Works in conjunction with the ABS to provide smooth and controlled braking.
void collaborateWithESC(ESCType escMode)
Works in conjunction with the ESC to enhance vehicle stability during braking maneuvers.
void receiveWheelSpeedInput(const std::vector< WheelSpeedSensor > &wheelSpeeds)
Receives input from wheel speed sensors to detect wheel lock-up.
Road condition data structure.
Definition braking_control.hpp:45
std::string surface
Definition braking_control.hpp:49
float traction
Definition braking_control.hpp:47
float grip
Definition braking_control.hpp:48
Wheel speed sensor data structure.
Definition braking_control.hpp:34
int wheelId
Definition braking_control.hpp:36
float speed
Definition braking_control.hpp:37