Dijkstra Shortest Path Algorithm Using Global Positioning System
Dijkstra Shortest Path Algorithm Using Global Positioning System
ABSTRACT ground antenna. The radio signals from satellites are picked up
Dijkstra’s Algorithm is used to find the shortest path from one by the GPS receiver. A GPS receiver needs only 3 satellites to
node to another node in a graph.Dijkstra’s algorithm is also plot a rough, 2D position, which will not be very accurate.
known as a single source shortest path algorithm. It is applied Ideally, 4 or more satellites are needed to plot a 3D position,
only on positive weights. In this paper, Global Positioning which is more accurate than 2D [11].
System is used for adding a new functionality in Dijkstra’s 1.2.2 Three Segments of GPS
algorithm. In this paper, using Global Positioning System the
1. Space Segment
position parameter is added in the Dijkstra’s algorithm. From
2. Control Segment
this current position is retrieved at any point. By using this
3. User Segment (see fig.1)
current position, the distance can be determined from one node
to another node. The shortest path can also find out using this
Space segment: The satellites orbiting around the earth.
distance. For this an algorithm is proposed.
Control segment: The control & monitoring stations.
Keywords User Segment: The GPS receivers owned by civilians and
military.
Dijkstra Shortest Path Algorithm (DSPA), Global Positing
System (GPS), position, distance, node.
1. INTRODUCTION
In this we discuss two things. These are:
12
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014
2. To track animals in forest path from a sources to others vertices v in a graph. GPS is a
3. in delivery services satellite based system that is used in navigation, tracking &
4. in fire services & COP department [1]. mapping application. In this paper we use the concept of GPS
in Dijkstra’s shortest path algorithm for getting the current
We have read about the bus monitoring using polyline position of the nodes in the graph. In this paper we give only
algorithm. Day by day population is increases very fastly, the theoretical ideas about this process. No implementation &
which results in higher burden on public transportation. For a practical data is given in this paper. We proposed a model & an
system is proposed in this paper. This system is developed algorithm for this.
using these technologies like GPS, Google Map & GPRS
(Global Packet Radio Service) .the consists of GPS enabled 3.1 Proposed Model
device like mobile phones embedded in the bus, which find out
its current coordinates periodically after some interval & send START
it to the database for the being processed & analyzed.
Dijkstra’s algorithm is also used in this paper [2].
The concept developed is focused on one of the most well
known shortest path algorithm: the Dijkstra’s algorithm.
Although the latter is sufficiently efficient for small network IDENTIFY SOURCE S AS
like a city sized one, its running time for country size or PERMANENT & ALL OTHER
continental size geographical maps is prohibitive for real time NODES V.D[S] =0 & D [V] =∞
application. This method is also applicable to other type of
shortest path algorithms on graph network. The basic algorithm
for this is the Dijkstra’s algorithm [3].
TURN ON GPS & GET CURRENT
A route planning project named planific@ is developed for the POSITION FOR SOURCE NODE IN
city of Madrid (Spain).its main objective is to develop an FORM D[s]=0,D[v]=∞ OF
intelligent system that is capable of routing people from one COORDINATES.CALAULATE
place to other using public transport. For this we study the DISTANCE.
route planning algorithm for this. In this Dijkstra’s algorithm is
also used for finding the shortest path. Planning Domain
Definition Language (PDDL) is also used in this paper [4].
Location based services offer many benefits to mobile user to
SET V AS TEMPORARY & UPDATE
retrieve the information about their current location & process
NEIGHBOUR’S STATE
that data to get more useful information near to their location.
Using a GPS assisted phone & a web service using GPRS
,location based services can be implemented on Android based
smart phones to provide services like advising client of current
traffic conditions, providing routing information , helping them IF THE TEMPORARY NODE
find nearby hotels. In paper location based services is LINKED TO S THAT HAS LOWEST
implemented through Google Web Services & Walk Score WEIGHT
Transit APIs on Android Phones to give multiple services to
the user based on their location [5].
The Real Time GPS Navigation System determines the user’s
location on the digital map of Beirut using a GPS receiver. The GET POSITION OF THAT NODE BY
user enters the destination and the shortest path is computed GPS & CALCULATE DISTANCE.
using Dijkstra’s algorithm. The application guides the user
along the way by giving him/her directions. The user can take
a different route and the corresponding shortest path is
NO
dynamically recomputed. However, no matter how accurate the
GPS is, errors may occur; the GPS fails to show the correct
IS THIS NODE
user’s position. Corrections used in our application are based
DESTINATION?
on pattern recognition techniques which take several previous
GPS measurements to estimate the current position. Our Real
Time GPS Navigation System was realized using innovative
YES
techniques. The shortest path algorithm, for example, is an
improvement over Dijkstra’s classical algorithm. The driving
directions are generated by analyzing the geometry of the map BASED ON INFORMATION IN
instead of using a table at each node. Finally, the correction of STATUS RECORD DO UNTIL
the GPS errors and their matching on the map are performed REACH.
without requiring any radio signals; they rely only on the raw
GPS signal and the geometry of the road network. Moreover,
the system has a user-friendly interface that facilitates traveling
in the city of Beirut [6]. EXIT
3. PROPOSED WORK
In this paper, we use the current position in the Dijkstra’s Fig. 2 Proposed Model
algorithm using GPS. From this position we calculate the
distance from source to that position. In this we find a shortest
13
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014
3.2 Proposed Algorithm Table1. For finding the shortest path using Dijkstra’s &
Step1: INITIALIZE d[s]=0 for all vєV GPS
{s},where s as source, V as set of all
STEPS N POSITION DISTANCE D(B),PATHD(C),PATHD(D),PATHD(E),PATHD(F),PATH
vertices.
1 {A} (2,3) 0 3,A-B 5,A-C ∞,- ∞,- ∞,-
Do d[v] =∞. //set all node’s distances to ∞ 2 {A,B} (5,7) 5 3,A-B 4,A-B-C 5,A-B-D 4,A-B-E ∞,-
except s. 3 {A,B,C} (8,11) 10 3,A-B 4,A-B-C 5,A-B-D 4,A-B-E ∞,-
Step2: Get the current position (x1, y1) of 4 {A,B,C,E} (11,15) 15 3,A-B 4,A-B-C 5,A-B-D 4,A-B-E 7,A-B-E-F
5 {A,B,C,D,E}(14,19) 20 3,A-B 4,A-B-C 5,A-B-D 4,A-B-E 7,A-B-E-F
source node from GPS.
6 {A,B,C,D,E,F}
(17,23) 25 3,A-B 4,A-B-C 5,A-B-D 4,A-B-E 7,A-B-E-F
Source_x=x1;
Source_y=y1;
Dist.=0; 4. RESULT & ANALYSIS
Step3: S is the set of visited vertices. In this section, we give the results by using the MATLAB .we
Set S = φ //S is initially empty. represents the results in the form of graphs. We use the fuzzy
Q=V //Queue initially contain all the logic in the MATLAB. We are using the rules for this.
vertices.
While Q ≠ φ //while Q is USING DIJKSTRA ALGORITHM
not initially empty. TABLE 2. Impact of Distance on Path
Do u = mindistance(Q,d) //select element of Q with
min. distance. DISTANCE SHORTEST_PATH
S = S U {u} //add u to the list of visited Min. Selected
vertices.
Step4: Get the position (x2, y2) of the Max. Not Selected
visited nodes from GPS
Current_x = x2;
Current_y = y2;
distance= √(x2-source_x)2+ (y2-
source_y) 2
dist= distance + dist
Previous_x = x2;
Previous_y = y2;
Step5: For all v є neighbors[u]
Do if d[v] > d[u] + w [u,v] //if new shortest path
found.
Then
d[v]=d[u] + w [u,v] //see new value of
shortest path if desired then trackback.
Return dis.
Step6: Get the position (x2, y2) of the
visited nodes from GPS
Current_x = x2;
Current_y = y2;
distance= √(x2-source x) 2+ (y2-
source y) 2
dist= distance + dist
Previous_x = x2;
Previous_y = y2;
3.3 Example:
2
B D 4
3
Fig.4 Fuzzy logic system with one input producing output
1 3 as shortest path selected
F
1
A
E 3
5 C
2
Fig. 3 Example for shortest path
14
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014
15
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014
16
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014
6. REFERENCES
[1] Pankaj Verma , J.S Bhatia , “Design And Development Of
GPS-GSM Based Tracking System With Google Map
Based Monitoring”, International Journal of Computer
Science, Engineering and Applications (IJCSEA) Vol.3,
No.3, June 2013.
[2] Vishal Bharte, Kaustubh Patil, Lalit Jadhav, Dhaval Joshi,
“Bus Monitoring System Using Polyline Algorithm”,
International Journal of Scientific and Research
Publications, Volume 4, Issue 4, April 2014.
[3] Sacha Varone, “On a many-to-one shortest paths for a taxi
Service”, Haute ecole de gestion de Gen eve CRAG -
Centre de Recherché Appliqué ee en Gestion Cahier de
Recherché
[4] Carlos Martín García and Gonzalo Martín Ortega, “Route
planning algorithms: Planific@ Project”, International
Journal of Artificial Intelligence and Interactive
Multimedia, Vol. 1, No 2.
Fig.14 Fuzzy logic rule based viewer [5] Manav Singhal, Anupam Shukla, “Implementation of
Location based Services in Android using GPS and Web
17
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014
Services”, IJCSI International Journal of Computer [8] Hu Jian-ming; Li Jie; Li Guang-Hui, "Automobile Anti-
Science Issues, Vol. 9, Issue 1, No 2, January 2012. theft System Based on GSM and GPS Module,"
Intelligent Networks and Intelligent Systems (ICINIS),
[6] Abboud, Marwan, LM Abou Jaoude, and Ziad Kerbage. 2012 Fifth International Conference on , vol., no.,
"Real Time GPS Navigation System." disponible sur pp.199,201, 1-3 Nov. 2012
http://webfea-lb. fea. aub. edu. lb/proceedings/2004/SRC-
ECE-27. pdf (2004). [9] PMS475_chap5.pdf
[7] A.Prakash, R.Manickavasagam, “Elegant Way of Reaching [10] 1-Melissa.pdf
Destination Using GPS and Drivers Ability”, International
Journal of Advanced Research in Computer Science and [11]http://4.bp.blogspot.com/HqYRvKnZe1k/UIQi0QkA1WI/
Software Engineering, Volume 4, Issue 3, March 2014. AAAAAAAAABo/Tc1UUf84Ok8/s1600/gps_segments%
5B1%5D.jpg
IJCATM : www.ijcaonline.org
18