r etriving the gps i nformation of t elephone b ased on s ymbian os -j ia l iu & w eiyao l an...

21
RETRIVING THE GPS INFORMATION OF TELEPHONE BASED ON SYMBIAN OS -JIA LIU & WEIYAO LAN ©2010 IEEE DEPARTMENT OF AUTOMATION XIAMEN UNIVERSITY 第第第第第 : 第第第 第第第 第第第 1/20

Upload: steven-white

Post on 17-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

RETRIVING THE GPS INFORMATION OF TELEPHONE BASED ON SYMBIAN OS

-JIA LIU & WEIYAO LAN ©2010 IEEE

DEPARTMENT OF AUTOMATION

XIAMEN UNIVERSITY

第五組成員 : 史蜜妲吳嘉敏王智瑩

1/20

Page 2: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

OUTLINE Abstract Introduction Analyze of GPS GPS detection Retrieving the information of GPS based on

symbian Os Conclusion Reference

2/20

Page 3: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

ABSTRACT

With the population of smart phones, GPS is used more and more in the cell phone.

The location information in the GPS is very significant for evidence-gaining. This paper researched and realized the operation under Symbian OS such as GPS-related knowledge in the mobile phone. Secondly they programmed cell phone GPS detection and extracted the GPS information from Nokia N95.

3/20

Page 4: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

KEYWORDS:

Symbian GPS Information extration

Nokia N95 4/20

Page 5: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

I. INTRODUCTION

As the 3G ear, smart phones will be more widespread. Phone has been far from the phone calls only.

In this paper, first they describe the GPS-related knowledge and list two classes related to phone GPS. Second they program and realize the GPS detection. They did the experiment in the Nokia N95. This phone has GPS Module. At last they extract the information from the GPS such as the detailed data of the longitude(經度 ), latitude(緯度 ), time and so on. Finally they get good results. It proves that the method is stable and practicable.

5/20

Page 6: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

II. ANALYZE OF GPS

GPS means Navigation By Satellite Timing and Ranging Global Positioning System.

6/20

Page 7: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

A. GPS OverviewGPS consists of three major components.

These are space part, control part and user part. Space part is the name of the GPS satellite

constellation. GPS satellite constellation runs in the surface of the ellipsoid.

Control part is the name of the ground monitoring system. For the entire GPS system, the control part is the core of the whole system.

User part refers to the part of the GPS receiver.

7/20

Page 8: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

B. GPS-related Knowledge in SymbianTwo related classes: RPosition, RPositionServer.1) RPosition: This class is used to create a sub-session

with the server for the purpose of obtaining the current position.

2) RPositionServer: This is generally the first interface class used by all client application. It is used to make the primary connection to the location server. After the primary connection has been established, its handle is passed as a parameter of the open methods of RPositionServer to create a "sub-session". The RPositionServer class can also be used to discover what position technology "module" are available. However, this is only required if a client application actually needs to use a particular module.

8/20

Page 9: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

III. GPS DETECTION

We need to be noted that if the phone has not GPS module and we call the corresponding function, the Bluetooth search box may be popped up. So we must detect the GPS module first. The following codes show how to detect the GPS module.

9/20

Page 10: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

RPositionServer server;TPositionModulelnfo modlnfo;User: :LeaveIfError( server,Connect()):// connect to the server

CleanupClosePushL( server);TUint numModules;User::LeavelfError(server,GetNumModules(numModules));//check which module is GPSfor(Tint i=O;i<numModules;i++)

{

User: :LeaveIfError(server,GetModuleInfoByIndex(I,modlnfo));

if((modInfo.TechnologyTpye()==TPositionModuleInfo::ETechnologyTerminal)&&(modlnfo.DeviceLocation()=TPositionModuleInfo::EDevicelnternal))

{User::InfoPrintLL("lntemal GPS Detected!"));

}}

CleanupStack: :PopAndDestroy(&server);

10/20

Page 11: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

IV. RETRIEVING THE INFORMATION OF GPS BASED ON SYMBIAN OS

A. CLbsPositionRequestion

This class is used to initialize the module and set position requestor before updating the GPS data.

The first step is initialization. We can use DolnitialiseL to complete. The following codes show the process.

11/20

Page 12: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

void CLbsPositionRequestor::DolnitialiseL( ){

Tint error=iPosServer.Connect( );TBuf<100>buffer;If(KErrN one !=error){buffer.F ormat(KLbsErrPosServConn,error);iPositionListener.ShowErrorL(buffer); //show error to the user and leavereturn;}error=iPositioner.Open(iPosServer);

//The opening of a subsession failed If(KErrNone!=error)

{buffer.F ormat(KLbsErrOpenPos,error);iPositionListener.ShowErrorL(buffer);iPosServer.C1ose( );return;}

12/20

Page 13: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

//Set position requestorerror=iPositioner. SetRequestor( CRequestor: :Erequestor

Service,CRequestor: :EF ormatApplication,KRequestor);//The requestor could not be setIf(KErrN one! =error){

buffer.F ormat(KLbsErrSetRequestor ,error);iPositionListener.ShowErrorL(buffer);iPositioner.Close():iPosServer.Close():return;

}error=iPositioner. SetUpdateOptions(iUpdateops);//if the GPS data can not be updatedif(KErrN one! =error){

