Package com.skyhookwireless.wps
Class WPSLocation
- java.lang.Object
-
- com.skyhookwireless.wps.Location
-
- com.skyhookwireless.wps.WPSLocation
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class WPSLocation extends Location implements java.lang.Cloneable, java.io.Serializable
Location with WPS specific attributes- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WPSLocation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WPSLocationclone()doublegetAGL()doublegetAGLError()doublegetAGLError(int confidence)doublegetBearing()doublegetBearingError()doublegetElevation()java.util.Map<java.lang.String,?>getExtras()intgetHistoricalLocationCount()intgetHPE()intgetHPE(int confidence)java.lang.StringgetIp()intgetNAP()intgetNCell()intgetNLac()intgetNSat()floatgetScore()longgetServerTimestamp()doublegetSpeed()doublegetSpeedError()StreetAddressgetStreetAddress()TimeZonegetTimeZone()VenuegetVenue()floatgetVPE()floatgetVPE(int confidence)booleanhasAGL()booleanhasAGLError()booleanhasBearing()booleanhasBearingError()booleanhasElevation()booleanhasExtras()booleanhasHistoricalLocationCount()booleanhasHPE()booleanhasIp()booleanhasNAP()booleanhasNCell()booleanhasNLac()booleanhasNSat()booleanhasScore()booleanhasServerTimeStamp()booleanhasSpeed()booleanhasSpeedError()booleanhasStreetAddress()booleanhasTimeZone()booleanhasVenue()booleanhasVPE()booleanisNull()voidsetAGL(double agl)voidsetAGLError(double aglError)voidsetBearing(double bearing)voidsetBearingError(double bearingError)voidsetElevation(double elevation)voidsetExtras(java.util.Map<java.lang.String,?> extras)voidsetHistoricalLocationCount(int nloc)voidsetHPE(int hpe)voidsetNAP(int nap)voidsetNCell(int ncell)voidsetNLac(int nlac)voidsetNSat(int nsat)voidsetScore(float score)voidsetSpeed(double speed)voidsetSpeedError(double speedError)voidsetStreetAddress(StreetAddress address)voidsetTimeZone(TimeZone timeZone)voidsetVenue(Venue venue)voidsetVPE(float vpe)java.lang.StringtoString()booleanwithIP()-
Methods inherited from class com.skyhookwireless.wps.Location
getAltitude, getLatitude, getLongitude, getTime, hasAltitude, hasLatitude, hasLongitude, hasTime, setAltitude, setLatitude, setLongitude, setTime
-
-
-
-
Method Detail
-
getHPE
public int getHPE()
- Returns:
- A calculated error estimate (horizontal positioning error)
of the location result in meters.
Since 5.0 this value is defined as the radius of 68% confidence.
-
getHPE
public int getHPE(int confidence)
- Parameters:
confidence- desired confidence level for the error estimate: 68%, 90% or 95%- Returns:
- A calculated error estimate (horizontal positioning error) of the location result in meters.
- Since:
- 5.11
-
hasHPE
public boolean hasHPE()
- Returns:
trueif horizontal positioning error is available- Since:
- 5.0
-
setHPE
public void setHPE(int hpe)
- Since:
- 5.0
-
getVPE
public float getVPE()
- Returns:
- A calculated error estimate (vertical positioning error) of the altitude value in meters.
- Since:
- 5.0
-
getVPE
public float getVPE(int confidence)
- Parameters:
confidence- desired confidence level for the error estimate: 68%, 90% or 95%- Returns:
- A calculated error estimate (vertical positioning error) of the altitude value in meters.
- Since:
- 5.11
-
hasVPE
public boolean hasVPE()
- Returns:
trueif vertical positioning error is available- Since:
- 5.0
-
setVPE
public void setVPE(float vpe)
- Since:
- 5.0
-
getElevation
public double getElevation()
- Returns:
- Elevation above mean sea level (MSL) in meters
- Since:
- 5.11
-
hasElevation
public boolean hasElevation()
- Returns:
trueif elevation is available- Since:
- 5.11
-
setElevation
public void setElevation(double elevation)
- Since:
- 5.11
-
getAGL
public double getAGL()
- Returns:
- height above ground level in meters
- Since:
- 5.11
-
hasAGL
public boolean hasAGL()
- Returns:
trueif above ground level height is available- Since:
- 5.11
-
setAGL
public void setAGL(double agl)
- Since:
- 5.11
-
getAGLError
public double getAGLError()
- Returns:
- Calculated error estimate of the above ground level height value in meters
- Since:
- 5.11
-
getAGLError
public double getAGLError(int confidence)
- Parameters:
confidence- desired confidence level for the error estimate: 68%, 90% or 95%- Returns:
- Calculated error estimate of the above ground level height value in meters
- Since:
- 5.11
-
hasAGLError
public boolean hasAGLError()
- Returns:
trueif AGL error is available- Since:
- 5.11
-
setAGLError
public void setAGLError(double aglError)
- Since:
- 5.11
-
getScore
public float getScore()
- Returns:
- location score -- a number between 0 (very low score, highly
suspect location) and 10 (very high score, highly trusted
location).
Note that this value is valid only when
hasScore()returns true. - Since:
- 4.8
-
hasScore
public boolean hasScore()
- Returns:
trueif the score was calculated- Since:
- 4.8
-
setScore
public void setScore(float score)
- Since:
- 5.0
-
getNAP
public int getNAP()
- Returns:
- The number of access-point used to calculate this location.
-
hasNAP
public boolean hasNAP()
- Returns:
trueif number of access points used for location is available- Since:
- 5.0
-
setNAP
public void setNAP(int nap)
- Since:
- 5.0
-
getNSat
public int getNSat()
- Returns:
- The number of satellites used to calculate this location.
-
hasNSat
public boolean hasNSat()
- Returns:
trueif number of satellites used for location is available- Since:
- 5.0
-
setNSat
public void setNSat(int nsat)
- Since:
- 5.0
-
getNCell
public int getNCell()
- Returns:
- The number of cell towers used to calculate this location.
-
hasNCell
public boolean hasNCell()
- Returns:
trueif number of cell towers used for location is available- Since:
- 5.0
-
setNCell
public void setNCell(int ncell)
- Since:
- 5.0
-
getNLac
public int getNLac()
- Returns:
- The number of unique location area codes used to calculate this location.
-
hasNLac
public boolean hasNLac()
- Returns:
trueif number of unique location area codes used for location is available- Since:
- 5.0
-
setNLac
public void setNLac(int nlac)
- Since:
- 5.0
-
getHistoricalLocationCount
public int getHistoricalLocationCount()
- Returns:
- The number of previous locations used to corroborate this location.
- Since:
- 4.8
-
hasHistoricalLocationCount
public boolean hasHistoricalLocationCount()
- Since:
- 5.0
-
setHistoricalLocationCount
public void setHistoricalLocationCount(int nloc)
- Since:
- 5.0
-
withIP
public boolean withIP()
- Returns:
trueif the IP address of the client making the request was used to confirm the location, orfalseotherwise- Since:
- 4.8
-
getServerTimestamp
public long getServerTimestamp()
- Returns:
- The timestamp (number of seconds since unix epoch) of this location
calculated using the time at Skyhook's server. This timestamp is
calculated on Skyhook's servers at the time the request is received,
and does not account for the network round-trip or the local time of
the device.
Note that this value is valid only when
hasServerTimeStamp()returns true. - Since:
- 4.9.1
-
hasServerTimeStamp
public boolean hasServerTimeStamp()
- Returns:
trueif the server timestamp was calculated- Since:
- 4.9.1
-
getIp
public java.lang.String getIp()
- Returns:
- IP Address as received by Skyhook's servers or
nullotherwise. The presence of an IP address does not imply thatwithIPis true. Note that this value is valid only whenhasScore()returns true. - Since:
- 4.9.1
-
hasIp
public boolean hasIp()
- Returns:
trueif IP address is available- Since:
- 5.0
-
getSpeed
public double getSpeed()
- Returns:
- A calculated estimate of speed in meters per second.
Note that prior to 5.0 this value was in kilometers per second.
-
hasSpeed
public boolean hasSpeed()
- Returns:
trueif speed is available- Since:
- 5.0
-
setSpeed
public void setSpeed(double speed)
- Since:
- 5.0
-
getSpeedError
public double getSpeedError()
- Returns:
- A calculated error estimate of speed in meters per second.
- Since:
- 5.0
-
hasSpeedError
public boolean hasSpeedError()
- Returns:
trueif speed error is available- Since:
- 5.0
-
setSpeedError
public void setSpeedError(double speedError)
- Since:
- 5.0
-
getBearing
public double getBearing()
- Returns:
- A calculated estimate of bearing as degree from north clockwise (+90 is East).
-
hasBearing
public boolean hasBearing()
- Returns:
trueif bearing is available- Since:
- 5.0
-
setBearing
public void setBearing(double bearing)
- Since:
- 5.0
-
getBearingError
public double getBearingError()
- Returns:
- A calculated error estimate of bearing in degrees.
- Since:
- 5.0
-
hasBearingError
public boolean hasBearingError()
- Returns:
trueif bearing error is available- Since:
- 5.0
-
setBearingError
public void setBearingError(double bearingError)
- Since:
- 5.0
-
getStreetAddress
public StreetAddress getStreetAddress()
- Returns:
- The physical street address,
only returned when the
WPSStreetAddressLookupparameter is set toWPS_LIMITED_STREET_ADDRESS_LOOKUPorWPS_FULL_STREET_ADDRESS_LOOKUP.
-
hasStreetAddress
public boolean hasStreetAddress()
- Returns:
trueif street address information is available- Since:
- 5.0
-
setStreetAddress
public void setStreetAddress(StreetAddress address)
-
hasVenue
public boolean hasVenue()
- Returns:
trueif venue information is available- Since:
- 5.13
-
getVenue
public Venue getVenue()
- Returns:
- Venue information
- Since:
- 5.13
-
setVenue
public void setVenue(Venue venue)
- Since:
- 5.13
-
getTimeZone
public TimeZone getTimeZone()
- Returns:
- time zone information,
only returned when the
timeZoneLookupparameter is set totrue. - Since:
- 5.0
-
hasTimeZone
public boolean hasTimeZone()
- Returns:
trueif time zone information is available- Since:
- 5.0
-
setTimeZone
public void setTimeZone(TimeZone timeZone)
- Since:
- 5.0
-
hasExtras
public boolean hasExtras()
- Returns:
trueif extra attributes are available- Since:
- 5.7
-
setExtras
public void setExtras(java.util.Map<java.lang.String,?> extras)
- Since:
- 5.7
-
getExtras
public java.util.Map<java.lang.String,?> getExtras()
- Returns:
- Extra attributes
- Since:
- 5.7
-
isNull
public boolean isNull()
-
clone
public WPSLocation clone()
-
-