Skip to content

Commit 9a18320

Browse files
committed
Adds documentation to CdmaCellLocation get lat/long methods
Adds better documentation to the getBaseStationLatitude() and getBaseStationLongitude() methods to indicate the units for latitude and longitude in CdmaCellLocation. Unlike the Android Location API methods, latitude and longitude in CdmaCellLocation are not in decimal degrees but instead in 0.25 seconds due to a more obscure 3GPP standard underlying the Telephony API. The current Javadocs on the Android developer page (http://goo.gl/hvWo6) do not indicate the units for latitude and longitude in CdmaCellLocation, making it very difficult for developers to interpret the output of these methods, especially since 0.25 seconds is not a commonly used unit for latitude and longitude in application-level code. This patch adds clear documentation to these methods so developers can clearly understand the units for latitude and longitude without having to dig through the Android platform source code. Change-Id: I259bfe3b68e3999804877821680fb99a22937651 Signed-off-by: Sean Barbeau <sjbarbeau@gmail.com>
1 parent 0a3fcc3 commit 9a18320

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

telephony/java/android/telephony/cdma/CdmaCellLocation.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,26 @@ public int getBaseStationId() {
8181
}
8282

8383
/**
84-
* @return cdma base station latitude, Integer.MAX_VALUE if unknown
84+
* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
85+
* (http://www.3gpp2.org/public_html/specs/C.S0005-A_v6.0.pdf)
86+
* It is represented in units of 0.25 seconds and ranges from -1296000
87+
* to 1296000, both values inclusive (corresponding to a range of -90
88+
* to +90 degrees). Integer.MAX_VALUE is considered invalid value.
89+
*
90+
* @return cdma base station latitude in units of 0.25 seconds, Integer.MAX_VALUE if unknown
8591
*/
8692
public int getBaseStationLatitude() {
8793
return this.mBaseStationLatitude;
8894
}
8995

9096
/**
91-
* @return cdma base station longitude, Integer.MAX_VALUE if unknown
97+
* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
98+
* (http://www.3gpp2.org/public_html/specs/C.S0005-A_v6.0.pdf)
99+
* It is represented in units of 0.25 seconds and ranges from -2592000
100+
* to 2592000, both values inclusive (corresponding to a range of -180
101+
* to +180 degrees). Integer.MAX_VALUE is considered invalid value.
102+
*
103+
* @return cdma base station longitude in units of 0.25 seconds, Integer.MAX_VALUE if unknown
92104
*/
93105
public int getBaseStationLongitude() {
94106
return this.mBaseStationLongitude;

0 commit comments

Comments
 (0)