Sie sind auf Seite 1von 76

GPS TRACKING TOOL

_______________

A Thesis Presented to the Faculty of San Diego State University

_______________

In Partial Fulfillment of the Requirements for the Degree Master of Science in Computer Science

_______________

by Hiral Ashokbhai Patel Spring 2012

iii

Copyright 2012 by Hiral Ashokbhai Patel All Rights Reserved

iv

ABSTRACT OF THE THESIS


GPS Tracking Tool by Hiral Ashokbhai Patel Master of Science in Computer Science San Diego State University, 2012 The Project Code is intended for readers who have some knowledge of Java, typically an introductory course. A familiar background in C# .NET should also be adequate but will require more self study apart from this work. However by the end of this document, any reader should be able to understand the basics of GPS and Device Technology. A Java compiler can be acquired free, as can various Java Integrated Development Environment (IDE).For this application to become generally used, the server portion needs to be hosted on a web server. Hopefully this will happen soon enough. The objective of this application is to locate from anywhere, anytime the exact position of the mobile device on the earth with respect to its latitude and longitude. The main requirements to implement this application are that the mobile device must have assisted GPS and internet connectivity. For the development of this application, the platform used is Eclipse framework. Eclipse is a multi-language software development environment comprising an IDE and an extensible plug-in system. It is written primarily in Java and can be used to develop applications in Java. This application will be developed using Android platform.

TABLE OF CONTENTS
PAGE ABSTRACT............................................................................................................................. iv LIST OF FIGURES ................................................................................................................ vii ACKNOWLEDGEMENTS ..................................................................................................... ix CHAPTER 1 2 3 4 INTRODUCTION .........................................................................................................1 HISTORY ......................................................................................................................2 BASIC POSITION DETERMINATION WITH GPS...................................................4 DEVICE PERSPECTIVE OF A GPS .........................................................................10 4.1 Basic Units .......................................................................................................10 4.2 Sports/Training Units .......................................................................................10 4.3 Portable Units...................................................................................................10 4.4 Car GPS Systems .............................................................................................11 4.5 Double DIN Systems .......................................................................................11 4.6 PDA Based Systems ........................................................................................11 4.7 Laptop Based Systems .....................................................................................12 4.8 Phones with GPS..............................................................................................12 4.9 Mobile Phones with GPS Capability ...............................................................12 4.10 GPS-Enabled Cell Phones..............................................................................13 4.11 Location-Based Services (LBS) .....................................................................13 4.11.1 Accutracking ........................................................................................ 14 4.11.2 Google Latitude ................................................................................... 14 4.11.3 MapQuest Find Me .............................................................................. 14 4.11.4 Sprints Mobile Locator ....................................................................... 14 4.11.5 Wherify Wireless ................................................................................. 14 4.12 Permissions and Privacy ................................................................................14 4.13 Tracking Application Persistence ...............................................................15 5 PROPOSED PROJECT AND ITS ADVANCEMENTS ............................................16

vi 6 7 SYSTEM REQUIREMENTS ......................................................................................18 SOFTWARE COMPONENT INSTALLATION AND IMPLEMENTATION..........19 7.1 Installing the Android SDK .............................................................................19 7.2 Android Eclipse Plug-In (ADT).......................................................................21 7.3 Updating the ADT Plug-In...............................................................................23 7.4 How to Use Eclipse to Develop Android Applications ...................................27 7.4.1 Creating a New Android Project ............................................................ 27 7.4.2 Creating a Launch Configuration for Eclipse ........................................ 28 7.5 Running and Debugging an Eclipse Application .............................................30 7.5.1 Developing Android Applications with Other IDEs and Tools ............. 31 7.5.2 Creating an Android Project .................................................................. 32 7.5.3 How to Build an Android Application ................................................... 33 7.5.4 How to Run an Android Application ..................................................... 34 7.5.5 How to Attach a Debugger to Your Application ................................... 34 7.5.6 How to Configure Your IDE to Attach to the Debugging Port ............. 35 7.5.7 Debugging Android ............................................................................... 35 7.5.8 Debug and Test Settings on the Device ................................................. 36 8 CLIENT-END SOFTWARE IMPLEMENTATION ..................................................38 8.1 Setting Up of IIS 7 Server ................................................................................38 8.2 Install IIS 7.......................................................................................................39 8.3 Installing Server ...............................................................................................40 8.3.1 How to Install Server ............................................................................. 42 8.3.2 How to Configure Management Service................................................ 50 9 CLIENT SIDE IMPLEMENTATION .........................................................................54 10 SERVER SIDE IMPLEMENTATION........................................................................61 11 CONCLUSION AND OBSTACLES ..........................................................................65 12 FUTURE WORK .........................................................................................................66 BIBLIOGRAPHY ....................................................................................................................67

vii

LIST OF FIGURES
PAGE Figure 3.1. Position determination with two satellites (in a 2-dimensional world). ..................6 Figure 3.2. 2D position determination with two satellites and clock error. ...............................7 Figure 3.3. 2D position determination with three satellites and corrected clock error. .............8 Figure 7.1. Android SDK 1.0. ..................................................................................................19 Figure 7.2. Start installing SDK. ..............................................................................................20 Figure 7.3. Environment variable creation. .............................................................................21 Figure 7.4. Software update. ....................................................................................................22 Figure 7.5. Additional plug-ins. ...............................................................................................23 Figure 7.6. Add website for plug-ins. ......................................................................................23 Figure 7.7. Install the plug-ins. ................................................................................................24 Figure 7.8. Continue installation of plug-ins. ..........................................................................24 Figure 7.9. Accept and continue the installation of plug-ins. ..................................................25 Figure 7.10. Continue installing plug-ins. ...............................................................................25 Figure 7.11. Restart after installing plug-ins. ..........................................................................26 Figure 7.12. Finish installation of plug-ins. .............................................................................26 Figure 7.13. Creating new project............................................................................................28 Figure 7.14. Selecting Android to create Android Project.......................................................29 Figure 7.15. Provide name and location of new Android Project. ...........................................30 Figure 7.16. Run configuration. ...............................................................................................31 Figure 7.17. Location for Launch. ...........................................................................................31 Figure 7.18. Output of Android Project. ..................................................................................32 Figure 8.1. Run as administrator. .............................................................................................39 Figure 8.2. Open control panel. ...............................................................................................40 Figure 8.3. Open program. .......................................................................................................41 Figure 8.4. Open on/off Windows features. .............................................................................41 Figure 8.5. Administrator permission. .....................................................................................42 Figure 8.6. Install IIS from Windows feature. .........................................................................42

viii Figure 8.7. Web management tools service. ............................................................................43 Figure 8.8. WWW services. .....................................................................................................43 Figure 8.9. Installing the change made on Windows services. ................................................44 Figure 8.10. IIS installation finished........................................................................................44 Figure 8.11. Open IIS on Internet Explorer. ............................................................................45 Figure 8.12. Turn on/off server. ...............................................................................................45 Figure 8.13. Computer properties. ...........................................................................................46 Figure 8.14. Service pack for Microsoft Windows editions. ...................................................46 Figure 8.15. Turn on/off Windows features.............................................................................47 Figure 8.16. Installing IIS 6 Manager. .....................................................................................47 Figure 8.17. Continue installing. .............................................................................................48 Figure 8.18. Agree the license to continue installation............................................................48 Figure 8.19. Location to install. ...............................................................................................49 Figure 8.20. Install all the settings. ..........................................................................................49 Figure 8.21. Finish the installation. .........................................................................................50 Figure 8.22. Opening IIS 6 Manager. ......................................................................................51 Figure 8.23. Management tool installation. .............................................................................51 Figure 8.24. Open management service. ..................................................................................52 Figure 8.25. Start the server. ....................................................................................................53 Figure 9.1. Homepage of the GPS status application. .............................................................54 Figure 9.2. Turn on wifi settings..............................................................................................56 Figure 9.3. Add unique tracking ID. ........................................................................................57 Figure 9.4. Choose from previously added tracking ID. .........................................................58 Figure 9.5. Start tracking system. ............................................................................................60 Figure 10.1. Homepage of GPS solution website. ...................................................................61 Figure 10.2. Providing wrong tracking ID. ..............................................................................62 Figure 10.3. Tracking map. ......................................................................................................63 Figure 10.4. Satellite version of map. ......................................................................................64 Figure 10.5. Exact time and date. ............................................................................................64

