Considering city road environment as the background, by researching GPSR greedy algorithm and the movement characteristics of vehicle nodes in VANET, this paper proposes the concept of circle changing trends angle in vehicle speed fluctuation curve and the movement domain and designs an SWF routing algorithm based on the vehicle speed point forecasted and the changing trends time computation. Simulation experiments are carried out through using a combination of NS-2 and VanetMobiSim software. Compared with the performance of the SWF-GPSR protocol with general GPSR, 2-hop C-GEDIR, and the GRA and AODV protocols, we find that the SWF algorithm has a certain degree of improvement in routing hops, the packet delivery ratio, delay performance, and link stability. gateway to connect to internet as discussed in [3].Ad hoc network is a kind of distributed wireless multihop network composed of a group of nodes with routing function, and it does not rely on any of the default network infrastructures. In ad hoc network, the transmission range of nodes is limited. When the source node sends data to the target node, it usually requires other auxiliary node, so routing protocol is an indispensable part of the ad hoc network as discussed in [4]. Traditional data aggregation schemes for wireless sensor networks usually rely on a fixed routing structure to ensure that data can be aggregated 2 International Journal of Distributed Sensor Networks at certain sensor nodes. However, they cannot be applied in highly mobile vehicular environments. Unlike the traditional ad hoc networks [5], VANET has some different characteristics such as regularity and predictability [6]. The global positioning system (GPS) can provide precise positioning service for vehicles. However vehicle is moving at high speed, obstruction in existence, and frequent changes in network topology, so VANET routing leads to more complex routing problems. From a functional perspective, the routing protocol is a mechanism by which communication network sets guidelines for the business data from the source node to the destination node. The design objectives of routing protocol are to meet the application requirements while minimizing the network energy consumption, to use resources effectively, and to expand the network throughput. Among them, the application's needs generally include delay, delay jitter, and packet loss rate. And the network capacity can be seen as a function, which is related to each node's available resources, the number of nodes in the network, node density, the endto-end communication frequency and topology changes, and other factors, as discussed in [7]. VANET routing protocols have three common classifications: greedy perimeter stateless routing (GPSR) routing algorithm is an algorithm using location information routing, which uses a greedy algorithm to establish the routing in [8]. As discussed in [9], resourceconstrained mobile sensors require periodic position measurements for navigation around the sensing region.