am 3fe79dfd: Merge "Adds utility method to convert 0.25 secs to decimal degrees"
* commit '3fe79dfdf4ca63535ec9e586ebed553a862061ea': Adds utility method to convert 0.25 secs to decimal degrees
This commit is contained in:
@@ -19290,6 +19290,7 @@ package android.telephony.cdma {
|
||||
public class CdmaCellLocation extends android.telephony.CellLocation {
|
||||
ctor public CdmaCellLocation();
|
||||
ctor public CdmaCellLocation(android.os.Bundle);
|
||||
method public static double convertQuartSecToDecDegrees(int);
|
||||
method public void fillInNotifierBundle(android.os.Bundle);
|
||||
method public int getBaseStationId();
|
||||
method public int getBaseStationLatitude();
|
||||
|
||||
@@ -227,6 +227,22 @@ public class CdmaCellLocation extends CellLocation {
|
||||
this.mNetworkId == -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts latitude or longitude from 0.25 seconds (as defined in the
|
||||
* 3GPP2 C.S0005-A v6.0 standard) to decimal degrees
|
||||
*
|
||||
* @param quartSec latitude or longitude in 0.25 seconds units
|
||||
* @return latitude or longitude in decimal degrees units
|
||||
* @throws IllegalArgumentException if value is less than -2592000,
|
||||
* greater than 2592000, or is not a number.
|
||||
*/
|
||||
public static double convertQuartSecToDecDegrees(int quartSec) {
|
||||
if(Double.isNaN(quartSec) || quartSec < -2592000 || quartSec > 2592000){
|
||||
// Invalid value
|
||||
throw new IllegalArgumentException("Invalid coordiante value:" + quartSec);
|
||||
}
|
||||
return ((double)quartSec) / (3600 * 4);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user