## 3 Privacy Ensuring Emergency Vehicle Approaching Warning System
Even if some messages may get lost the vehicles still have to be informed about the approaching EV. When the EV needs to communicate a request to a vehicle, it generates messages periodically with a specific interval \(\Delta t\). The generation of messages continues until the EV detects the desired change in the vehicle's trajectory. When the vehicle again obstructs the EV's trajectory, this behavior is detected, and the communication loop is initiated again. Considering the communication algorithm visualized in Figure 3, the time \(t_{i}\) when the vehicle receives the \(i\)th message from the EV is expressed by Equation (1):  
\[t_{i}\cong\delta_{e_{i}}+\delta_{d_{i}}+\delta_{p_{i}}+\delta_{t_{i}}+\delta_{ MAC_{i}}+(i-1).\Delta t+t_{start}, \tag{1}\]  
where \(\delta_{e_{i}}\) and \(\delta_{d_{i}}\) are an \(i\)th message's encapsulation and decapsulation delays respectively, \(\delta_{p_{i}}\) is a propagation delay, \(\delta_{t_{i}}\) is a message transmission duration, \(\delta_{MAC_{i}}\) is a medium access (MAC) delay, \(\Delta t\) is a message generation interval, and \(t_{start}\) is a start time of the message transmission. Please note that MAC delays arise due to the contention-based nature of the VANET MAC layer. A time \(t_{min}\) when the vehicle receives the information about the approaching EV can be obtained as \(t_{min}=min[t_{i}]\). The difference between the time when an EV passes by the informed vehicle and \(t_{min}\) gives us an estimate of the available reaction time. Figure 3: Flow chart of the main algorithm implemented by the PEEV-WS. The structure of the message was designed to accommodate all information required for the correct operation of the system (see Figure 4). Blue fields represent the message header while green fields are the system payload. The length of the payload field was chosen to allow the stacking of multiple requests linked with the same destination. This approach helps to decrease wireless channel congestion by transferring multiple requests within a single medium access procedure at the MAC layer. Two timestamp fields in the payload were introduced to get a high precision timestamp of the message encapsulation. The 64 bits correspond to the resolution of one nanosecond. Based on this information, the receiving node can estimate the end-to-end delay of the corresponding transmission, while gaining information about the timeliness of the received message. The calculated end-to-end delay could also be used by the routing process at the network layer to fine-tune a next-hop selection. A detailed description of the remaining message format fields can be found in Table 2. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Field** & **Length** & **Description** \\ \hline Ver. & 3b & Version of the application-layer protocol. \\ \hline Reserved & 4b & Reserved for future use. \\ \hline QoS level & 3b & Definition of the used Enhanced \\  & 3b & Distributed Channel Access (EDCA) \\  & & Access Category (AC). \\ \hline Allow Acknowledgements & 1b & Allow acknowledgements: By default set to value 0. When set to 1, communication \\ (ACK) & 1b & is acknowledged, and messages are not \\  & & periodically resent to the destination. \\ \hline Unicast mode (UC) & 1b & Unicast mode: By default set to value 1 (allow unicast). If set to 0, messages are \\  & & broadcasted. Broadcasting makes it \\  & & possible to send PEEV-WS messages \\  & & common to all drivers. \\ \hline Receiver type & 4b & Type of the receiver (e.g., passenger, \\  & & police, public transport, etc.). Intended for \\  & & future use cases, to enable coordination of \\  & & emergency services. \\ \hline Urgency level (UL) & 2b & Urgency level: The value directly \\  & & determining the mapping to the IEEE \\  & & 802.11p access category, i.e., the QoS level. \\ \hline Payload length & 14b & Payload length. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Description of message format fields. Figure 4: The message structure designed for the PEEV-WS.