ix

ACKNOWLEDGEMENTS
Thank you, Prof. Nenad, Prof. Eckberg, and Prof. Richard, for giving eloquent and clear voice to the ideas so many of us feel but do not always know how to express. Thank you for being an example of the difference one person with deep convictions can make. Thank you for always telling us that we, too, could make that difference. And thank you for always pushing us to dream of what is possible, rather than settling for what is.

CHAPTER 1 INTRODUCTION
Global Positioning System (GPS) has become a term of vivid usage in peoples dayto-day lives, whether it is in the commercial arena, Security forces or even exploration basis. In recent years with the improvement of technologies we are in constant contact with Satellites orbiting in Space, which is the sole source of a GPS. GPS is a space-based global navigation satellite system (GNSS) that provides reliable location and time information in all weather and at all times and anywhere on or near the Earth, when and where there is an unobstructed line of sight to four or more GPS satellites. It is maintained by the United States government and is freely accessible by anyone with a GPS receiver [1]. The objective of this application is to make complete use of GPS technology and locate from anywhere, anytime the exact position of the mobile device on the earth with respect to its latitude and longitude. The main requirements to implement this application are that the mobile device must have assisted GPS and internet connectivity. This application will run in background on the mobile device when started and it will send the last known latitudes and longitudes to the server. By using this application we can project the current location of the mobile device, in a selected time frame we can even see the path of the mobile device followed This whole information we can see on a Google map as well as in form of longitude and latitude with tag id. Moving forward to Chapters 2 and 3 we will discuss about History of GPS and how we obtain the actual Position on earth using satellite. Chapter 4 describes the area where GPS is used in day to day life. Chapter 5 is about GPS tracking system project. Chapters 6, 7, 8 is mainly about installation and requirements to run this project on your mobile and computer. Chapter 9 and 10 shows the exact flow of the proposed project. Going forward in next chapter we will see the future enhancement.

CHAPTER 2 HISTORY
In the 1960s, the Global Positioning System emerged as a radical new way to provide precise navigation for U.S. armed forces across the globe. Early work at The Aerospace Corporation helped get the program off the ground. Many people are unaware of the fact that this revolutionary advance in navigational science was conceived, in part, through studies conducted at The Aerospace Corporation in the early 1960s. In addition, two of the men most responsible for its success have direct ties to Aerospace: Ivan Getting, the foremost initial advocate for GPS, was the corporations founding president, and Bradford Parkinson, who headed the first GPS Joint Program Office, is chair of The Aerospace Corporation board of trustees. During the first half of the 20th century, researchers at various organizations were separately developing the technologies that would eventually be used to create GPS. By 1960, much of this work had coalesced in a manner that would place Aerospace at the heart of GPS research [1]. Indeed, the development of satellite technology was a crucial precursor for GPS, and the systems key navigational concept was discovered as a result of the Sputnik launch on October 4, 1957. Sputnik was little more than an orbiting radio transmitter, but it captured the attention of scientists across the globe. Two scientists at the Johns Hopkins University Applied Physics Laboratory (APL), George Wieffenbach and William Guier, realized as they listened to Sputniks signal that they could determine its orbit from the Doppler frequency shift detected as it passed overhead. Their measurements were subsequently confirmed by findings from other tracking sites. From this observation, Frank T. McClure at APL reasoned that, conversely, if the orbit of a satellite were known, then Doppler-shift measurements could also be used to determine any ground position on Earth [1]. Only a few months after the formation of Aerospace in the summer of 1960, much of the knowledge base that was pivotal to the development of GPS was already taking shape. The principal mission of Aerospace was to aid the United States Air Force in applying the full resources of modern science and technology to the problem of achieving those

3 continuing advances in ballistic missiles and military space systems which are basic to national security. to that end, Aerospace initiated a series of studies in areas where the application of space systems might prove most valuable. One of the earliest of these studies dealt with navigation. The ultimate implementation of GPS would not have been possible without concurrent advances in other fields. Over the next 15 years, GPS development proceeded at a rapid pace. Much of the work in Phase I (concept validation) consisted of testing the many potential types of user equipment. Many of these experiments occurred at the Yuma Proving Ground in Arizona using ground-based transmitters in lieu of orbiting satellites. Extensive testing was also done with the position determination of a wide variety of vehicles, aircraft, and troops with GPS receivers. Between 1977 and 1979, more than 700 tests were conducted, and all of them confirmed the systems extraordinary accuracy. The Department of Defense (DOD) approved Phase II of the program in 1979 which was intended to provide global two-dimensional coverage for a select group of users. In 1985, Phase III (the production and development phase) began, and the first operational GPS Block II satellite was launched in February 1989. GPS was unexpectedly able to validate its worth following the Iraqi invasion of Kuwait in 1990, when the system provided invaluable navigational information to airborne, ground, and naval units of the allied forces. During and after the Persian Gulf War, the medias coverage of GPS helped stimulate a surge of civilian interest. By the time GPS was declared fully operational in 1995, its future success was virtually guaranteed.

CHAPTER 3 BASIC POSITION DETERMINATION WITH GPS


A GPS navigation device is any device that receives Global Positioning System (GPS) signals for the purpose of determining the devices current location on Earth. GPS devices provide latitude and longitude information, and some may also calculate altitude, although this is not considered sufficiently accurate or continuously available enough (due to the possibility of signal blockage and other factors) to rely on exclusively to pilot aircraft. GPS devices are used in military, aviation, marine and consumer product applications. GPS devices may also have additional capabilities such as: containing maps, which may be displayed in human readable format via text or in a graphical format providing suggested directions to a human in charge of a vehicle or vessel via text or speech providing directions directly to an autonomous vehicle such as a robotic probe providing information on traffic conditions (either via historical or real time data) and suggesting alternative directions providing information on nearby amenities such as restaurants, fueling stations, etc. In other words, all GPS devices can answer the question Where am I? Converged devices, including GPS Phones and GPS cameras, in which GPS is a feature rather than the main purpose of the device. Those devices may be assisted GPS or standalone (not network dependent) or both. In a considerably simplified approach, each satellite is sending out signals with the following content: I am satellite X, my position is Y and this information was sent at time Z. In addition to its own position, each satellite sends data about the position of other satellites. These orbit data (ephemeris und almanac data) are stored by the GPS receiver for later calculations. For the determination of its position on earth, the GPS receiver compares the time when the signal was sent by the satellite with the time the signal was received. From this time difference the distance between receiver and satellite can be calculated. If data from other

5 satellites are taken into account, the present position can be calculated by trilateration (meaning the determination of a distance from three points). This means that at least three satellites are required to determine the position of the GPS receiver on the earth surface. The calculation of a position from three satellite signals is called 2D-position fix (2-dimensional position determination). It is only two dimensional because the receiver has to assume that it is located on the earth surface (on a plane two-dimensional surface). By means of four or more satellites, an absolute position in a three dimensional space can be determined. A 3Dposition fix also gives the height above the earth surface as a result. Simplified, the position determination by means of a GPS works on the sample principle as the distance of thunderstorms can be judged: the time is measured between lightning and the following thunder. The speed of light is so high that the delay between the time where the flash hits the ground and the time the observer sees the flash can be neglected. The speed of sound in the earths atmosphere is approximately 340 m/s. This means that for example a difference of 3 seconds between lightning and thunder corresponds to approximately 1 km distance to the thunderstorm. However, this procedure is not yet a determination of a position, but only a determination of a distance. If different people on fixed positions would determine the time span between lightning and thunder, this would allow the determination of the position where the flash hit the ground! In Figure 3.1 an explanation is given, how the position determination by GPS works. For simplification, in the first step we assume that the earth is a two-dimensional disk. This allows us to do some understandable sketches for illustration. The principle can then be transferred to the model of a three-dimensional globe. In the example on the left in Figure 3.1, the time needed by a signal to travel from the first of two satellites to the receiver was determined to be 4 s. (In reality this value is far too high. As the signals travel with the speed of light (299,792,458,0 m/s), the actual time span for signals from the satellite to the receiver lies in the range of 0.07 s). Based on this information, we can state that the receiver is positioned somewhere on a circle with a radius of 4 s around the first satellite (left circle). If we perform the same procedure with a second satellite (right circle), we get two points of intersection. On one of the two points the receiver must be situated. Now we have used two satellites. But the process is called

