## 3 Methodology
### Rectangle-Aided Location-Aided Routing (RALAR)  
The conventional LAR protocol utilized location information provided by GPS sensors [29]. It helps to reduce the search space by exchanging data packets through the network for the desired route. The conventional LAR protocol has not exploited the fact that nodes do not have a complete random movement in VANETs [30]. This means that the nodes in the LAR protocol are able to predict the position of the destination node by ignoring the fact that the pre-defined constraint on the destination node navigation was encountered [31]. Moreover, the KALAR protocol only uses the real mobility vehicles and model-driven traces with the Kalman Filter. It predicts the vehicle position from its previous and current position. Without Kalman Filter, this approach calculates the Euclidian distance among the destination node and the neighboring node and sends the data to the node which has the shortest distance. The KALAR protocol estimates and corrects the linearity by using the feedback system to calculate the position of the vehicle [32]. This might cause the wrong position identification of the vehicle due to higher computational time and complexity. In contrast, the proposed RALAR estimation based on the heuristic approach has been developed to reject weak GPS location data and accept good ones. The idea will be based on a moving rectangular zone according to the node's mobility model, which will be explained below. The proposed RALAR is the positing-based routing protocol, in which the nodes communicate with each other by utilizing the IEEE 802.11p distributed coordination function (DCF), which is the fundamental medium access control (MAC) technique, as suggested by [33; 34]. In order to get location information, every vehicle (car) is provided with a GPS to determine \((X,Y)\) position. This consists of a compass to determine the direction of the vehicle, and an odometer to determine the speed of the vehicle. However, using these sensors does not always guarantee exact information about the position; therefore, including a model to improve the estimation of vehicle location will improve the performance of the network. In the proposed RALAR, it is supposed that the position of the vehicle is \((X_{0},Y_{0})\), and the speed is V at time t\({}_{0}\), as shown in Figure 1. By using a magnetic compass, the direction of a vehicle can be determined. At the time t\({}_{1}\), the GPS determines and accepts the position if the vehicle is inside a rectangle defined in front of the vehicle (last estimated position). The backside of the rectangle passes through the vehicle's center, and the length of the sides is equal to a distance threshold. In order to determine a value for the threshold, several parameters can be considered, such as car speed, GPS response time, the speed limit of the road, and the curvature of the road. The distance threshold to calculate the length of the rectangle can be represent as follows  
\[Threshold=Car\ Velocity\times time\ period\ of\ GPS+const \tag{1}\]Here, a _const_ parameter has been added which defines the chance of error that occurred in the odometer to get the accurate value. Hereafter, if the measurement is accepted (inside the rectangle), the value must be corrected. It is due to the measured position that could be close enough to be accepted; however, it also refers to the value of the real path. Moreover, it is clear that if the distance between the position at t\({}_{0}\) and the position at t\({}_{1}\) is higher than a threshold value (outside the rectangle), the previous value has been considered as rejected, which means that the new value of car position is now updated according to the following equations  
\[X_{new}=X_{old}+V_{X}\times dt \tag{2}\]  
\[Y_{new}=Y_{old}+V_{Y}\times dt \tag{3}\]  
Here, \(V\) refers to the velocity of the odometer, \((X,Y)\) represent the GPS positions and \(dt\) refers to the compass.