Location

 

 
D
etermining your location whenever you would like, finding the nearest cinema location, remembering a perfect fishing spot where you can go there easily again. Have you thought of this before? Current mobile devices can provide such functionalities for you. This article outlines location technologies and the usage of location API on Motorola J2ME handsets. It introduces the Motorola location API and the JSR-179 location API which help you to implement your location application easily.
Location technologies introduction
There are several methods to determine the location of a mobile device. They may be handset-dependent or network-dependent. So you should know your handset and your carriers about the location method that you can use. Mobile location methods include:
1. Network based location
1.1 Cell-ID method. This method identifies the handset location by the Base Transceiver Station (BTS) that the device is communicating with and the location of that BTS. The handset can be at any position in the cell. The precision is decided by the size of the cell, and it can be quite inaccurate.
1.2 E-OTD(Enhanced-Observed Time Difference)/U-TDOA(Uplink Time Difference Of Arrival)/OTDOA(Observed Time Difference Of Arrival) method etc. These methods use the time difference to locate the mobile device, the precision depends on the precision for the system time of the mobile network.
2. Mobile device based location. GPS is potentially the most accurate method, but it has some drawbacks: It consumes battery much while in use, It also suffers from "canyon effects" in cities where satellite visibility is intermittent.
2.1 A-GPS(Assisted Global Positioning Systems). The mobile device must be equipped with a GPS receiver. The network use the cell that the mobile device communicates with to locate the GPS satellite above the cell, and provides this information to the mobile device, the mobile device uses such information to narrow down the searching scope and shorten the searching time so that it can locate the satellite more rapidly.There is also a sensitivity improvement when using A-GPS. The idea is that the data that the GPS receiver has to decode in order to calculate its position is sent over the cellular network instead. As a consequence, the GPS does not need to decode data and can operate at lower RF signals.
2.2 Autonomous GPS. The mobile device has a full function GPS receiver. The location information is obtained by the mobile device itself. And it takes some time to get an initial fix on the visible satellites.
3. Hybrid location. This method uses the mobile device and the network together to solve the location problem in special areas such as in the field and in the room. This method puts the location function in the mobile device and put the mixing function in the network.
 
Location method
Calculation
Device modification
Expense
Location area
Accuracy/m
GPS
A-GPS: Network and mobile device do the calculation both
Network and mobile device need to be modified both. (An exception: a user plane assistance solution, where the assistance server is located in the internet, outside the cellular network.)
Medium
Places such as valley, room are limited
5-40
Autonomous GPS: Mobile device does all the calculation
Only change the mobile device
Network
Network
Cell-ID: No change
Low
Inside the cell
100-30000
E-OTD: Change both the network and the mobile device
Medium
Limited in the country area
50-400
U-TDOA /OTDOA: Change the network
High
Limited in the country area
50-200
Hybrid
Network and mobile device work together
Network and mobile device need to be modified both
High
Decided by satellite and BS’s distribution
5-20
 
For the handset-independent location method, there are different mobile devices on the market that you can use. Here they are:
1. Using handsets which have a built-in GPS chipset in them. Motorola has handsets which have built-in GPS in them, such as E1000, A1000, A780 etc. In this case, you should use location API such as Motorola Location API or JSR-179 API. This article will discuss this method and the location APIs more in the following section.
2. For handsets which have no built-in GPS chipset, you can use serial or Bluetooth connection with a GPS module. This article does not intend to introduce this case. Please refer to the reference article which is listed at the end of this article: Introduction to GPS.
Developing Applications using Motorola Location API
It is up to you to decide how to implement your location application. Here are some choices that you can use:
1. Using Client/Server mode, the server will do most of the processing logics and responds the handset client with the requested map images. The handset client only accepts the user input and sends the request to the server. This method has the disadvantage of responding time and speed. Also you should pay extra fees for a connection to your server.
2. Storing map images and their data on the handset, this method has the advantage of higher respond speed, however it requires the handset client has more powerful capability which includes the storage, processing ability, battery ability etc.
JSR-179 Location API
Location API for J2ME (JSR-179) provides a standard interface to access location based information. The classes are in the optional package “javax.microedition.location”. The main classes are Landmark(used to store the location), Location, LocationProvider and QualifiedCoordinates(represents coordinates as latitude-longitude-altitude, it can be used to calculate the distance and azimuth between the two coordinates). The following is a snippet code of using it. Please refer to JSR-179 for the detail usage.
Notes of using Location API
Please pay attention to the following notes before you develop an application using location API.
1. The security issue. In order to use the Motorola location API or JSR-179, the MIDlet needs to be signed as a trusted one.
2. Please note that the location information may be considered as highly sensitive, and there will be some concerns about many privacy issues. So you should take this in mind when you decide to develop a location application.
3. Check whether the handset support Location API. For JSR-179, you can use: System.getProperty("microedition.location.version"). It returns the string for version if it is supported, if it is not supported the string will be null.
4. Integrate the location API with other MIDP APIs, such as WMA to add location information into the SMS indicating your location to the SMS receiver, and with MMA to play voice of your direction or location, also with PIM API to tie the location information to the contacts in your handsets.
5. An application using the Location API needs to take into account issues related to the network. The network coverage can be either temporarily out of service or not available at all. Another important consideration is the amount of time required to get a location fix. It may take between 5 and 30 seconds.
Conclusion
There are many choices to implement your location application. First of all you should know the details of how location is provided on your handset and the network. Then use the location API to be consistent with the goal of your application.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值