Figure 3.1. Position determination with two satellites (in a 2-dimensional world). trilateration, not dilateration so dont we need a third satellite? We may use a third satellite but we could also assume that the receiver is located somewhere close to the earths surface and not deep in space, so we can neglect point B and know that the receiver must be found on point A. The area in Figure 3.1 which shaded grey is the region in which GPS signals are supposed to be realistic. Positions outside this area are discarded, so is point B. This assumption replaces the third satellite which would in theory be required for the process of trilateration. In this example an unequivocal position is obtained from only two satellites. So we just need a third satellite for a third dimension and thats it? Well, in principle yes. But The problem lies in the determination of the exact runtime of signals. As explained above, satellites impose a sort of time stamp on each transmitted data package. We know that all clocks of satellites are absolutely precise (they are atomic clocks after all) but the problem is the clock in our GPS receiver. Atomic clocks being too expensive, our GPS receivers are based on conventional quartz clocks which are comparatively inaccurate. What does this mean in practice? Lets stick to our example and suppose the clock in our receiver is 0.5 seconds early compared to the clock in the satellite (see Figure 3.2). The runtime of the signal seems to be

Figure 3.2. 2D position determination with two satellites and clock error. 0.5 s longer than it actually is. This leads to the assumption that we are on point B instead of point A. The circles that intersect in point B are called pseudo-ranges. They are called pseudo as long as no correction of the synchronization errors (bias) of the clocks has been performed. Depending on the accuracy of the clock in the GPS receiver, the determined position will be more or less wrong. For the practice of GPS based navigation this would mean that no determined position can ever be of any use, as the runtimes of the signals are so short, that any clock error has an overwhelming influence on the result. A clock error of 1/100 second, which is difficult to imagine but quite common from car races or skiing races, would in GPS navigation lead to a mistake in the position of about 3000 km. to achieve an accuracy of 10 m of the position, the runtime of the signal must be precise to 0.00000003 seconds. As atomic clocks are no option in GPS receivers, the problem is solved in another and quite elegant way as shown in Figure 3.3. If a third satellite is taken into account for the calculation of the position, another intersection point is obtained: in case that all clocks are absolutely precise, point A would be obtained, corresponding to the actual position of the receiver. In case of the receiver clock being 0.5 s early, the three intersection points B are obtained. In this case the clock error stands out immediately. If now the time of the receiver clock is shifted until the three

Figure 3.3. 2D position determination with three satellites and corrected clock error. intersection points B merge to A, the clock error is corrected and the receiver clock is synchronized with the atomic clocks in the satellites. The GPS receiver can now be regarded as an atomic clock itself. The distances to the satellites, formerly regarded as pseudo-ranges, now correspond to the actual distances and the determined position is accurate. In case of the example a two dimensional disc world we therefore need three satellites for an unequivocal determination of our position. In the real world which has one additional dimension, we would need a fourth satellite. Well, then why is it always said that three satellites are enough? In practice you get a two-dimensional position determination (2D-fix) with three satellites. The position is bound to be located on the earths surface. The fourth satellite is the geo-center; the distance to the fourth satellite corresponds to 6360 km (the radius of the globe). Therewith the fourth

9 satellite necessary for the calculation is given, but the calculation is restricted to locations on the earth surface. However the earth is not a perfect sphere. The surface of the earth in this case means the earth geoid, corresponding to sea level. If the receiver is located on a mountain, the determined position again is afflicted with an inaccuracy, as the runtime of the satellite signals is wrong. By constantly recalculating its position, the GPS receiver can additionally determine the speed and direction of a movement (referred to as ground speed and ground track). Another possibility of determining the speed is by using the Dopplers effect which occurs due to the movement of the receiver while receiving the signals. The principle is the same as for a moving siren on a police car: the tune is higher when the car moves towards the listener and it is lower when the car moves away [2]. Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language. XML is tagged based language through which we can design the graphics user interface in android device. XML tags are used to define different kind of elements to display on the screen. Tags also have various attributes within the element to set different properties of the element like width height of the textbox. There are many layouts defined in XML language for android user interface. Like linear layout and scroll layout, etc. We make a ASP application on remote server side to fetch the data sent from mobile device.

10

CHAPTER 4 DEVICE PERSPECTIVE OF A GPS 4.1 BASIC UNITS


The basic units are just the plain old receiver with a minimal set of features. A basic unit can be bought for around 100 dollars. These simple devices have the basic functionality of reporting the location in terms of latitude and longitude. They may also have a base map (a very high level map that contains major highways and few Points of Interests) of a region. Basic units have limited processor and memory capacity. These units are ideal for a person with low budget whom would like to use GPS for basic navigation, educational activities and fun.

4.2 SPORTS/TRAINING UNITS


Sports enthusiast or training athletes will find wearable units very useful. These units can be worn in the wrist like watches. They have many integrated features such as heart rate monitors, lap/racing timers, calorie count monitors, and virtual partner software that allows you to set your workout target and objectives. Many wearable units come with associated PC software that can be used to plan and analyze your workout information.

4.3 PORTABLE UNITS


Portable GPS units can be used in a car or by a pedestrian. Lower end portable models may have small screen sizes and little memory capacity. Due to their limited memory capacity they can only store maps of a specific region. It may not be possible to store the whole map of a country like the United States. The maps on lower end portable units are usually stored in SD Cards, CD ROMs or in the systems built memory.

11 Higher end potable units have larger screens and large memory storage capacity. They typically use a hard drive or DVD disk to store the map software. Most of the high end portable units have other cool integrated features such a MP3 playback capability, XM satellite radio services, picture viewers, audio books and blue tooth integration.

4.4 CAR GPS SYSTEMS


Car GPS systems come in two flavors: 1. Portable Add-On Units -- Many people now a days use portable units in automobiles. Most of the portable units come with accessories that allow the user to use them in a vehicle. These accessories include suction cup to attach the unit to the windshield, car power adapter, battery charges, external antennas and, etc. 2. In-Dash Units -- These are top of the range systems that provide a wide selection of features that nicely and tidily integrate with your car electronics. In-dash units are more expensive. They have to be permanently mounted in the car. This means you cannot move unit if you happen to take another vehicle for your next road trip. In-dash units give a professional look and feel. They have no clutter (like power adapter wires, suction cup, etc.). One of the main disadvantages of in-dash units is that they are permanently fixed to the car and might be prone to theft.

4.5 DOUBLE DIN SYSTEMS


A Double DIN system occupies two bays in your car dash. Since they are fitted inside the bay, they do not project out and are less noticeable from the outside. This might prevent the system from being stolen when the car is unattended.

4.6 PDA BASED SYSTEMS


A PDA which stands for Personal Data Assistant is a hand held device that has trimmed down features of a Personal Computer. A PDA that uses the Palm OS software is usually known as a Palm Computer, while PDA the uses the Microsoft mobile operating system is called a Pocket PC. Buying a PDA based GPS system has the added advantages of using the unit as a handled computer for general productivity and entertainment as well a using it as a GPS navigation tool. If you already own a PDA, you can buy a GPS add on module, thus saving your initial investment in your PDA.

12

4.7 LAPTOP BASED SYSTEMS


Laptop based GPS systems are relatively cheap compared with other standalone GPS units. In these systems the map and software are loaded into the laptop hard drive. The only accessory that you need is a simple receiver that can connect to your computer (via USB or serial ports). The mapping software loaded into the computer will be able to perform the navigation. Most laptop systems come bundled with a GPS receiver. Compared with other GPS systems, a laptop system is bulkier. But the advantage is that you are leveraging the laptop CPU power, memory and hard disk capacity for your navigation needs [3].

4.8 PHONES WITH GPS


Many of todays phones offer a GPS feature for an additional service charge. Thats a convenient feature, since most people these days tote a phone no matter where they go. All phones also come with a government mandated tracking capability that will help locate you in case of an emergency. GSM mobile phone tracking system via the GPS-TRACK satellite network. There are lots of forums which helps you to track your phone anywhere in the world with using a GPS satellite system [3].

4.9 MOBILE PHONES WITH GPS CAPABILITY


