Mobile GPS Tracking

12,557 views

Published on

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
12,557
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
758
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Mobile GPS Tracking

  1. 1. Mobile GPS TrackingChapter 1 INTRODUCTION 1.1 Overview of Background The Global Positioning System (GPS) is a location system based on a constellation of 24 to 32 satellites orbiting round the earth at altitudes of 11,000 miles. Each satellite is powered by the Sun via its solar panel. In its earlier years, GPS was developed in the US for military use, for the Department of Defense (DOD). Through the years of development and improvement, we have advanced the use of GPS to tracking our precise location worldwide and as a navigation aiding tool for civilian usage. Currently, it is used as navigation tool device to assist us in finding the shortest route to our destination. We can use it either in the forest to help in navigation task or in a vehicle to guide us to our destination. Runner uses GPS watches worn on wrist to track the distance and route they have travelled. As such, with the advancement of GPS into our life, we will never lose our way again which saves us time, energy and petrol. In conclusion, overall GPS improves our efficiency in our daily life. 1.2 GPS Technology The most important factor in GPS tracking, accuracy is essential to precisely track the exact location in real-time. There is a need to know the GPS infrastructure layouts, limitations, and communication protocol. Research will need to be conduct in order to fully understand each individual component. We need to understand the type of methods used for the GPS technology and the problem which would affect the performance of the GPS tracker receiving of satellite signal. 1.3 Motivations and Goals Security is very important in some activities. Free ride, mountain walking or climbing, paragliding are those where accidents can be serious or fatal. Having the possibility to follow physically the position of a person on regular basis can be comfortable for family, relatives or others. These meant to propose a simple and portable solution for people to get traced during a trip. The application is web based and should be available for every people who have the possibility to R V College of Engineering 1
  2. 2. Mobile GPS Tracking 1. Run a small Java application on its mobile phone. 2. Has link between a GPS device and its mobile phone. 3. Has Internet access.This concept is not new and a lot of applications involving GPS are available on the market:now a day’s almost every new car is equipped with a GPS on board and helps people in cityor country side to find their road.The concept of this project is a bit different. We are not focusing on "where are we?" butmore on "where he/she is?”. For this the idea is to use a cell phone which accepts to receiveGPS coordinates and send them to a server able to record them under the account of aregister user (tracked person). Then from a web client, the user can be followed on a map inreal time mode. Figure 1.3 GPS Tracker General SchemaR V College of Engineering 2
  3. 3. Mobile GPS TrackingChapter 2 REQUIREMENT ANALYSIS 2.1 System Requirements The system needs different components are given below:  An Application Server J2EE EJB 2.1 compatible.  A SQL database  Java compatible mobile phone with Bluetooth  Internet access 2.1.1 Functional Requirements The application will follow the use cases described in Fig 1.4. All use cases are now described formally. Within the 3 actors, the manager has a special role and is automatically created with the user Id 1. It can do exactly what a standard user can do but has special rights that the others dont have.  Creation of users Any user who wants to be followed needs to be register in the system first. The applications will offer a web interface to enter the following data. 1. First Name 2. Last Name 3. Street 4. Zip code 5. City 6. Phone 7. Password Then the user receives a user Id (integer) and is recorded in the database. This part is done on the web client side. The password must be more than 4 characters long. Any fields must be empty otherwise the user is not register. R V College of Engineering 3
  4. 4. Mobile GPS Tracking Modification of the user profileOnce logged, the user can modify its profile using the same data as above and sameconstraints. User loginThis web page is the first one in the system. The user must be identify in order to access anyoptions. The web page contains two fields: 1. User ID 2. Password  Creation of a track for a given userThe user, once registered, can log in the system and create a track. There is two possibilitiesto do it. 1. From the web client application. 2. From the mobile application (mobile phone).If a new track is started from the mobile application, the user must provide: 1. User Id 2. PasswordThen the server will create a new track and be ready to store the future positionsin under this tracks id.For a track started from the web client, the user can give: 1. North coordinates 2. East coordinatesThis will represent the first point of the track. The track has a unique identifier within thesystem. The time and date when the track is created is taken from the servers clock.  Sending GPS coordinates to a server using mobile data communicationThe users get the coordinates (position) from its GPS device and send them to the serverwith mobile phone. The position must contain: 1. User Id 2. Time 3. North coordinatesR V College of Engineering 4
  5. 5. Mobile GPS Tracking 4. East coordinates 5. AltitudeThen the server records the position under the users current track id. If no track is createdor the user Id does not exists, the system gives an error message and do not record theposition.  Follow a user in real time mode on the InternetAny person having the right to watch a users track must log in the system under the usersID and password. Then he/she can choose the track to be drawn. A list of the users tracks isavailable. This is done through the web page. The drawings of the track are done in twodifferent manners: Swiss Topo 2D maps and Google Earth. If the track chosen is the currentone and drawn in 2D mode, it is refreshed periodically using a "refresh time" parameter.  Delete a trackThe user can delete tracks from a list of tracks. If the track deleted is the current one thenthe previous one become again the current track and all the future positions sent to theserver will be save under this track id.  Manager - Delete usersThe web page allow the manager to delete users from a list of register one. This list showsall the available users.  Manager - Follow a tracked user in real time mode on the InternetThe manager can choose the track to be drawn. A list of all users tracks is available. This isdone through the web page. The other options are the sameas standard users.2.1.2 Non – Functional RequirementsConstraints on the services or functions offered by the system such as timing constraints,constraints on the development process, standards, etc.Following Non-functional requirements will be there in our project:R V College of Engineering 5
  6. 6. Mobile GPS Tracking 1. Secure access of confidential data (user’s details). 2. 24 X 7 availability. 3. Security 4. Reliability 5. Maintainability 6. Portability 7. Extensibility 8. Reusability 9. Application Compatibility2.3 Software RequirementsThe OS where all the following were installed is Windows XP sp2:  J2EE Application Server: Sun Java System Application Server Platform Edition 8.1 2005Q1  Enterprise Java Beans 2.1  Java Midlet : SUN J2ME Wireless Tool Kit 2.2  PointBase free Version: 5.2 ECF build 294  Java VM : J2SE Version 1.5.0 (build 1.5.0 06 b05)2.4 Hardware RequirementsOnly two devices where needed and are 1. Mobile Nokia Phone 2. GPS EMTAC Bluetooth - GPS TrineR V College of Engineering 6
  7. 7. Mobile GPS TrackingChapter 3 DESIGN 3.1 Architecture The technologies used for the project are client-server and web based. The main platform of development is J2EE. The full description of the language, server version is described above. We will not explain in detail how J2EE works and assume that the reader knows this technology and how the modules are defined. The general structure of the application is shown in the Fig 3.1. The application is based on 3-tiers architecture: 1. Client side: mobile application, web browser 2. Server side: business logic, web application (interface) 3. Database Figure 3.1 General Architecture of GPS Tracker application 3.2 Components As shown in the fig 3.1, there are 3 main components. The client side which contains an Java Midlet application (loaded in the mobile phone) and the browsers. The application server which contains the Web container (JSPs and servlets) and the EJB container where the business logic (Session beans and Entity beans) stands. The third tier is the database managing the tables where the entity beans store their values. R V College of Engineering 7
  8. 8. Mobile GPS Tracking3.3 Software ModulesNow we enter into the different modules which are contained in the main components. Wewill treat them by decreasing complexity. Finally we will describe the communication layerbetween the different modules. 1. EJB container: description of the Session and Entity Bean. 2. WEB container: description of the JSPs and Servlets. 3. Database: description of the tables and relations. 4. Midlet: description of the Java mobile application.3.3.1 EJB container: description of Entity Bean and the SessionThe fig 3.2 shows the definition of the entity beans class and the relation between them.Primary Key management: the primary key management is implemented with an entitybean. The idea is to avoid for the user to give manually a unique key for each new position,track, address, user, etc. This is simply impossible to do it in a large scale. Also managing theprimary key allow the system to be "database vendor independent".3.3.2 WEB Container: description of the JSPs and ServletsThe figure 7 shows the different JSPs and Servlets that the Web container manages. Theassociation represents the navigation between the JSPs. This figure contains the web accessJSPs. The JSPs are composed with HTML code for the front end and quite a lot of Java codewhich call methods in the session beans. We still need to describe the servlets which allowthe mobile phone to access the application server.R V College of Engineering 8
  9. 9. Mobile GPS Tracking Figure 3.2 Entity Bean: Class diagram3.3.3 Database: description of the tables and relationsEach Entity Bean represents the storage medium and must correspond to a table in thedatabase. We going to describe in pseudo SQL command the fields of the six tablescontained in the database SAMPLE. TABLE TRACKER_PERSON ( ID INTEGER NOT NULL CONSTRAINT PERSON_PK PRIMARY KEY, FIRSTNAME VARCHAR (24) NOT NULL, LASTNAME VARCHAR (24) NOT NULL, ADDRESS_ID INTEGER NOT NULL, CRT_TRACK INTEGER NOT NULL, USER_ID INTEGER);R V College of Engineering 9
  10. 10. Mobile GPS Tracking3.3.4 Midlet: description of the Java mobile applicationThe mobile application is developed in Java using J2ME 2.2. More precisely we have thedescription in fig 3.3 of the Midlets Architecture. Again, only the methods which areneeded to request or send data are shown. The "not described" methods are usual ones in aMidlet (Menu definition, button, action, etc Figure 3.3 Midlets - complete architecture of the mobile application3.4 Communication between modulesThe communication layer is describing in the fig 3.4 for the project, H t t prequest between mobile phone and server (using GPRS) i s implemented. Theidea is to develop the SMS communication in the future. Figure 3.4 Communication between the different modules of the applicationR V College of Engineering 10
  11. 11. Mobile GPS Tracking3.5 Use cases Figure 3.5 Use CasesThe Fig 3.5 shows the use cases for the application. There are 3 actors, 10 use cases whichrepresent for different action what actors can do with the system. The use case Start a trackis in fact 2 use cases. A track can be started from the web client or from the mobileapplication (cell phone application). The use case Send a position is only available from themobile application.R V College of Engineering 11
  12. 12. Mobile GPS TrackingChapter 4 INTEGRATION AND TESTING Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. The GPS tracking system will be subjected to a series of field trials and functional testing where various test cases will be performed to validate the different features of the system. The methodology used in the testing process is described in Fig 4.1 Start Configure test case input parameters Perform testing Results and outcome Evaluation and compare with expected results/ outcome Any errors or Debug and rectify deviations from Yes errors expected results? No Further improvement and enhancement End Figure 4.1 functional testing methodologies R V College of Engineering 12
  13. 13. Mobile GPS TrackingA few test cases will be defined and tested where the collated results will be verified andcompared with the expected outcome. If there are any errors or deviations from theexpected results, the program will be analyzed to rectify any software bugs. This testingcycle will be repeated until all the problems have been resolved. Thereafter, evaluation willbe performed to further enhance and improve the system to deliver the best userexperience.4.1 Unit TestingUnit testing is a method by which individual units of source code, sets of one or morecomputer program modules together with associated control data, usage procedures, andoperating procedures, are tested to determine if they are fit for use.4.1.1 Test StrategiesFeatures to be tested 1. module which create user 2. module which delete’s the tracks 3. module which send positions 4. module which draws tracks 5. module which deletes user 6. module which create track4.1.2 Test case Sl No. of test case : 1 Name of test : User Item / Feature being tested Whether system is able to create users account Sample Input : Allowing user to Register on providing specified constraints Expected output : User account should created Actual output : User created successfully Remarks : Module is working properlyR V College of Engineering 13
  14. 14. Mobile GPS Tracking Sl No. of test case : 2 Name of test : Delete tracks Item / Feature being tested Whether the module allow to Delete tracks : Sample Input : Trying to delete track Expected output : It should delete the specified Actual output : Track deleted Remarks : Module is working properly Sl No. of test case : 3 Name of test : Sending positions Item / Feature being tested Whether system is able send GPS coordinates to a server : using mobile data communication Sample Input : Module gets position from GPS and send it to server Expected output : Module should send user_id, position to server Actual output : Position sent properly Remarks : Module is working properly Sl No. of test case : 4 Name of test : Drawing tracks Item / Feature being tested Whether system is able draw tracks stored in database : Sample Input : Module should get positionsR V College of Engineering 14
  15. 15. Mobile GPS Tracking Expected output : Module should draw track on google earth application Actual output : Draw track properly Remarks : Module is working properly Sl No. of test case : 5 Name of test : Delete user Item / Feature being tested: Whether system is able delete user Sample Input : Module gets user id from manager Expected output : Module should delete only specified user Actual output : Specified module deleted properly Remarks : Module is working properly Sl No. of test case : 6 Name of test : Track creation Item / Feature being tested: Whether system is able create track Sample Input : Module get position from mobile GPS Expected output : Module should create track only for registered user Actual output : Track created properly Remarks : Module is working properlyR V College of Engineering 15
  16. 16. Mobile GPS Tracking4.2 Integration TestingIntegration testing (sometimes called Integration and Testing, abbreviated "I&T") is thephase in software testing in which individual software modules are combined and tested asa group.4.2.1 Test StrategiesFeatures to be tested 1. Login and save track4.2.2 Test case: Sl No. of test case : 1 Name of test : Login and save track Item / Feature being tested : Whether system login proper user and track Sample Input : User name and password for login and position for track Expected output : User should login, track the positions and save track Actual output : Track of user stored in database Remarks : Integration of module 2 and 1 is working properlyR V College of Engineering 16
  17. 17. Mobile GPS Tracking4.3 Known ProblemsHere is the list of most severe problems:  We had one serious database corruption due to external access and manual unlock of tables. The database had to be recreated (Point base is only an evaluation version!)  At least two times, the SUN application Server crashed and had to be re-installed. Again the version used is only a free version.  The Http session are not well managed. The login is a real "secure Login". When a user is in the system, an Http session is created and its context is available during the session. But there is a bug when no activities where done for a long period: the server raises an exception (which is good in term of security) when the client try to refresh or access the system. I was not able to catch this exception and redirect the request to the login page indicating to the user that the session is over and he must authenticate himself again.  We have not succeeded in properly saving the applet in the package and use it from here. We still need to save it in the where all the JSPs stand and compile it before.  No real and efficient security is setup and the Midlets can send only the user ID to start a track for instance (unacceptable in a real usage).R V College of Engineering 17
  18. 18. Mobile GPS TrackingChapter 5 OPERATION AND MAINTENANCE 5.1 Tutorial The application is very simple to use and very intuitive. The user interfaces are: 1. Web client 2. Midlet 1. Web client The web client can allow two types of users to be log in the system: 1. Manager 2. User. The manager is a special user and is identified in the system by the user Id number”1”. It is in fact the first user to be register. The figure shows the web site map for a normal user. We will see what the additional rights that the manager has later are. To access the application from the web the URL Figure 5.1 User navigation site map R V College of Engineering 18
  19. 19. Mobile GPS Tracking : : must be entered in the browser. This is valid of course ifthe server is local. The main page asks for a Login and if the user is not yet register he/shemust register first. The user receives a user Id and will need it every time he/she enter inthe system.Once logged in, the navigation page allows the user to change its profile, add a new track,delete a track, and view its different tracks, logout the system. The different buttons are:  Profile Setup: allow the user to change its profile and password.  Add Track: allow the user to add a track. The Field coordinates and altitude is optional. once the track created, all the positions send to the server will be saved under this track Id.  Delete: Delete a selected track from a list. If the track is the current one, the previous track becomes the current one.  View Track: The user can view the list of track and select one from a list. Once the track selected, click Get List of points and then only the track can drawn on maps. Two options are available: 1. Draw on a Swiss topo Map 2. Draw the track using Google Earth application (which must be installed!)The manager has the same Profile setup and Logout as the standard user.The differences are:  Users: allow the manager to delete a user.  Tracks: show all active tracks in the system (all users) and can draw them with the View track of the standard user.  GPS points: The manager can modify a specific position by selecting a track then the particular point of this track.R V College of Engineering 19
  20. 20. Mobile GPS Tracking2. MidletAt that level of development, the midlets are available only with the Java Simulator.KtoolBar of the WTK must be launched. You must open the project Mobile Tracker and runit.The Mobile Application offers two menus which allow the user to: 1. Create a new track 2. Send a position to the serverThe option create atrack will send a request to server after the user provides its Id as shownin the Figure When a track has started, you begin to send your positions (GPS points). Theoption Start Position Tracking propose the same interface than the Start new Track butwhen the user Id as been sent, the tracking starts and every 5 seconds a new point is sentto server.5.2 Future enhancementHere is a list of possible extension for such project. 1. Server implementation  A Map Entity bean in order to choose the appropriate map according to the range of coordinate of the track.  A dynamic selection of coordinate system (Swiss Grid, WGS 84, etc.)  Definition of the Roles within the application.  Re-definition of the Position Entity bean vs simple records in the database.  Client interfaces.  Web pages to be re-looked. 2. Graphics  Dynamically change the view on a map (zoom in-out).  Interface with Google Earth real time! 3. Mobile communication  Finalize the GPS-Mobile Phone communication.  SMS communication.  Mobile graphic interface to follow another user.R V College of Engineering 20

×