Class OutdoorLocationOptions
- All Implemented Interfaces:
android.os.Parcelable
LocationRequest, this data object configures the Global Mode (see LocationRequest for details) options: Outdoor positioning, Building Detector and Open Sky Detector parameters.
Outdoor Positioning in Situm SDK is mainly provided using the GPS signals (and other location providers made available by Android). Configuring the Outdoor Positioning options lets you, in many ways, configure
how Situm SDK reads and accesses to GPS signals. Relevant builder methods are: enableOutdoorPositions,
computeInterval, updateInterval,
minimumOutdoorLocationAccuracy.
Building Detector is a module that allows to configure how Situm SDK will detect the building where the user is (building detector strategy). Building detectors can set up by passing the
OutdoorLocationOptions.BuildingDetector data object to the Builder.buildingDetector method. Other relevant builder methods are
centerPositionInBuildingDuringTransition,
scansBasedDetectorAlwaysOn and
useGeofencesInBuildingSelector.
Open Sky Detector is a module that determines whether the user is "under roof" or "under open sky" based on the GPS signals received from each satellite. Specifically, it computes the SNR (Signal-Noise Ratio) of each satellite signal and determines that the user is "under roof" if the average SNR is below a (configurable) threshold, and "under open sky" otherwise. The rationale behind this is that in indoor spaces, building structures block GPS signals, therefore reducing the SNR value, while in outdoor spaces there is direct line of sight with the satellites, therefore increasing the SNR values. The typical SNR range of a satellite signal is in the [0, 40] dBm range, where:
- Typical indoor values are in the [0, 20] dBm range, where 0 dBm is the typical value under a thick roof, 10 dBm under a regular roof and 20 dBm under a glass roof.
- Typical outdoor values are in the [15, 40] dBm range, where 15 dBm is the typical when the user is outdoors but close or under elements that might block GPS signals (such as big buildings or trees), 25 the typical value under open sky. Values above 30 are rare * except for smartphone with a very good GPS chip.
These values should be taken as an approximate reference; they depend heavily on the smartphone quality and environment conditions. Relevant builder methods are:
enableOpenSkyDetector and
averageSnrThreshold
This object will be passed to the LocationRequest.Builder.outdoorLocationOptions method when building the LocationRequest. After that, you may start
positioning as always by calling the LocationManager.requestLocationUpdates.
Requirements. ACCESS_FINE_LOCATION permission is required when using Situm SDK in Global Mode. See LocationManager for details.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for theOutdoorLocationOptionsclass.static enumAllows to configure how Situm SDK will detect the building where the user is (building detector strategy). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final android.os.Parcelable.Creator<OutdoorLocationOptions>static final float(Open Sky Detector only) Default GPS SNR (Signal-To-Noise Ratio) average value (in dBm) of methodOutdoorLocationOptions.Builder.averageSnrThreshold.static final float(Open Sky Detector only) Default GPS SNR (Signal-To-Noise Ratio) average value (in dBm) that can be passed to methodOutdoorLocationOptions.Builder.averageSnrThreshold.static final float(Open Sky Detector only) Minimum GPS SNR (Signal-To-Noise Ratio) average value (in dBm) that can be passed to methodOutdoorLocationOptions.Builder.averageSnrThreshold.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Method Summary
Modifier and TypeMethodDescriptionGets whetherOutdoorLocationOptions.Builder.centerPositionInBuildingDuringTransition(boolean)has been set to true.intDeprecated.This feaure is not supported from Android 12 onward, and will be removed in future SDK versions.booleanDeprecated.This feaure is not supported from Android 12 onward, and will be removed in future SDK versions.Gets the interval (in milliseconds) set inOutdoorLocationOptions.Builder.computeInterval(int).Gets the minimum accuracy value set inOutdoorLocationOptions.Builder.minimumOutdoorLocationAccuracy(int).Gets the interval (in milliseconds) set inOutdoorLocationOptions.Builder.updateInterval(int).inthashCode()Gets whetherOutdoorLocationOptions.Builder.enableOutdoorPositions(boolean)has been set to true.Gets whetherOutdoorLocationOptions.Builder.scansBasedDetectorAlwaysOn(boolean)has been set to true.Deprecated.toString()Gets whetherOutdoorLocationOptions.Builder.useGeofencesInBuildingSelector(boolean)has been set to true.voidwriteToParcel(android.os.Parcel dest, int flags)
-
Field Details
-
MIN_SNR
public static final float MIN_SNR(Open Sky Detector only) Minimum GPS SNR (Signal-To-Noise Ratio) average value (in dBm) that can be passed to methodOutdoorLocationOptions.Builder.averageSnrThreshold. This value is 10.- See Also:
-
MAX_SNR
public static final float MAX_SNR(Open Sky Detector only) Default GPS SNR (Signal-To-Noise Ratio) average value (in dBm) that can be passed to methodOutdoorLocationOptions.Builder.averageSnrThreshold. This value is 40.- See Also:
-
DEFAULT_SNR
public static final float DEFAULT_SNR(Open Sky Detector only) Default GPS SNR (Signal-To-Noise Ratio) average value (in dBm) of methodOutdoorLocationOptions.Builder.averageSnrThreshold. This value is 28.- See Also:
-
CREATOR
-
-
Method Details
-
getAverageSnrThreshold
Deprecated.This feaure is not supported from Android 12 onward, and will be removed in future SDK versions.Gets the average SNR value set inOutdoorLocationOptions.Builder.averageSnrThreshold(float).- Returns:
- the average SNR value set in
OutdoorLocationOptions.Builder.averageSnrThreshold(float).
-
overrideSnrServervalue
Deprecated. -
isScansBasedDetectorAlwaysOn
Gets whetherOutdoorLocationOptions.Builder.scansBasedDetectorAlwaysOn(boolean)has been set to true.- Returns:
- true if
OutdoorLocationOptions.Builder.scansBasedDetectorAlwaysOn(boolean)has been set to true.
-
centerPositionInBuildingDuringTransition
Gets whetherOutdoorLocationOptions.Builder.centerPositionInBuildingDuringTransition(boolean)has been set to true.- Returns:
- true if
OutdoorLocationOptions.Builder.centerPositionInBuildingDuringTransition(boolean)has been set to true.
-
getMinimumOutdoorLocationAccuracy
Gets the minimum accuracy value set inOutdoorLocationOptions.Builder.minimumOutdoorLocationAccuracy(int).- Returns:
- the minimum accuracy value set in
OutdoorLocationOptions.Builder.minimumOutdoorLocationAccuracy(int).
-
isOutdoorPositionsEnabled
Gets whetherOutdoorLocationOptions.Builder.enableOutdoorPositions(boolean)has been set to true.- Returns:
- true if
OutdoorLocationOptions.Builder.enableOutdoorPositions(boolean)has been set to true.
-
useGeofencesInBuildingSelector
Gets whetherOutdoorLocationOptions.Builder.useGeofencesInBuildingSelector(boolean)has been set to true.- Returns:
- true if
OutdoorLocationOptions.Builder.useGeofencesInBuildingSelector(boolean)has been set to true.
-
enableOpenSkyDetector
Deprecated.This feaure is not supported from Android 12 onward, and will be removed in future SDK versions.Gets whetherOutdoorLocationOptions.Builder.enableOpenSkyDetector(boolean)has been set to true.- Returns:
- true if
OutdoorLocationOptions.Builder.enableOpenSkyDetector(boolean)has been set to true.
-
getBuildingDetector
Gets theOutdoorLocationOptions.BuildingDetectorset byOutdoorLocationOptions.Builder.buildingDetector(OutdoorLocationOptions.BuildingDetector).- Returns:
- the
OutdoorLocationOptions.BuildingDetectorinstance.
-
getUpdateInterval
Gets the interval (in milliseconds) set inOutdoorLocationOptions.Builder.updateInterval(int).- Returns:
- the interval (in milliseconds) set in
OutdoorLocationOptions.Builder.updateInterval(int).
-
getComputeInterval
Gets the interval (in milliseconds) set inOutdoorLocationOptions.Builder.computeInterval(int).- Returns:
- the interval (in milliseconds) set in
OutdoorLocationOptions.Builder.computeInterval(int).
-
equals
-
hashCode
public int hashCode() -
toString
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-