Due in part to regulations encouraging mobile phone tracking, including E911, the majority of GPS receivers are built into mobile telephones, with varying degrees of coverage and user accessibility. Commercial navigation software is available for most 21st century smart-phones as well as some Java-enabled phones that allows them to use an internal or external GPS receiver (in the latter case, connecting via serial or Bluetooth). Some phones with GPS capability work by assisted GPS (A-GPS) only, [dubious discuss] and do not function when out of range of their carriers cell towers. Others can navigate worldwide with satellite GPS signals as a dedicated portable GPS receiver does, upgrading their operation to A-GPS mode when in range. Still others have a hybrid positioning system that can use other signals when GPS signals are inadequate.

13 More solutions also exist for smart-phones with inbuilt GPS capabilities. Some such phones can use tethering to double as a wireless modem for a laptop, while allowing GPSnavigation/localization as well [1]. One such example is marketed by Verizon Wireless in the United States, and is called VZ Navigator. The system uses GPS One technology to determine the location, and then uses the mobile phones data connection to download maps and calculate navigational routes. Other products including iPhone are used to provide similar services. Nokia gives Ovi Maps free on its smart-phones and maps can be preloaded. According to market research from the independent analyst firm Berg Insight, the sales of GPS-enabled GSM/WCDMA handsets was 150 million units in 2009 [4], while only 40 million separate GPS receivers were sold. GPS navigation applications for mobile phones include Waze and Google Maps Navigation. Google Maps Navigation included with Android and iPhone means most smartphone users only need their phone to have a PNA [1].

4.10 GPS-ENABLED CELL PHONES


Motorola and Blackberry were the first GPS-enabled phones to proliferate the United States. Initially, Motorola iDEN phones were commonly used for employee tracking on the business-oriented Nextel network. Then GPS enabled Blackberry phones, once used almost exclusively by corporate and government VIPs, began to penetrate the consumer market stimulated by the demand for phones with advanced messaging capability. Next came specialty devices produced under the names of Disney Mobile and Wherify Wireless targeting use by children and elderly. Today, a variety of GPS-enabled phones and tracking services are available, as you can see from the ads on this page [5].

4.11 LOCATION-BASED SERVICES (LBS)


LBS providers have agreements with the wireless network carriers to receive data from a cell phone and make it accessible to you via an Internet web site or call center. Most LBS providers will be able to tell you the approximate last known location, but beyond that, services offered will vary, depending on the type of cell phone and the capabilities of the service provider [5].

14

4.11.1 Accutracking
Accutracking is a full-featured low-cost LBS provider using Motorola, Boost Mobile and Blackberry phones operating on the Sprint/Nextel network [5].

4.11.2 Google Latitude


Nextels Mobile Locator is a service used in conjunction with Nextel calling plans with Nextel GPS-enabled phones. Mobile locator allows you to view and monitor your peoples location in real-time, either singly or within a group, on a zoomable, online map. The web interface allows you to view location history, based on your most recent queries [5].

4.11.3 MapQuest Find Me


Using certain models of Nextel phones, you can view a group of your peoples locations on one map, or you can view a track of an individuals location history. Powered by uLocate, MapQuest provides a web interface for mobile devices like PDAs as well cell phones. Other features include in-depth location history detail [5].

4.11.4 Sprints Mobile Locator


Nextels Mobile Locator is a service used in conjunction with Nextel calling plans with Nextel GPS-enabled phones. Mobile locator allows you to view and monitor your peoples location in real-time, either singly or within a group, on a zoomable, online map. The web interface allows you to view location history, based on your most recent queries [5].

4.11.5 Wherify Wireless


Developers of the Wherifone designed specifically for children and seniors. The Wherifone is supported solely by Wherifys Global Location Service Center [5].

4.12 PERMISSIONS AND PRIVACY


Simply put, tracking someone without their knowledge can get you in trouble. Typically, the subscriber must give permission and the cell phone must be enabled for tracking [5].

15

4.13 TRACKING APPLICATION PERSISTENCE


Again, the tracking application on a cell phone typically must be enabled by the user. Depending on your equipment, the application may persist - remaining enabled when the phone is turned on after having been turned off. This feature is particularly handy if you do not want to instruct the person using the phone how to turn tracking on and off [5].

16

CHAPTER 5 PROPOSED PROJECT AND ITS ADVANCEMENTS


In the proposed project the capabilities of GPS system would be pushed to its utmost limitations, keeping in mind the usability aspect for the end user to be one of minimal effort. The ideal proposed application would not only aide in navigation, which is expected out of a regular nav-device, but also would keep track of the route being followed by the system with utmost preciseness of latitude and longitudes. Thus rendering the device helpful under varied amount of scenarios, the topmost being the route being followed which could be reengineered to find the exact starting point of the system in-case the device gets stolen. The project is basically sub-divided into two main phases. Phase-I involves installing the end software in an Android based device, and complementing it would be comprising of Phase-II, the Website-application, which would be utilizing the aspects from Phase-I to provide various other estimations and informations being depicted in a user-friendly GUI based application. Phase-I deals with the technological references to java and android based systems. Eclipse is the editor being implemented to fulfill this requirement, which would in-turn generate a .apk file that has to be implemented in any android based Cellular device. After a successful installation, users could easily walk-through the application and use its functionalities to the fullest. To maintain the authenticity of the proposed project, a unique identity would be generated so that each route and system can be considered as a separate entity. Once the application gets stored into the local memory of the device, one could start-up with the exploration. The application even would allow creating separate unique Ids for the same system, just in-case if there are numerous users to the same system. Under such a situation the device would keep track of its route in-regards to each unique key i.e. in-regards to each separate user.

17 Once the Id has-been selected the tracking of the location in accordance to latitudes and longitudes starts up by a simple press of Green start button in the Cellular device which begins tracking. And accordingly the system would start rendering the detailed locations data into a database at regular intervals which are pre-set. A server database repository is being used to hold this data, thus providing an accurate tracking methodology if needed for historical trips which the device has followed. Stopping of the application would be initiated using the Red stop button. Also the device provides feature to drop a Unique Id, in-case if needed, by just a click of delete button present in most of the commercial cell-phones. Now we comet Phase II, where-in an interactive website would be built which would be the core of the project dealing with the server database. The web application would fetch data from the server database and provide an entire trajectory of the path followed by the device in accordance to the unique-id provided. And since longitude and latitude of the phone is stored along with time span so we are able to trace the phone based on time span. Looking just at the time-span ranges, we could judge the exact location of the device at a particular time, or even fore-tell the entire trajectory being followed by the device for a given unique-id.

18

CHAPTER 6 SYSTEM REQUIREMENTS


In order to first use the Android SDK code and tools for development you will of course need a suitable environment. Currently the operating systems supported are: Windows XP or Vista Mac OS X 10.4.8 or later (x86 only) Linux (tested on Linux Ubuntu Dapper Drake)

You will also need to install a suitable development environment such as: Eclipse Eclipse 3.2, 3.3 (Europa) Android Development Tools Plug-In(optional)

Other development environments or IDEs JDK 5 or JDK 6 (JRE alone is not sufficient) Not compatible with Gnu Compiler for Java (gcj) Apache Ant 1.6.5 or later for Linux and Mac, 1.7 or later for Windows

19

CHAPTER 7 SOFTWARE COMPONENT INSTALLATION AND IMPLEMENTATION


The following content has been vividly gathered from [6]: to convey the actual functionality and technicalities regarding the phases of installation and implementation of the required software related to our project.

7.1 INSTALLING THE ANDROID SDK


First you will need to download the Android SDK pack .zip archive, and once downloaded, find a suitable installation location on your machine(see Figure 7.1). And extract the zipped files as shown in Figure 7.2.

Figure 7.1. Android SDK 1.0. Alternatively you can add /tools to your root path which will prevent the need to specify the full path to the tools directory along with enabling you to run Android Debug Bridge (adb) along with other command line tools.

20

Figure 7.2. Start installing SDK. To add/tools using Linux: 1. Edit the ~/.bash_profile or ~/.bashrc files looking for a line that sets the PATH variable. 2. Add the full path location to your $SDK_ROOT/tools location for the PATH variable. 3. If no PATH line exists you can add the line by typing the following: Export PATH=${PATH}:<path to your $SDK_ROOT/tools> To add/tools using Mac OS X: In the home directory locate the .bash_profile and locating the PATH variable add the location to your $SDK_ROOT/tools folder. To add/tools using Windows XP/Vista: 1. Right click on the My Computer icon and select the properties tab. 2. Select the Advanced tab and click the Environment Variables button. 3. In the new dialog box double-click on Path (located under System Variables) and type in the full path location to the tools directory. See Figure 7.3.

