## 4 Discussion  
In road vehicles, the human detection of obstacles has been evaluated, and most individuals can detect obstacles at approximately 100 to 350 m, depending on the object size, shape, and color [33]. However, this is highly dependent on each particular individual, and other factors also play major roles in the capabilities of human drivers, such as vehicle velocity and environmental, physiological, and psychological conditions.  
Figure 14: Setup employed for the dynamic tests of the proposed solution in a railway environment.  
Figure 15: Obstacle detection on the rail path using LiDAR: (**a**) inside the LiDAR FOV; and (**b**) outside the LiDAR FOV. CC BY 4.0 [32] and CC BY 4.0 [26].  
The proposed LiDAR-based solution aims to provide a consistent, configurable detection distance of up to 500 m ahead of the train.  
Considering a velocity of 220 km/h, the maximum velocity of a CP 4000 series train, as an example, and a mean LiDAR processing cycle time (Figure 3) of 0.523036 s, if an obstacle is detected 500 m ahead, the collision velocity can be determined as  
\[\left\{\begin{aligned} v&=v_{0}+at\\ s&=s_{0}+v_{0}t+\frac{1}{2}at^{2}\end{aligned} \Leftrightarrow\left\{\begin{aligned} v&=61.11-0.95t\\ 500-61.11*t_{cycle}&=61.11t-\frac{1}{2}*0.95t^{2} \end{aligned}\Leftrightarrow\left\{\begin{aligned} v&=53. 34\text{ m/s}\\ t&=8.18\text{ s}\end{aligned}\right.\right. \tag{7}\]  
where \(v\) is the collision velocity in m/s; \(v_{0}\) is the initial velocity in m/s; \(a\) is the deceleration in m/s\({}^{2}\); \(s\) is the collision position in meters; \(s_{0}\) is the detection position in meters; and \(t\) is the time in seconds.  
The mean deceleration was defined as 0.95 m/s\({}^{2}\), as obtained from the CP 4000 series datasheet [34], while the LiDAR mean processing cycle (\(t_{cycle}\)) was considered in the system of Equation (7).  
Alternatively, considering obstacle detection by a human at a conservative range of 150 m and applying the same equations, the collision velocity would be  
\[\left\{\begin{aligned} v&=v_{0}+at\\ s&=s_{0}+v_{0}t+\frac{1}{2}at^{2}\end{aligned} \Leftrightarrow\left\{\begin{aligned} v&=61.11-0.95t \\ 200&=61.11t-\frac{1}{2}*0.95t^{2}\end{aligned} \Leftrightarrow\left\{\begin{aligned} v&=57.92\text{ m/s}\\ t&=3.36\text{ s}\end{aligned}\right.\right. \tag{8}\]  
Despite not avoiding the impact, the proposed solution can reduce the collision velocity for the selected use case. By decreasing the speed at which the collision occurs, the system mitigates the severity of the impact forces experienced during the crash, enhancing the safety of the vehicle's occupants by lowering the risk of severe injuries and minimizing damage to the vehicle itself.  
Additionally, the processing time would also impact the periodicity of analysis, where, for the same 220 km/h, it would come out as one analysis every 32 m, which can be compensated with the scan region size. However, considering that this processing time was obtained without any particular optimizations and using exclusively CPU-bound calculations with an Intel (United States of America) Core i7-9700 TE at 1.8 GHz in a system with 16 GB of RAM, it would be possible to improve this time using parallel processing and GPU-bound calculations.