5.locating friends and family using mobile phones

Upload: arun-subramanian

Post on 10-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 5.Locating Friends and Family Using Mobile Phones

    1/4

    Locating Friends and Family Using Mobile PhonesWith Global Positioning System (GPS)

    Ghaith Bader Al-Suwaidi, Mohamed Jamal Zemerly Computer Engineering Department

    Khalifa University for Science, Technology and Research,PO Box 573, Sharjah, UAE

    [email protected], [email protected]

    Abstract This paper presents a mobile application based onproviding Location Based Services (LBS) using GlobalPositioning System (GPS) as a location provider. The mainobjective of this work is to design and implement a client serversystem that helps users to locate their family members andreceive alerts when friends are nearby. The mobile applicationwas implemented using J2ME where the most recent APIs andother older APIs were combined together in order to make theapplication reliable on all types of mobiles. The server wasimplemented using PHP since PHP guarantees that the serverwould not be overloaded. The type of the Database used in thesystem was MySQL. The average location accuracy of theapplication is about couple of meters.

    I. I NTRODUCTION (H EADING 1) According to a new report from the research firm Berg

    Insight; revenues from mobile location based services (LBS)in the European market will grow by 34 percent annually toreach 622 million in 2010. This number shows howimportant LBS applications are becoming to mobile users [1].

    LBS are the mobile services in which the user locationinformation is used to provide a service. The user locationinformation consists of X-Y coordinates generated by anygiven positioning technique such as Cell-ID, GPS, etc.

    The GPS is the most efficient positioning technique. It wasdeveloped mainly to be used in navigation systems. Becauseof the reduction in the size of the GPS receivers and becauseof the integration of GPS with some mobiles; GPS becameone of the most important service providers in the LBS.

    There are not many projects that are carried out in the LBSfield. This is because this type of application was somehowexclusive for mobile service providers because they usemobile cells information to get the location of the mobile andthen provide a service to get it. But the introduction of GPS inthis field will make designing and implementing LBS servicesopen to researchers all over the world.

    II. SYSTEM ARCHITECTURE The internet is the medium that will be used to transfer

    user data and service request from the mobile to the server and

    then the requested information back to the user. Figure 1shows the main 5 elements that construct the system which arethe GPS, the client tier, server tier and the database tier.

    A. Client tier (Mobile)The mobile requests its location from the positioning

    system periodically and sends it through the communicationnetwork to the server. The user can request the location of afamily member at any time from the server. Also an alert can

    be received whenever the user and a friend are in the samelocation.

    B. Server The server receives users' location and alerts two friends if

    they are in the same location or update the user about thelocation of family members.

    C. DatabaseThe database contains all users subscribed in the service

    with their location, a list for each user that contains friendsand family members that can be located, and a table that

    contains locations with their coordinates.

    D. GPS Every time the mobile phone updates the user location in

    the server, it requests the location of the user from the GPS.The GPS determines the longitude and the latitude and sendsthem to the mobile phone.

    III. FUNCTIONAL SPECIFICATIONS

    A. Mobile Functions1) User Registration: In order to use the service the user

    should register by providing a username and password. This

    information will be sent to the server.2) User Login: If the user is already registered, he/she can

    login to the service by entering his username and password.Information will be sent to the server in order to decidegiving the user a permission to use the service or not.

    978-1-4244-3806-8/09/$25.00 2009 IEEE 555Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.

  • 8/8/2019 5.Locating Friends and Family Using Mobile Phones

    2/4

    Figure 1. System Architecture

    3) Add Member: The user can add any other registereduser to his/her list. Also the user must specify whether toconsider the added user as a friend or as a family member .

    4) Family/Friends Request: After adding a user to the list,the request goes to the outgoing requests list of the user andto the incoming requests list of the added friend or familymember. The friend or family member can choose whether toaccept the incoming request or reject it. Also the user cancancel the request at any time.

    5) GPS Connector: After adding a user to the list, therequest goes to the outgoing requests list of the user and tothe incoming requests list of the added friend or familymember. The friend or family member can choose whether toaccept the incoming request or reject it. Also the user cancancel the request at any time.

    6) Coordinates Retriever and Update: This function getsthe coordinates of the location of a user from the GPSreceiver (either Bluetooth or built-in GPS receiver) and sendsthem to the server periodically where the period can bespecified by the user.

    7) Get Member Location: A user can retrieve the locationof a family member at any time with the distance between

    both of them and the last time the family member updated theserver with his/her location. This is done by sending a requestto the server.

    8) Get Friend Alert: Every time the application updatesthe server with the location of users, it retrieves the friendsthat are within 1km away from the user.

    B. Server Functions1) Registration Processes: The Server gets the

    registration information and saves them into users table in theDatabase.

    2) Login Processes: The Server gets the logininformation, and makes sure that the user has an access to thesystem or not by checking the information with ones stored inthe database.

    3) Member Addition Processe: The Server getsinformation from the application, and then it adds the newmember to the user list.

    4) Requests Processe: The Server sends the incomingrequests list and outgoing requests list to any user when ever he/she requests. Then it gets the user response on any user inthe list and performs an action (accept, reject, cancel request).

    5) Updating Location Processes: The Server gets thecoordinates of a user location and stores them in the database.

    6) Getting Location Processes: The Server provides theapplication with a family member location of a user list withthe location update time and the distance between the user and the family member.

    7) Alerting Processes: The Server calculates the distance between two friends according to the coordinates stored in thedatabase and alerts the friends if they are nearby.

    C. Database Functions1) Users Table: This table stores all the users with their

    login information and location.2) Users friends and family lists Table: This table stores

    the lists of all users that use the service.3) Locations table Table: It contains Locations name with

    their corresponding coordinates.

    IV. THEORATICAL FOUNDATION

    A. GPS The Global Positioning System (GPS) is the only fully

    functional Global Navigation Satellite System (GNSS). It usesaround 24 medium Earth orbit satellites that transmit preciseradio signals. The system enables a GPS receiver to determineits location, speed and direction.

    1) Calculating Positions : In order to calculate its position,a receiver needs to know the precise time. The satellites areequipped with accurate atomic clocks while the receiver usesan internal crystal oscillator-based clock that is continuouslyupdated using the signals that are coming from the satellites.The receiver identifies each satellite's signal by a distinctCoarse / Acquisition (C/A) code pattern, and then measuresthe time delay for each satellite.

    To measure the time delay for each satellite, the receiver produces an identical C/A sequence using the same seednumber (number used to initialize a random number generator) as the satellite. By lining up the two sequences, thereceiver can measure the delay and calculate the distance tothe satellite. The orbital position data from the NavigationMessage is then used to calculate the satellite's precise

    556

    Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.

  • 8/8/2019 5.Locating Friends and Family Using Mobile Phones

    3/4

    position. Knowing the position and the distance of a satelliteindicates that the receiver is located somewhere on the surfaceof an imaginary sphere centered on that satellite and whoseradius is the distance to it. When three satellites are measuredsimultaneously, the intersection of the three imaginary spheresreveals the location of the receiver as shown in Figure 2. Thelocation is represented as coordinates; the coordinates arerepresented in numbers. These numbers represents thelongitude and the latitude of a location [2].

    2) Coordinates format: The coordinates that are retrievedfrom the GPS can be represented as one of the followingformats: DD

    MMSS.SS, DD

    MM.MM, or DD.DD

    , whereD is for Degrees, M is for Minutes and S for Seconds.

    3) Calculating distances using coordinates : In order tocalculate the distance between two points where thecoordinates of each point is given; an equation that calculatesthe distance between two points on a circle surface should beused [3]. If the distance between point A (LongA, LatA) andthe point B (LongB, LatB) wanted to be calculated, then thedistance in meters is:

    RlatBlatA

    lonAlonBlatBlatAa D

    +=

    )sin()sin()cos()cos()cos(cos (1)

    where D: the distance in meters, latA: Latitude of point A,longA: Longitude of point A, latB: Latitude of point B, longB:Longitude of point B, R: the radius of the earth in meters

    4) GPS sources of error: There are several sources thatmay affect the accuracy of the GPS. These sources are shownin Table I below.

    TABLE I. GPS SOURCES OF ERROR

    Source Effect

    Ionospheric errors 5 meters

    Ephemeris errors 2.5 meters

    Satellite clock errors 2 meters

    Multipath distortion 1 meter

    Tropospheric effects 0.5 meter

    Numerical errors 1 meter or less

    B. JAVA Location API The Location API for JAVA is an optional Package that

    enables mobile phones to get information about the present

    geographic location and orientation of the terminal andaccessing a database of known landmarks stored in theterminal [4].

    C. JAVA Bluetooth API The JAVA Bluetooth API is a package that enables mobile

    to connect to other devices that support Bluetooth connection

    and exchange information with them.V. IMPLEMENTATION

    The mobile application was implemented using J2MEwhile PHP was used for implementing server functions andMySQL was used for the database.

    In order to make sure that the application can run onalmost all mobiles, two different methods for dealing withGPS receivers were used. The first one is for the new mobilethat are coming to the market and have built in GPS receiversor the mobile that support LBS services, where the JAVAlocation API was used in order to connect and retrievecoordinates from the GPS receivers.

    The second method is for mobiles that do not support thelocation API where the Bluetooth API was used for connecting and getting coordinates from the GPS receivers.

    VI. TESTING

    A. System validationThe purpose of validation is to show that the implemented

    system satisfies the initial requirements. The requirements can be divided into four categories for the purpose of validation.These categories are the purposes of the system, portability,techniques and functions.

    The main category was the system portability where the

    system was tested on several mobile phones some of themsupport the JAVA location API and some have built in GPSreceivers. The results of this test are shown in Table 2.

    TABLE II. MOBILES CAPABILITIES AND SYSTEM PERFORMANCE

    Mobile model Capabilities SystemPerformance

    Nokia N95 Has a built in Bluetooth receiver and supports the location API System worked well

    Nokia N73 Supports the location API System worked wellSony EricssonW880 Does not support the location API System worked well

    Sony EricssonK800

    Does not support the location API System worked well

    B. System VerificationThe purpose of verification is to ensure that the system

    correctly performs its functions and produces the correctresults. For the purpose, different types of scenarios were usedto test the functions of the system. All of the test results came

    positive.

    C. EvaluationThe main part of the evaluation was the quantitative

    assessment where the average error in meters of the locations

    Figure 2. GPS Positioning

    557

    Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.

  • 8/8/2019 5.Locating Friends and Family Using Mobile Phones

    4/4

    provided by the system was measured. This is done bycalculating the distance between a point and itself where thecoordinates are retrieved from the implemented system for oneof the points and Google earth for the other one [5]. Googleearth was considered as a reference for the system coordinatesfor this assessment. By calculating the error of several points,the average error was calculated.

    TABLE III. M EASURING COORDINATES ERROR (POINT A)

    Point A Longitude Latitude Distance

    System 5520.2381 2517.73481.22 m

    Google earth 5520.2386 2517.7358

    TABLE IV. M EASURING COORDINATES ERROR (POINT B)

    Point B Longitude Latitude Distance

    System 5523.9225 2521.25272.1 m

    Google earth 5523.9242 2521.2516

    TABLE V. M EASURING COORDINATES ERROR (POINT C)

    Point C Longitude Latitude Distance

    System 5520.329 2518.56861.09 m

    Google earth 5520.330 2518.5682

    From the three calculations, the average error is 1.47m.

    Another assessment was done where the distancecalculation equation accuracy was tested. This is done bydefining two points on the ground then measuring the distance

    between the two points using a measurement tool. After that,the GPS receiver was used to get the coordinates of both

    points and then the distance was calculated (using Equation 1).

    TABLE VI. D ISTANCE CALCULATION BETWEEN TWO POINTS

    Points Longitude Latitude Distance

    A 5520.2381 2517.735019.82 m

    B 5520.2280 2517.7503

    The measured distance using measurement tool was 21meters while using GPS coordinates gave a distance of 19.82meters, so the error in measuring the distance was 1.18 meters.

    VII. D ISCUSSION Based on the tests that measure the system performance,

    the system has some strong and weak features:

    The system built is portable and can run on any mobile phone that supports J2ME whether they support the newJAVA location API or not.

    The system can run on mobiles that have a built in GPSreceiver or mobiles that support Bluetooth which can beused to connect the mobile to external GPS receivers.

    On the mobile side, the application size is small because alluser lists and other data are stored in the server.

    GPS does not work indoor. This problem was solved byalways storing the last location updated by the application.

    The system provides the user with the member time of update whenever a family member location is requested.This will help the user to know whether the location isrecently updated or not.The new JAVA location API supports both types of GPS

    (built in, Bluetooth) but the problem with this API is that notall available mobiles support it; also not many resources werefound because the API is still new. To overcome this problem,

    both ways of getting the coordinates were used, the new APIand the function that deals with the Bluetooth GPS receiverswere used. The application was implemented to check if themobile supports the implemented class that uses the locationAPI or not. Therefore, if the mobile supports the API, then ituse the class, otherwise it uses the Bluetooth connection class.

    VIII. CONCLUSION AND FUTURE WORK A J2ME mobile application based on providing Location

    Based Service using Global Positioning System (GPS) as a

    location provider is presented. The application is implementedas a client server system that helps users to locate their familymembers and receive alerts when friends are nearby. Thelocation average accuracy using this system is believed to bewithin couple of meters. The application works in open spaceareas only since it relies on GPS. Future extensions may look at other options such as getting the location from the service

    provider. In this case the location accuracy will be reducedand will depend on the size of the cells where the user islocated. Other future extensions can be summarized asfollows:

    Include maps, to send a map with a family member locationrather than just sending the location name. Also a map that

    shows the path from a friend to another. Provide a Mobile SOS (Save Our Souls) facility to mobile

    users. GPS satellites can be used to find the location of theuser, and send the coordinates via SMS to a server.

    Provide religious needs such as making the application tocalculate the five Muslim prayer times using the GPScoordinates. Also determine the Qiblah (Makkah) directionusing the coordinates provided by the receiver.

    Allow the users to create other lists rather than just using thefriends and the family members list. This will help in usingthe system in organizations that need to know the locationof their employees during working hours.

    R EFERENCES [1] Axel Kpper , Location-based services, fundamentals and operation,

    WILEY, 2 nd edition, 2005.[2] Joel McNamara, GPS for Dummies, For Dummies, 1 st edition, 1998.[3] Rick Broida, How to Do Everything with Your GPS, McGraw-

    Hill/Osborne, 2 nd edition, 2004.[4] Qusay H. Mahmoud "J2ME and Location-Based Services". Sun

    Developer Network, 2004.[5] Google Earth software. http://earth.google.com/ September 2008.

    558

    A th i d li d li it d t Bh t U i it D l d d A g t 31 2009 t 13 23 f IEEE X l R t i ti l