21

Figure 7.3. Environment variable creation.

7.2 ANDROID ECLIPSE PLUG-IN (ADT)


The Android SDK also requires a suitable development environment to work in, heres the installation guides for each of the supported environments. If you choose to use the Eclipse IDE as your Android development environment you will have the opportunity to install and run a plug-in called Android Development Tools. ADT comes with a variety of powerful tools and extensions that will make creating, running and debugging your Android applications much easier and faster. In order to download and install ADT you will first need to configure an Eclipse remote update, this can achieved via the following steps: 1. Start Eclipse, then select Help > Software Updates > Find and Install.(see Figure 7.4).

22

Figure 7.4. Software update. 2. Choose Available Software tab, then click on the button Add Site...(see Figure 7.5). 3. In the resulting dialog box, enter a name for the remote site (e.g. Android Plug-In) and enter this as its URL: https://dl-ssl.google.com/android/eclipse/. 4. Press OK (see Figure 7.6). 5. You should now see the new site added to the search list (and checked). 6. Press Install (see Figure 7.7). 7. In the subsequent Search Results dialog box, select the checkbox for Android Plug-In >Eclipse Integration > Android Development Tools and press Next. 8. Read the license agreement and then select Accept terms of the license agreement, if appropriate. 9. Press Next (see Figure 7.8). 10. Press Finish (see Figure 7.9). 11. The ADT Plug-In is not signed; you can accept the installation anyway by pressing Install All (see Figure 7.10). 12. Restart Eclipse (see Figure 7.11). 13. After restart, update your Eclipse preferences to point to the SDK root directory ($SDK_ROOT): Select Window > Preferences to open the Preferences panel. (Mac OS X: Eclipse >Preferences) Select Android from the left panel.

23

Figure 7.5. Additional plug-ins.

Figure 7.6. Add website for plug-ins. For the SDK Location in the main panel, press Browse... and find the SDK root directory.

14. Press Apply, then OK (see Figure 7.12).

7.3 UPDATING THE ADT PLUG-IN


To update the ADT Plug-In to the latest version, follow these steps: 1. Select Help > Software Updates > Find and Install. 2. Select Search for updates of the currently installed features and press Finish. 3. If any update for ADT is available, select and install. Alternatively: 1. Select Help > Software Updates > Manage Configuration. 2. Navigate down the tree and select Android Development Tools <version> 3. Select Scan for Updates under Available Tasks.

24

Figure 7.7. Install the plug-ins.

Figure 7.8. Continue installation of plug-ins.

25

Figure 7.9. Accept and continue the installation of plug-ins.

Figure 7.10. Continue installing plug-ins.

26

Figure 7.11. Restart after installing plug-ins.

Figure 7.12. Finish installation of plug-ins.

27

7.4 HOW TO USE ECLIPSE TO DEVELOP ANDROID APPLICATIONS


In order to begin development on your Android applications you will first need to create a new Android project and then configure a launch configuration. Once completed you will have the capability to write, run and debug your Android creations. The following sections below will provide you with the necessary instructions to get you up and running with Android provided you have installed the ADT Plug-In(as previously mentioned) in your Eclipse environment.

7.4.1 Creating a New Android Project


The Android Development Tools Plug-Ins kindly provides a Wizard for setting up new Projects which will allow us to create new Eclipse projects relatively quickly for either new or existing code. Select File > New > Project 1. Select Android > Android Project, and press Next 2. Select the contents for the project:(see Figures 7.13-7.15). Select Create new project in workspace to start a project for new code. Enter the project name, the base package name, the name of a single Activity class to create as a stub .java file, and a name to use for your application. Select Create project from existing source to start a project from existing code. Use this option if you want to build and run any of the sample applications included with the SDK. The sample applications are located in the samples/ directory in the SDK. Browse to the directory containing the existing source code and click OK. If the directory contains a valid Android manifest file, the ADT Plug-In fills in the package, activity, and application names for you.

3. Press Finish. Once completed the ADT Plug-In will go ahead and create the following files and folders as appropriate for the type of project selected: src/ A folder that includes your stub .java Activity file. res/ A folder for your resources. AndroidManifest.xml The manifest for your project.

28

Figure 7.13. Creating new project.

7.4.2 Creating a Launch Configuration for Eclipse


In order to be able to run and debug your own Eclipse applications you must first create a launch configuration. Simply, a launch config is used to specify which project to launch, which activity to start and the specific emulation options to use. To create a launch configuration for the application, please see the following steps: 1. Select Run > Open Run Dialog or Run > Open Debug Dialog as appropriate (see Figure 7.16).

29

Figure 7.14. Selecting Android to create Android Project. 2. In the project type list on the left, right-click Android Application and select New. 3. Enter a name for your configuration. 4. On the Android tab, browse for the project and Activity to start (see Figure 7.17). 5. On the Emulator tab, set the desired screen and network properties, as well as any other emulator startup options. 6. You can set additional options on the Common tab as desired. 7. Press Apply to save the launch configuration, or press Run or Debug (as appropriate) (see Figure 7.18).

30

Figure 7.15. Provide name and location of new Android Project.

7.5 RUNNING AND DEBUGGING AN ECLIPSE APPLICATION


Once both steps 1 and 2 have been completed and your project and launch configs are up and running you will now be able to run or debug your application. From the Eclipse main menu, select Run > Run or Run > Debug as appropriate. This command will run or debug the most recently selected application. To set or change the active launch configuration, use the Run configuration manager, which you can access through Run > Open Run Dialog or Run > Open Debug Dialog. Running or debugging the application will trigger the following actions: Starts the emulator, if it is not already running. Compile the project, if there have been changes since the last build, and installs the application on the emulator.

31

Figure 7.16. Run configuration.

Figure 7.17. Location for Launch. Run starts the application. Debug starts the application in Wait for debugger mode, then opens the Debug perspective and attaches the Eclipse Java debugger to the application.

7.5.1 Developing Android Applications with Other IDEs and Tools


Although it is recommended you use Eclipse with the Android Plug-In to develop your applications, the SDK also provides tools which will enable you to develop with other IDEs including intelliJ (alternatively you could just use Eclipse without the Plug-In).

32

Figure 7.18. Output of Android Project.

7.5.2 Creating an Android Project


Bundled with the Android SDK is a program called activityCreator. activityCreator will generate a number of stub files for your chosen project alongside a build file. This can be used to either create an Android project for new code or from existing code. For Linux and Mac users the Android SDK provides a Python script called activityCreator.py, with Windows users receiving a batch script called activityCreator.bat. The program is used in the same way regardless of operating system. In order to run activityCreator and create an Android project, follow these steps: 1. In the command line, change to the tools/ directory of the SDK and create a new directory for your project files. If you are creating a project from existing code, change to the root folder of your application instead. 2. Run activityCreator. In the command, you must specify a fully-qualified class name as an argument. If you are creating a project for new code, the class represents the name of a stub class that the script will create. If you are creating a project from existing code, you must specify the name of one Activity class in the package. Command options for the script include:

33 out <folder> which sets the output directory. By default, the output directory is the current directory. If you created a new directory for your project files, use this option to point to it. ide intellij, which generates IntelliJ IDEA project files in the newly created project Heres an example: /android_linux_sdk/tools$ ./activityCreator.py out myprojectour.package.name.ActivityName package:your.package.name out_dir:myproject activity_name: ActivityName ~/android_linux_sdk/tools$ The activityCreator script generates the following files and directories (but will not overwrite existing ones): AndroidManifest.xml The application manifest file, synced to the specified Activity class for the project. build.xml An Ant file that you can use to build/package the application. src/your/package/name/ActivityName.java The Activity class you specified on input. your_activity.iml, your_activity.ipr, your_activity.iws [only with the -ide intelliJ flag] intelliJ project files. res/ A directory to hold resources. src/ The source directory. bin/ The output directory for the build script. Once complete you will now be able to move your folder wherever you choose for development but youll need to bear in mind that you will need to use the adb program in the tools folder in order to send the files to the emulator.

7.5.3 How to Build an Android Application


Heres how to use the Ant build.xml file generated by activityCreator to build your application. 1. If you dont have it, you can obtain Ant from the Apache Ant home page. Install it and make sure it is on your executable path. 2. Before calling Ant, you need to declare the JAVA_HOME environment variable to specify the path to where the JDK is installed. Note: When installing JDK on

