# A Visitor Assistance System Based on LoRa for Nature Forest Parks
## 6 Simulation  
The applicability of the proposal for the Petropolis to Teresopolis crossing is verified through simulations performed in NS-3 [34], an event-driven network simulator. In NS-3, the propagation inside the forest was described by the Log-distance propagation model integrated to Nakagami-m. Since the propagation model is used only for the calculation of RSSI, the Log-distance distribution was kept for large-scale attenuation, with no approximation with the Gamma distribution. The average received power was simulated by the Log-Distance distribution, and the small-scale fading by the Nakagami-m model. Both contributions were added to allow the composition of the two effects. The Monte Carlo method was used for generating the received power values [35]. For each reference distance, 2000 independent samples of possible small-scale fading values were generated. In this case, based on the arbitrary choice of one of the 2000 samples for the reference distance, the power received by the totems was calculated. Table 3 shows the parameters configured in the simulator to represent the scenario of a mobile node. The physical layer of the LoRa was defined with some adaptations to the LoRaWAN library developed by [PERSON] et al. [36]. The simulation parameters reflect the practical experiments carried out, as described in [37]. We employ the same level of radiated power, spreading factor, bandwidth, and code rate. The loss exponent of the Log-distance propagation model is empirically defined as 4.07. This value ranges between two and six, where two represents the propagation in free space [38]. The loss exponent is defined in the calibration step of the simulations, which consists of bringing the simulations closer to the practical experiments using the results of RSSI at 250 m as reference. Mobile terminals move at two different speeds: that of an average visitor and of a well-trained hiker. The heights of the antennas also reproduce the heights used in practical experiments. Figure 13 illustrates the trail of PARNASO that we simulate. The points indicated within blue circles are the locations of the two overnight shelters. The trail stretch between the two shelters is the \begin{table}
\begin{tabular}{c c} \hline \hline
**Description** & **Value** \\ \hline Track length & 29 km \\ Number of receivers (totems) & 23 \\ Receiving antenna height & 2.5 m \\ PHY Protocol & LoRa \\ Spreading Factor & SF12 \\ Frequency & 915 MHz \\ Bandwidth & 500 kHz \\ Code Rate & 4/5 \\ Mobile speed & 50 m/min (3 km/h) \\ \multicolumn{2}{c}{100 m/min (6 km/h)} \\ Transmission antenna height & 1.5 m \\ Transmission power & 14 dBm \\ Packet size & 47 bytes \\ Number of executions & 10 rounds \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Simulation parameters in NS-3. most prone to visitors getting lost. Figure 14 shows a landscape of this stretch. The points indicated by the orange triangular flags are the points of interest of the trail, and those that correspond to points suitable for installing totem installation, according to the park administration. Figure 15a,b shows typical totem installation points: the exit of the Petropolis-Teresopolis crossing and a waterfall inside the PARNASO subject to flash flooding risk. When the visitor travels at 3 km/h (50 m/min), the terminals send and receive more packets than at 6 km/h (100 m/min) as the contact time is longer. As a consequence, the measurements better show the variation in the sampled values. Figures 16 and 17 show the variation of the power in the link, indicated by the RSSI, for the two travel speeds. The RSSI values for each packet received in the simulation and practical experiments are shown. As expected, experimental and simulation results do not perfectly match; nevertheless, there are important similarities between the two curves, especially for the lowest speed.