# Traffic Congestion Detection System through Connected Vehicles and Big Data
## 3 Proposal Architecture
### Design of the Packet Structure
#### 3.5.2 DATA Packet De-Encapsulation and Encapsulation  
DATA, DATA REQUEST and DATA RESPONSE packets received by a RSU with a Gateway functionality will be de-encapsulated to obtain the data, which is then sent by means of an HTTP  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Packet Type** & **Initial Source Address** & **Final Destination Address** & **Hops** & **Packet Counter** & **Data** & **Latitude** & **Longitude** \\ \hline
45 & 4 Bytes & 4 Bytes & 02 & 3 Bytes & 0–1455 Bytes & 12 Bytes & 12 Bytes \\ \hline \hline \end{tabular}
\end{table}
Table 6: LORA-CBF DATA REQUEST packet structure.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Packet Type** & **Initial Source Address** & **Final Destination Address** & **Hops** & **Packet Counter** & **Data** & **Latitude** & **Longitude** \\ \hline
46 & 4 Bytes & 4 Bytes & 02 & 3 Bytes & 0–1455 Bytes & 12 Bytes & 12 Bytes \\ \hline \hline \end{tabular}
\end{table}
Table 7: LORA-CBF DATA RESPONSE packet structure.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Packet Type** & **Initial Source Address** & **Final Destination Address** & **Hops** & **Packet Counter** & **Data** & **Latitude** & **Longitude** \\ \hline
44 & 4 Bytes & 4 Bytes & 02 & 3 Bytes & 0–1455 bytes & 12 bytes & 12 bytes \\ \hline \hline \end{tabular}
\end{table}
Table 5: LORA-CBF DATA packet structure.  
protocol to the API of the cluster in a JSON format. The vehicle data and the big data Cluster that uses the vehicular data are then encapsulated in packets as shown in Table 8.  
The data delivered by the server is encapsulated by the link port RSU and then sent to the OBU that requested it.  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Field** & **Content** \\ \hline
**Beginning** & 7E \\ \hline
**Size** & 01 03 \\ \hline
**Transmission method** & 01 \\ \hline
**RSSI** & 40 \\ \hline
**Reserved** & 01 \\ \hline
**Origin address** & C0 A8 05 02 \\ \hline
**Destination address** & C0 A8 04 01 \\ \hline \multirow{6}{*}{**Useful charge**} & **Type** & 44 \\ \cline{2-3}  & **Initial Origin Address** & 00 56 45 52 \\ \cline{2-3}  & **Final Destination Address** & 00 62 67 62 \\ \cline{2-3}  & **Jumps** & 02 \\ \cline{2-3}  & **Source Packet counter** & 00 00 0A \\ \hline \multirow{6}{*}{**Useful charge**} & \"On-Road\_Vehicle\_Data\_Message\"I \\  & [ & \"acknowledgement\" : \"1\", \\  & \"latitude\" : \"19.2651047871\", \\  & \"temperature\" : \"26.5\", \\  & \"vehicleId\": \\  & \"642c5 dd1163158194244440a145 fb1 ba596787c\", \\  & \"packageCounter\": \"322\" \\  & \"speed\": \"0.037\", \\  & \"timestamp\": \"2016-03-28 20:13:42\", \\  & \"longitude\": \"-103.713618619\", \\  & [ & \"acknowledgement\" : \"1\", \\  & \"latitude\": \"19.2651047549\", \\  & \"temperature\": \"26.6\", \\  & \"vehicleId\": \\  & \"645864b8e49 bba130d26 de6902319a9a9069a\", \\  & \"packageCounter\": \"452\" \\  & \"speed\": \"0.018\", \\  & \"timestamp\": \"2016-03-28 20:13:42\", \\  & \"longitude\": \"-103.713618561\", \\  & [ & \"acknowledgement\" : \"1\", \\  & \"latitude\": \"19.2651047388\", \\  & \"temperature\": \"26.9\", \\  & \"vehicleId\": \\  & \"649164b8e49 gcuc130d26 de690231f9a9a9879b\", \\  & \"packageCounter\": \"452\" \\  & \"speed\": \"0.020\", \\  & \"timestamp\": \"2016-03-28 20:13:42\", \\  & \"longitude\": \"-103.713618532\", \\  & [ & \"longitude\": \"-103.713618532\", \\  & [ & \\ \hline
**Latitude** & 19.2651047871 \\ \cline{2-3}  & **Longitude** & \(-\)103.713618619 \\ \hline
**Verification sum** & 9D \\ \hline
**Force** & 7D \\ \hline \hline \end{tabular}
\end{table}
Table 8: Example of an encapsulated DATA packet.