34 Windows, the default is to install in the Program Files directory. This location will cause ant to fail, because of the space. to fix the problem, you can specify the JAVA_HOME variable like this: set JAVA_HOME=c:\Prora~1\Java\. The easiest solution, however, is to install JDK in a non-space directory, for example: c:\java\jdk1.6.0_02. 3. If you have not done so already, follow the instructions for Creating a New Project above to set up the project. 4. You can now run the Ant build file by simply typing ant in the same folder as the build.xml file for your project. Each time you change a source file or resource, you should run ant again and it will package up the latest version of the application for you to deploy.

7.5.4 How to Run an Android Application


In order to run a compiled application you will first need to upload the .apk file to the /data/app/ directory in the emulator using the adb tool: 1. Start the emulator (run $SDK_HOME/tools/emulator from the command line) 2. On the emulator, navigate to the home screen (it is best not to have that application running when you reinstall it on the emulator; press the Home key to navigate away from that application). 3. Run adb install myproject/bin/<appname>.apk to upload the executable. So, for example, to install the Lunar Lander sample, navigate in the command line to $SDK_ROOT/sample/LunarLander and type ../../tools/adb install bin/LunarLander.apk 4. In the emulator, open the list of available applications, and scroll down to select and start your application. Please Note: When installing an activity for the first time you may need to restart the emulator engine in order for the activity to show up in the application launcher or before any other application can call. This is usually down to the fact that the package manager normally only examines manifests completely on emulator start-up.

7.5.5 How to Attach a Debugger to Your Application


The following section details how to display debug information directly onto the screen (for example CPU usage). It also shows you how to hook up your IDE to debug running applications on the emulator. The Eclipse Plug-In automatically attaches a debugger but you can configure other IDEs to wait on a debugging port by doing the following:

35 Start the Dalvik Debug Monitor Server (DDMS) tool, which acts as a port forwarding service between your IDE and the emulator. 1. Set optional debugging configurations on your emulator, such as blocking application startup for an activity until a debugger is attached. Note that many of these debugging options can be used without DDMS, such as displaying CPU usage or screen refresh rate on the emulator. 2. Configure your IDE to attach to port 8700 for debugging. Weve included information higher up on how to set up Eclipse to debug your project.

7.5.6 How to Configure Your IDE to Attach to the Debugging Port


DDMS will automatically assign a specific debugging port for every virtual machine that it detects on the emulator. You must either attach your IDE to that port, or use a default port 8700 to connect to whatever application is currently selected on the list of discovered virtual machines. Ideally your IDE will attach to the application running on the emulator, showing its threads and allowing you to suspend them, inspect them, or set breakpoints. If you choose to Wait for debugger in the Development settings panel, this will cause the application to run when Eclipse connects therefore you will need to set any breakpoints you want before connecting. If you change the application being debugged or the Wait for debugger then the system will kill the selected currently running application. This can be handy if your application is in a bad state, you can simply go to the settings and toggle the checkbox to kill it.

7.5.7 Debugging Android


Google Android has a fairly extensive set of tools to help you debug your programs: DDMS A graphical program that supports port forwarding (so you can set up breakpoints in your code in your IDE), screen captures on the emulator, thread and stack information, and many other features. You can also run logcat to retrieve your Log messages. See the linked topic for more information. logcat Dumps a log of system messages. The messages include a stack trace when the emulator throws an error, as well as Log messages. to run logcat, see the linked topic. I/MemoryDealer( 763): MemoryDealer (this=054bda0): Creating 2621440 bytes heap at 0438db000

36 I/Logger( 1858): getView() requesting item number 0 I/Logger( 1858): getView() requesting item number 1 I/Logger( 1858): getView() requesting item number 2 D/ActivityManager(763):Stopping:historyRecord{409dbb20com.google.android. home.AllApps} Android Log- A logging class to print out messages to a log file on the emulator. You can read messages in real time if you run logcat on DDMS (covered next). Add a few logging method calls to your code. To use the Log class, you just call Log.v() (verbose), Log.d() (debug), Log.i() (information), Log.w() (warning) or Log.e (error) depending on the importance you wish to assign the log message. Log.i(MyActivity, MyClass.getView() Requesting item number + position) You can use logcat to read these messages Traceview Android can save a log of method calls and times to a logging file that you can view in a graphical reader called Traceview. See the linked topic for more information. Eclipse Plug-In The Eclipse Android Plug-In incorporates a number of these tools (ADB, DDMS, logcat output, and other functionality). See the linked topic for more information. Debug and Test Device Settings Android exposes several settings that expose useful information such as CPU usage and frame rate.

7.5.8 Debug and Test Settings on the Device


Android enables you to set a number of options that will make it far easier to test and debug your applications. To get to the development settings page on the emulator simply go to Dev Tools >Development Settings. This will in turn open up the development settings page with the following options (among others): Debug app Selects the application that will be debugged. You do not need to set this to attach a debugger, but setting this value has two effects: It will prevent Android from throwing an error if you pause on a breakpoint for a long time while debugging.

37 It will enable you to select the Wait for Debugger option to pause application startup until your debugger attaches (described next). Wait for debugger Blocks the selected application from loading until a debugger attaches. This way you can set a breakpoint in onCreate(), which is important to debug the startup process of an Activity. When you change this option, any currently running instances of the selected application will be killed. In order to check this box, you must have selected a debug application as described in the previous option. You can do the same thing by adding wait ForDebugger() to your code. Immediately destroy activities Tells the system to destroy an activity as soon as it is stopped (as if Android had to reclaim memory). This is very useful for testing the on Freeze(Bundle) / onCreate(android.os.Bundle) code path, which would otherwise be difficult to force. Choosing this option will probably reveal a number of problems in your application due to not saving state. Show screen updates Flashes a momentary pink rectangle on any screen sections that are being redrawn. This is very useful for discovering unnecessary screen drawing. Show CPU usage Displays CPU meters at the top of the screen, showing how much the CPU is being used. The top red bar shows overall CPU usage, and the green bar underneath it shows the CPU time spent in compositing the screen. Note: You cannot turn this feature off once it is on, without restarting the emulator. Show screen FPS Displays the current frame rate. Mostly useful for games to see the overall frame rate they are achieving. Note: You cannot turn this feature off once it is on without restarting the emulator. Show background Displays a background pattern when no activity screens are visible. This typically does not happen, but can happen during debugging. [6] http://www.talkandroid.com/guides/developer/android-sdk-installguide/#.T0lQsfEgdm0

38

CHAPTER 8 CLIENT-END SOFTWARE IMPLEMENTATION


The following content have been highly inspired from [7] and [8] to distinctly emphasize the implementation of the required software over at client-end. Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. For our project purpose, we can make use of versions Microsoft Visual Studio 2008 and higher. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight. One of the key components of integrating Visual studio with our project is configuration of Internet Information Services 7 better known as IIS 7. IIS 7 is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows.

8.1 SETTING UP OF IIS 7 SERVER


Ensure that you have installed one of the editions of Windows Vista or Windows 7 on which IIS 7 is supported before you proceed. Not all IIS features are supported on all editions of Windows Vista and Windows 7. Home Basic and Starter editions include only limited basic features of IIS. Also be sure that you have administrative user rights on the computer. By default, you do not have administrative user rights if you are logged on as a user other than the built-in administrator, even if you were added to the local Administrators group on the computer (this is a new security feature in Windows Server 2008 called Local User Administrator). Log on either to the built-in administrator account, or explicitly invoke applications as the built-in administrator by using the run as command-line tool.

39 Note that you can run as user/administrator cmd.exe so that every application you run from that command line will be elevated, eliminating the need to use the run as syntax from that command line. If you are logged on to an account other than the built-in local administrator account, you may see the following security alert dialog box. See Figure 8.1.

Figure 8.1. Run as administrator.

8.2 INSTALL IIS 7