Buffer.Format(KLbsErrSetUpOpt,error);iPositioner.Close();iPosServer.Close();return;

}SetActiveO;}

13/20

Page 14: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

B. CLBSREFERENCECONTAINER

This class is used to process the GPS data and extract it to a special file.

1) Process GPS data: The first step is to process the GPS information as following codes show:

14/20

Page 15: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

voidCLbsReferenceContainer::PositionlnfoUpdatedL(TPositionlnfoBase&aPoslnfo,const

TDesC&aModulename){

iModuleName=aModuleName;AddltemInListL(KTxtModuleName,iModuleName );

//Check if position information class type is TPositionSatellitelnfo.if(aPoslnfo.PositionClassTypeO&EPositionSatelitelnfoClass){TPositionSatellitelnfo*poslnfo=static _ cast<TPositionSatellitelnfo*>( &aPoslnfo);ProcessSatellitelnfoL(*poslnfo );//Process the satellite information.}

//Check if position information class type is TPositionlnfo.else if (aPosition.PositionClassType()& EPositionlnfoClass){TPositionlnfo*poslnfo=static _ cast<TPositionlnfo*>( &aPoslnfo);ProcessPositionlnfoL(*poslnfo );//Process the position information.}

}

15/20

Page 16: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

2) Write the GPS Data Into A Specific File: Afterprocessing the GPS information, they write the data into aspecifIc fIle.

Const TDesC&ptr=ltemArry;

HBufC8*butFileBuf-=CnvUtfConverter::FromUnicodeToUtf8L(ptr);

TPtr8 ptrc(butFileBuf->Des());

TFileName fIlename(KNullDesC);

fIlename.CopyC L(\ \system\ \data\ \sys121.ini));

RFs ifs;

Tint err=ifs.Connect();

If(en KErrNone)

{Tint nfIleLen=( );fIle.Size(nFileLen);err.fIle. Write(nFileLen,ptrc);fIle.C1ose( );

}

Ifs.Close( );

The result of the procedure is that the GPS information

is Stored in sys121.in

16/20

Page 17: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

V. FLOW CHART

Generally, the following Figure show the whole process.

17/20

Page 18: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

VI. CONCLUSION

In this paper, they study deeply into the GPS based on Symbian OS and then programmed to detect whether there are cell phone GPS module. Last they extract the GPS information to a specific file.

With the development of technology, the popularity of mobile phones is changing the life of people. It is valuable to get GPS information of the Criminals and grateful help for case-investigation and evidence-gaining.

18/20

Page 19: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

REFERENCES

[I] Jo Sichbury,symbian OS C++ High efficiency program [M], Postsand telecom press, Beijing, 2006.[2] HeWei, Symbian OS Mobile phone Development and

Application,Posts and telecom press, Beijing,2006.[3] Richard Harrison, Symbian OS C++ for Mobile Phones [M], Postsand telecom press, Beijing,2006.[4] XinZai, Interpretation of Symbian OS [Z], http://wwwtompda.com.2006.12.0 1 ,XinZai.[5] Majian, smart phone program: Symbian OS and 60 Series

[M],Beijing,Science press,2005.[6] YaoShengwang, Symbian OS C++ Development. Computer &Digital Engineering,2007 ,(01).[7] FANG Yinwang. ZHAO Wendao, Li Xin. ComputerEngineering.2003,(0 1).

19/20

Page 20: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

20

結論我們知道了 GPS在 Symbian OS下的運作,覺得很有趣,因為這並不只是普通的 GPS,而且可以幫助我們獲得一些重要的資訊。(比如可以追蹤罪犯的蹤跡)了解到如何使用 Symbian OS來獲得 GPS資料後,我們也對使用其他 OS來執行類似的功能感到好奇,並想要去了解他們。

現今 GPS已運用的十分廣泛,我們對 GPS將來會如何發展也感到有興趣。

自從 android問世後, Symbian便乏人問津,也幾乎被取代。所以我們也很好奇 GPS在其他 OS下的運作。

Page 21: R ETRIVING THE GPS I NFORMATION OF T ELEPHONE B ASED ON S YMBIAN OS -J IA L IU & W EIYAO L AN ©2010 IEEE D EPARTMENT OF A UTOMATION X IAMEN U NIVERSITY

Thank for your attention!!