## 3 Validation
The next phase involved conducting static tests in a railway environment, as depicted in Figure 10. Acquisitions with a person in several locations were performed, namely in the middle of the track, near the track, and outside the track. The acquisitions were processed using the proposed solution, and the person was successfully detected when inside the rail track. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Distance** & **50 m** & **100 m** & **150 m** & **200 m** \\ \hline Person & & & & \\ Point Cloud & & & & \\ \hline Number of points & 1452 & 378 & 126 & 76 \\ (approximately) & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Point cloud of a person at different distances. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**50 m** & **100 m** & **150 m** & **200 m** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Detection of a person at different distances. With the static tests successfully completed, the next phase involved conducting tests in a dynamic environment, specifically within a moving car (Figure 11). Figure 12 illustrates sample routes used to test the proposed solution, encompassing various scenarios within the LiDAR's FOV coverage. Figure 11: Setup employed for the dynamic tests of the proposed solution in a road environment. CC BY 4.0 [26]. Figure 10: Static tests of the proposed solution in a railway environment (CC BY 4.0 [26]). On the left plot, the color scale relates to object reflectivity, where dark blue corresponds to the lowest values. On the middle and right plots, light blue points correspond to those that are within the scan region (red wireframe box), which is centered around the central search point, also in red. On the right plot, the detected obstacle is also highlighted in red. As an example, Figure 13 presents the successful detection of an obstacle in the road by the proposed solution, where, in this case, a person crossed the road in front of the car. The dynamic tests described in Figure 12 were performed using a car that maintained an average speed of 10 to 20 km/h and searched for obstacles 100 m ahead of the car. The Contumil-Leixoes line (Figure 14) was used for the final tests. These dynamic tests aimed at the validation of the proposed solution inside a locomotive, allowing for an assessment of the solution's effectiveness and feasibility in real-world railway operating conditions. A Comboios de Portugal (CP, Portugal) 2600-2620 series locomotive was used along an assigned section of the line. The environmental conditions were normal, with overcast weather in the spring, without any noticeable fog or rain. A custom physical support was designed and built in Aluminium 3.3315 (EN-AW 5005) to be installed inside the train locomotive, with the goal of securing the LiDAR and GPS during the experiments. During the dynamic validation in a railway environment phase, a maximum speed of 80 km/h was reached by the locomotive. Similar to earlier tests, obstacle detection was performed 100 m ahead of the LiDAR, itself positioned at the front of the locomotive. The processing results employing the proposed methodology are exemplified in Figure 15. Two scenarios are presented: a search for obstacles inside the field of view (Figure 15a), and a search for obstacles outside the field of view (Figure 15b). In the first case, shown in Figure 15a, no obstacles were detected. Figure 12: Examples of routes followed during the dynamic tests of the proposed solution in a road environment, consisting of (**a**) a loop, (**b**) a west-bound path, and (**c**) an east-bound path. CC BY 4.0 [32]. Figure 13: Results of the dynamic tests of the proposed solution in a road environment (CC BY 4.0 [32]). The zoomed section shows the detected obstacle in red within the search region, shown as a red wireframe box. In the second case, as shown Figure 15b, because the search area was outside the LiDAR's field of view, the search was not executed, allowing valuable processing time to be saved, a critical point in real-time systems' performance.