Below steps are required to install IIS on windows 7 system: 1. To open the Windows Features dialog box, click Start, and then click Control Panel (see Figure 8.2). 2. In the Control Panel, click Programs (see Figure 8.3). 3. Click Turn Windows features on or off (see Figure 8.4). 4. You may receive the Windows Security warning. Click Allow to continue. The Windows Features dialog box is displayed (see Figure 8.5). 5. Expand Internet Information Services. Additional categories of IIS features are displayed. Select Internet Information Services to choose the default features for installation (see Figure 8.6). 6. Expand the additional categories displayed, and select any additional features you want to install, such as Web Management Tools (see Figure 8.7). 7. If you are installing IIS 7 for evaluation purposes, you may want to select additional features to install. Select the check boxes for all IIS features you want to install, and then click OK to start installation (see Figure 8.8). 8. The progress indicator appears (see Figure 8.9). 9. When the installation completes, the Windows Features dialog box closes, and the Control Panel is displayed (see Figure 8.10).

40

Figure 8.2. Open control panel. 10. IS 7 is now installed with a default configuration on Windows Vista or Windows 7. to confirm that the installation succeeded, type the following URL into your browser, http://localhost(see Figure 8.11). 11. Next, you can use Internet Information Services Manager to manage and configure IIS. to open IIS Manager, click Start, type inetmgr in the Search Programs and Files box, and then press ENTER (see Figure 8.12).

8.3 INSTALLING SERVER


After installing IIS on Windows system, Server need to configure so Client can access those server and sent data to server for future use. The following content have been highly inspired from [9] and [10] to distinctly emphasize the installation of the server.

41

Figure 8.3. Open program.

Figure 8.4. Open on/off Windows features.

42

Figure 8.5. Administrator permission.

Figure 8.6. Install IIS from Windows feature.

8.3.1 How to Install Server


Here is what you will need server side: Windows Vista with Service Pack 1 Internet Information 7 Management Console Installed Install IIS 7 Manager- Download from IIS.net To check that all the above requirements are met: 1. Click on the Start button, right click on the Computer button, and left click Properties (see Figure 8.13).

43

Figure 8.7. Web management tools service.

Figure 8.8. WWW services.

44

Figure 8.9. Installing the change made on Windows services.

Figure 8.10. IIS installation finished. 2. In the System window verify that you have SP1 installed. (Of course the reality is if you were remotely administrating IIS, you should already know if you have SP1, but I digress) (see Figure 8.14). 3. Now lets see if the Internet Information 7 Management Console is installed, by going to the Start button, clicking on Control Panel, and clicking on Turn Windows features on or off. If you are prompted by UAC, go ahead and click OK (see Figure 8.15). 4. You will find the component you want under Internet Informational Services -> Web Management Tools ->IIS Management Console. If it is checked then you are set, if it isnt go ahead and install it so we can begin the next part! (see Figure 8.16). 5. Ok on to installing the IIS 7 Manager client, by navigating to where you downloaded the client and double click on the file to start the installation.

45

Figure 8.11. Open IIS on Internet Explorer.

Figure 8.12. Turn on/off server.

46

Figure 8.13. Computer properties.

Figure 8.14. Service pack for Microsoft Windows editions. 6. The first splash screen will show you that you are about to install IIS 7 Manager, so go ahead and click Next (see Figure 8.17). 7. Accept the license terms by placing a check in the box, and then click Next (see Figure 8.18). 8. Unless you have other plans, accept the default file location, and click Next (see Figure 8.19). 9. With all the preliminaries out of the way click on Install to begin the installation (see Figure 8.20). 10. When the installation routine finishes, go ahead and click Finish (see Figure 8.21).

47

Figure 8.15. Turn on/off Windows features.

Figure 8.16. Installing IIS 6 Manager.

48

Figure 8.17. Continue installing.

Figure 8.18. Agree the license to continue installation.

49

Figure 8.19. Location to install.

Figure 8.20. Install all the settings.

50

Figure 8.21. Finish the installation. 11. We can go in and see if the installed version has upgraded our IIS Management Console. Go into your Administration Tools, and click on Internet Information Services (IIS) Manager. You may be prompted by UAC, click Ok if it does. If your install was successful you should see the console shown in Figure 8.22.

8.3.2 How to Configure Management Service


The main requirement on the server side is to be running Windows Server 2008 and have IIS 7 installed with IIS Management Service. We will now setup the server and firewall to allow connections remotely. 1. First check to see if the Management tools are installed on the server. Go into Server Manager, expand Roles, and click on Web Server (IIS), in the main pane click on Add Role Services, and under Management Tools make sure that IIS Management Console & Management Service is installed and if they arent click next to both of them to install (see Figure 8.23). 2. Open IIS Manager and expand out your Webserver, click on Management Service in the center pane.

51

Figure 8.22. Opening IIS 6 Manager.

Figure 8.23. Management tool installation. 3. In the Management Service panel you will see a notice in the right pane that WMSVC is stopped. This is a very important step because it needs to be stopped to be able to configure the service. One of the key features of IIS 7 remote management is the ability to use either Windows credentials or IIS Manager Credentials. Lets go ahead and place a check next to Enable remote connections, and set the radio button to Windows credentials or IIS Manager credentials (see Figure 8.24). 4. In the next section on Connections, you can assign the IP address, Port, SSL Certificate, and log location for the service to use.

52

Figure 8.24. Open management service. 5. You can also restrict administration based on IPv4 address, either denying specific addresses or only allowing from specific addresses. 6. Now lets start the service by clicking on the Start button, in the right pane (see Figure 8.25).

53

Figure 8.25. Start the server.

54

CHAPTER 9 CLIENT SIDE IMPLEMENTATION


You initiate GPS status application, after installing the GPS Status.apk to your device. It shows the screens in Chapter 8, consisting of user friendly GUI for obtaining our required purpose of tracking and navigation. See Figure 9.1.

Figure 9.1. Homepage of the GPS status application. If users Device GPS setting is not turned on, then at this point Enable GPS button is active and user could turn on the GPS feature by pressing that button on device. If your device GPS functionality is not enabled at this point, the application would detect it and Enable GPS button gets activated and you can turn on the GPS functionality by clicking on the Enable GPS button.

55 When the user hit the Enable GPS button, the method below is called to enable the GPS from phone settings menu. public void showGPSDisabledAlertToUser() { AlertDialog.BuilderalertDialogBuilder = new AlertDialog.Builder(this); alertDialogBuilder.setMessage("GPS is disabled in your device. Would you like to enable it?") .setCancelable(false) .setPositiveButton("Goto Settings Page to Enable GPS", new DialogInterface.OnClickListener(){ public void onClick(DialogInterface dialog, int id){ Intent callGPSSettingIntent = new Intent( android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivity(callGPSSettingIntent); } }); alertDialogBuilder.setNegativeButton("Cancel", new DialogInterface.OnClickListener(){ public void onClick(DialogInterface dialog, int id){ dialog.cancel(); } }); AlertDialog alert = alertDialogBuilder.create(); alert.show(); } User can see the below screenshot after user hit Enable GPS button. Where-in user could see another pop-up window which displays a message, GPS is disabled in your device, would you like to enable it? Users have the choice to, either enable the GPS to use this application or even cancel it. If user clicks on Go to settings page to enable GPS then application will guide user to the required Phone-Settings menu from where a user can enable the GPS settings and turn it on. By pressing back button twice, the user could track over to the GPS Status application again. Now at this point of time the Enable GPS button gets disabled and device is ready for the required purpose. However if the user clicks on Cancel button, it would re-direct the user back to previous page where-in Enable GPS button is still in active phase because

56 GPS functionality is disabled and user would not be allowed to navigate further with this application without the essential GPS settings being turned-on. See Figure 9.2.

Figure 9.2. Turn on wifi settings. After enabling the GPS user will be routed back to GPS Status page where now user can click on Add button to add Unique Tracking ID of the new user to track this device. After user click on Add button, Figure 9.3 screen will appear to the user. User can add Unique Tracking ID for tracking the phone or person. After User enter a Tracking-ID, hit on save button to save that Tracking ID into database. If user clicks on Cancel button that Tracking Id is not been stored to database and application come back to main screen. If User enters the same Tracking Id which is previously saved in the database, then it shows an error message stating This Id is already present in database, please enter a new Unique Tracking Id

57

Figure 9.3. Add unique tracking ID. There is Remove button in main screen by which the user can delete the Selected Tracking Id from the database. At this point all the data associated with that Tracking Id is been removed from the database which is stored on server. If you clicked on Dropped down list you can find all the previously added and not removed Tracking id for the logged in user. Shown in Figure 9.4 is screenshot for such a scenario:After the user select, any one of the previously added Tracking Id, the User can see the Start tracking system button is now enabled. And immediately when the user initiates on Start tracking system button the below mentioned method is triggered. private void updateLocation() { try { final HttpClient client = new DefaultHttpClient(); HttpPost post; Location location; locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);

58

Figure 9.4. Choose from previously added tracking ID. crit.setAccuracy(Criteria.ACCURACY_FINE); provider = locationManager.getBestProvider(crit, true); location = locationManager.getLastKnownLocation(provider); lat = location.getLatitude(); lng = location.getLongitude(); latitude_str = ""+lat; longitude_str = ""+lng; latLongString = "Lat:" + lat + "\nLong:" + lng; Id = get_defaultid(); post = new HttpPost("http://Localhot/Location/default.aspx?latitude="+lat+"&longitude="+ln g+"&id="+Id); HttpResponse response = client.executte(post); MessageBox(latLongString); } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }

