0% found this document useful (0 votes)
69 views

Dijkstra Shortest Path Algorithm Using Global Positioning System

The document discusses using Dijkstra's shortest path algorithm with global positioning system (GPS) data. It describes how GPS can provide current location coordinates, which can then be used to calculate distances between nodes in a graph. The document proposes a model and algorithm that uses GPS to get the current position of the source node, calculates distances to other nodes, and finds the shortest path using Dijkstra's algorithm modified to incorporate distance data from GPS coordinates.

Uploaded by

Embezzle Network
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Dijkstra Shortest Path Algorithm Using Global Positioning System

The document discusses using Dijkstra's shortest path algorithm with global positioning system (GPS) data. It describes how GPS can provide current location coordinates, which can then be used to calculate distances between nodes in a graph. The document proposes a model and algorithm that uses GPS to get the current position of the source node, calculates distances to other nodes, and finds the shortest path using Dijkstra's algorithm modified to incorporate distance data from GPS coordinates.

Uploaded by

Embezzle Network
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

International Journal of Computer Applications (0975 – 8887)

Volume 101– No.6, September 2014

Dijkstra Shortest Path Algorithm using Global


Positioning System
Pooja Singal R.S.Chhillar
DCSA, MDU, Rohatk HOD, DCSA, MDU, Rohatk

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:

1.1 Dijkstra Algorithm


Dijkstra’s algorithm is invented by Dutch computer scientist
Edsger Dijkstra in 1956 and published in 1959, is a graph
based searching algorithm that solves the single source shortest
path problem. It is applied only on positive weights graphs.
This algorithm is often used in routing. Dijkstra’s algorithm is
used for finding the shortest path with minimum cost.
“For example:-Let vertices in a graph the cities &edges which
link these vertices are the driving distances from one city to
another city. DSPA is used to find the shortest route from one
city to another with minimum cost. It solves only the problems Fig. 1 Three segments of GPS [15]
with nonnegative costs, i.e., C ij >=0 for all (i, j) belongs to E,
Where C is the cost & E is the edges for a graph. In this paper we use the GPS in Dijkstra’s algorithm for
finding the current location. By using this position we calculate
1.2 Global Positioning System (GPS) the distance from source to every node in the graph. From this
GPS is a satellite based system that can be used in navigation we also estimate the shortest path. Distance is given by a
to locate the positions anywhere on the earth. GPS is designed formula:
& operated by U.S. Department of Defense (DOD).GPS Distance= [(x2-x1)2 + (y2-y1)2+ (z2-z1)2]1/2
consists of satellites, control & monitor stations and GPS
receivers. GPS receivers take information which is transmitted Where x, y, z are the coordinates of a position given by GPS.
from the satellites and uses triangulation to calculate a user’s In this paper we discussed about 1 is introduction, 2 is related
exact location. GPS is used in a variety of ways: work, 3 is proposed work, 4 is results and analysis,5 is
conclusion and future work & 6is references.
 To determine the position of locations.
 To navigate from one location to another. 2. RELATED WORK
 To create digitized maps. GPS is used for tracking your vehicles & keeps regular
 To determine the distance between two points. monitoring. This tracking system can tell your location & that
information can be observed from another remote location.
1.2.1 Working of GPS This paper consists hardware part i.e. GPS,GSM,MAX
The basis of GPS is a constellation of satellites that are 232,16*2 LCD &software part is used for interfacing all the
continuously orbiting around the earth. These equipped with required modules & a web application is also developed at
atomic clocks & transmit radio signals that contain their exact client side. This is used for controlling theft of a vehicle. The
location, time and other information. The radio signals which simulation is done by PROTEUS software. It can be beneficial
are transmitted from the satellites are monitored & corrected for:
by control stations which are sent back to satellites using
1. Parents to look after their children.

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

USING GPS & DIJKSTRA


TABLE3. Impact of Distance & Position on Path
DISTANCE POSITION SHORTEST_PATH
Min. Accurate Selected
Max. Not Not Selected
Accurate

Fig.5 Fuzzy logic rule based viewer

Fig.7 Fuzzy logic system with two input & producing


shortest path as output

Fig.6 Surface viewer

Fig.8 Fuzzy logic rule viewer

15
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014

Fig.9 Surface Viewer

USING POSITION & ROUTE


TABLE4. Impact Of Position On Route
POSITION ROUTE
Accurate Selected
Not Accurate Not Selected
Fig.11 Fuzzy logic rule based viewer

Fig.10 Fuzzy logic system with one input & producing


output route selected

Fig.12 Surface Viewer

16
International Journal of Computer Applications (0975 – 8887)
Volume 101– No.6, September 2014

USING TIME & PATH


Table5. Impact of Distance & Time on Path
DISTANCE TIME SHORTEST_PATH
Min. Less Selected
Max. More Not Selected
Min. More Not Selected

Fig.15 Surface Viewer

5. CONCLUSION & FUTURE SCOPE


In this paper Dijkstra’s algorithm is used to find out the
shortest path in a graph. GPS is used in Dijkstra’s algorithm to
get the current position of each node. Distance is also
calculated from this position. An algorithm is proposed for
Fig.13 Fuzzy logic system with two input & producing this. But only theoretical concept is given, practical
shortest path as output implementation is not given in this paper. So, in future you can
implement this algorithm practically. This concept of GPS is
also used on others shortest path algorithms like A*, Warshals
algorithm & Bellman Ford algorithm etc.

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

You might also like