# Weight-Based PA-GPSR Protocol Improvement Method in VANET
## 3 Formation of Weighted Path Aware Greedy Perimeter Stateless Routing Protocol
### Influence of Cumulative Communication Duration on Communication Reliability  
The cumulative communication duration defines the stability of the communication link between the neighbor node and the node currently carrying the data packet [15; 16]. In Figure 2, nodes Q and C are in the reliable communication area of node A, and, thus,  
Figure 1: The influence of node movement direction on communication reliability. A schematic diagram of packet delivery: (**a**) before packet delivery at T moment; (**b**) after packet delivery at T + 1 moment. In the figure, node S is the source node, nodes A and B are relay nodes, node D is the destination node, the dotted circles represent the communication range, and the solid line and arrows represent the direction of node movement. Figure 2: The influence of reliable neighbor node density on communication reliability. The reliable neighbor nodes of node A are nodes C and Q, and the reliable neighbor nodes of node B are nodes U, T, E, and Y.  
the cumulative communication duration between the two neighbor nodes and node S is calculated as follows:  
\[T_{i}=T_{i-1}+t_{i}-t_{i-1} \tag{1}\]  
In Formula (1), T\({}_{i}\) is the current cumulative communication duration, T\({}_{i-1}\) is the last cumulative communication duration, t\({}_{i}\) is the current time of receiving the HELLO packet, and t\({}_{i-1}\) is the time of receiving the last HELLO packet. If T\({}_{1}\)= 0, t\({}_{1}\) is the moment of receiving the first HELLO packet. By comparison with nodes Q and C, the node that has the largest T\({}_{i}\) will be selected as the next hop node of S. When forwarding data packets according to this method, the greater the cumulative communication duration, the higher the possibility of establishing reliable communication between the two nodes, as well as the smaller the probability of data loss. By introducing reference factors, such as the direction of movement of the next hop node and the density of reliable nodes, this paper optimizes the traditional greedy forwarding strategy. Compared to simply judging the distance between the next hop node and the destination node, this optimization strategy can reduce the limitations of the strategy and provide a better solution. When the node forwarding the data packet is closer to the destination node than all of its neighbor nodes in location-based routing protocols, and if the destination node does not exist within its transmission range, the greedy forwarding strategy will fail, and at this point, the routing protocol is said to be trapped in a routing void. To overcome this problem, GPSR and other traditional greedy routing protocols will be converted to traditional perimeter forwarding strategies for maintenance. The traditional perimeter forwarding strategy uses the right-hand rule and transmits data packets around the periphery of the area until it reaches an adjacent node located closer to the destination node. For example, Figure 3 shows that within the communication range of node S, no node is closer to the destination node D than S. Therefore, node S adopts the right-hand rule, and the construction path is S-A-C-R-U-D. However, if the angle of the packet delivery direction and the angle of the node S pointing to the destination node D and the reliable node density are considered, node S will select node F as the next hop, and the construction path will be S-F-K-M-D, which reduces path redundancy. By comparing the two paths, it is found that the path in the traditional perimeter forwarding strategy is longer, which increases the number of hops and produces a higher delay. This paper optimizes networks on the basis of the traditional perimeter forwarding strategy, taking the delivery direction of data packets as the main reference quantity, to be supplemented by the density of reliable nodes, meaning that the direction of data packet delivery converges on the direction of the destination node, thereby reducing  
Figure 3: A schematic diagram of perimeter rule forwarding packets.