59 At this time the users cellular device starts tracking and storing the actual Longitude and Latitude of the earth with the associated time and date. This data is quintessential to track the user. By using HttpPost method this data is sent to particular server with Latitude, Longitude and Unique Tracking Id. The procedure below is called when the user changes the position, where-in the device communicates with the server regarding the change in Longitude and Latitude of the phone. The below mentioned method is called, and uploads the updated Location to the server by using the same HttpPost method. Now this new location is stored under the same Tracking Id but with different longitude and latitude. public void updateWithNewLocation(Location location) { if (location != null) { lat = location.getLatitude(); lng = location.getLongitude(); latitude_str = ""+lat; longitude_str = ""+lng; latLongString = "Latitude:" + lat + "\nLongitude:" + lng; Id = get_defaultid(); post = new HttpPost("http://Localhot/Location/default.aspx?latitude="+lat+"&longitude="+ln g+"&id="+Id); } else { latLongString = "No location found"; } try { send_data(); } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } When actual tracking is started Start Tracking system button gets disabled. While at this point a user can stop the tracking of system by pressing Stop Tracking System button.

60 This button is enabled after user presses the Start Tracking system button. When Stop Tracking System button is pressed, device would stop sending further data to the centralized server (see Figure 9.5).

Figure 9.5. Start tracking system. If User wants to change the Tracking Id in middle of tracking system with other id then user simply have to select Tracking Id from drop down list and hit the Update Now button. This Update now button will stop tracking previously selected Tracking Id and Stop sending further data to server for that Tracking Id. Instead It start Sending the updated data to server for Updated Tracking Id. If User finds any difficulty how to use this application they can press Help button and can find out some help on How to use this application. Upon clicking the About button, the user can see who developed this application and it belongs to SDSU as part of thesis. Finally by pressing Exit button the user can exit this application at any time they want, there-by stopping further tracking for the Unique Tracking ID for the user.

61

CHAPTER 10 SERVER SIDE IMPLEMENTATION


The user uses the GPS Status application, that application sends data to the server. At server side, database is maintained which is in actual fact a repository keeping all the information sent by the users phone. That repository stores the data in accordance to the tracking id. Along with longitude and latitude this database also maintains the time-stamp of data being pushed, so that a user can be tracked in timely fashion. To see the actual data on stored database we had maintained a GUI based userfriendly website which depicts the current database. Here-by in Figure 10.1 are the web-site screen-shots.

Figure 10.1. Homepage of GPS solution website. In this page the user just has to enter the valid Tracking id. This tracking id is actually added by the user on his phone when he uses the GPS Status application. If the user doesnt provide the exact tracking id, Figure 10.2 Page will be displayed. User will be prompted a message stating that No Records Available with this ID.

62

Figure 10.2. Providing wrong tracking ID. Now if a user entered a valid Tracking id, then the website starts showing the tracking path for that unique tracking ID. When the user clicks on Go button after entering Valid Tracking ID the method below is called which first validates whether the required Enter Your Tracking ID textbox is not empty, and if its empty then it prompts an Enter Valid Tracking ID message to the user. Now if the user enters data and searches for it, it immediately refers an if loop and starts looking the Tracking id from database table. If its not able to find any data from that table then it simply shows No Records Available with this ID but if it finds some data from that table then PlotGPSPoint method is called. protectedvoidImageButton1_Click(object sender, ImageClickEventArgs e) { if (TextBox1.Text != "") { SqlDataAdapterdataAdapter = newSqlDataAdapter("Select * from tbllocation where id='"+ TextBox1.Text+"'", conn); SqlCommandBuildercommandBuilder = newSqlCommandBuilder(dataAdapter); DataTable table = newDataTable(); table.Locale = System.Globalization.CultureInfo.InvariantCulture; dataAdapter.Fill(table); if (table.Rows.Count == 0) { Label2.Text = "No Records Available with this ID"; }

63 else { js.Text = GPSLib.PlotGPSPoints(table); Label2.Text = ""; } } else { Label2.Text = "Enter Valid Tracking ID"; } } When valid Tracking Id entered by user then Figure 10.3 page is shown.

Figure 10.3. Tracking map. Now Users are able to see the whole path on actual Google map. They can zoom in and zoom out to see exact location with street name and view. Even users can change the map view to Satellite view as shown in Figure 10.4 screen shot. path.push(new google.maps.LatLng( + Latitude + , + Longitude + @)); This method is used to push the Latitude and Longitude to Google map. If users move their cursor on Point shown on the map they can see that exact time and date when they are at that place and it looks similar to the Figure 10.5 screenshot.

64

Figure 10.4. Satellite version of map.

Figure 10.5. Exact time and date.

65

CHAPTER 11 CONCLUSION AND OBSTACLES


By developing this project I got an excellent opportunity to enhance my knowledge in-depth regarding GPS and its various functionalities. How our satellite works to find the actual position on earth, how our mobile device GPS system can be used in tracking the mobile and even showing the path on map was few of the topics which were dealt in stretch. At present I dont have a live server host so I had no choice but to make my laptop as the actual server. Which was even more challenging as I had to take care of all the little settings in IIS manager. An application is built to help users, who are currently using a GPS enabled cellular device, track their route. And this can be useful to the industry where they can track their employee using this particular functionality.

66

CHAPTER 12 FUTURE WORK


There are different kinds of mobile platforms currently available in the market. i.e. blackberry, Android, IPhone, Windows, Boost, etc. However, I had only developed my application in Android platform, but its possible that we can develop this application using other platform as well. I didnt have a dedicated hosting server, which I could use to store my database globally so that all the users can easily use my application on their device. If we have that server then it can even interact with multiple users simultaneously. Developed website is very simple and just provide the required information on the map. We can even expand the website and make it more secure and capable of storing the previously searched data, which could in-turn help users to save valuable search time.

67

BIBLIOGRAPHY
[1] [2] [3] [4] Wikepedia. Global Positioning System, 2011. http://en.wikipedia.org/wiki/Global_Positioning_System, accessed Nov. 2011. Kowoma. Position Determination with GPS, 2009. http://www.kowoma.de/en/gps/positioning.htm, accessed Nov. 2011. Global Sat Technology Corp. Different Types of GPS Systems, 2011. http://www.usglobalsat.com/s-29-different-types-of-gps.aspx, accessed Nov. 2011. Colleen H. Yinger. Operation and Application of the Global Positioning System, 2002. http://www.aero.org/publications/crosslink/summer2002/02.html, accessed Nov. 2011. Travel By GPS.com. Cell Phone Tracking, 2006. http://nb.cupe.ca/locals/1253/cellphone-tracking, accessed Nov. 2011. Chris Moor. Android SDK Installation Guide, 2008. http://www.talkandroid.com/guides/developer/android-sdk-installguide/#.T0lQsfEgdm0, accessed Jan. 2012. Pharr. Installing IIS 7 on Windows Vista and Windows 7, 2010. http://learn.iis.net/page.aspx/28/installing-iis-on-windows-vista-and-windows-7/, accessed Feb. 2012. How to Geek Forum. How to Install IIS on Windows-Vista,2007. http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windowsvista/, accessed Jan. 2012. Dave Lawlor. Remote Administration of IIS 7: Install, Configure, Connect, 2008. http://www.trainsignal.com/blog/iis-7-remote-administration, accessed Feb. 2012. Microsoft. TechNet Library, 2012. http://technet.microsoft.com/enus/library/default.aspx, accessed Feb. 2012.

[5] [6]

[7]

[8]

[9] [10]

Das könnte Ihnen auch gefallen