Skip to main content
←API Reference ←com.nianticspatial.nsdk

Vps2Config

Configuration structure for the VPS2 session.

Declaration​

class Vps2Config

See also​

  • Vps2Session.configure

Constructors​

constructor(enableUniversalLocalization: Boolean = false, universalLocalizationRequestsPerSecond: Float = 1.0f, enableVpsMapLocalization: Boolean = true, initialVpsRequestsPerSecond: Float = 1.0f, continuousVpsRequestsPerSecond: Float = 0.2f, enableGeolocationSmoothing: Boolean = true, enableDeviceMapLocalization: Boolean = false, deviceMapLocalizationFramerate: Int = 10, universalLocalizationRequestTimeoutMs: Int = 90000, maxRequestsInTransitPerTarget: Int = 0, anchorDistanceGateMeters: Float = 0f, enableVpsDebugger: Boolean = false, enableBlurDetection: Boolean = false, minSharpnessScore: Float = 0f, enableVpsDebuggerSavingFrameImage: Boolean = false, areaTargetingEnterMarginMeters: Float = 0f, areaTargetingExitMarginMeters: Float = 0f, enableTemporalFusion: Boolean = true, enableAerialLocalization: Boolean = false)

Parameters​

NameTypeSummary
enableUniversalLocalizationBoolean
-
universalLocalizationRequestsPerSecondFloat
-
enableVpsMapLocalizationBoolean
-
initialVpsRequestsPerSecondFloat
-
continuousVpsRequestsPerSecondFloat
-
enableGeolocationSmoothingBoolean
-
enableDeviceMapLocalizationBoolean
-
deviceMapLocalizationFramerateInt
-
universalLocalizationRequestTimeoutMsInt
-
maxRequestsInTransitPerTargetInt
-
anchorDistanceGateMetersFloat
-
enableVpsDebuggerBoolean
-
enableBlurDetectionBoolean
-
minSharpnessScoreFloat
-
enableVpsDebuggerSavingFrameImageBoolean
-
areaTargetingEnterMarginMetersFloat
-
areaTargetingExitMarginMetersFloat
-
enableTemporalFusionBoolean
-
enableAerialLocalizationBoolean
-

Properties​

NameTypeSummary
anchorDistanceGateMetersFloat
Distance gate in meters for anchor candidate filtering when geo-corrected.
Nodes farther than this distance from the device are skipped during anchor localization.
When only GPS is available (no geo-correction), the effective gate is 2x this value.
Use 0 to apply the default value (100m geo-corrected, 200m GPS-only).
Use -1 to disable the distance check entirely.
Default: 0 (uses native default of 100m geo-corrected / 200m GPS-only)
areaTargetingEnterMarginMetersFloat
How far outside a VPS asset's geographic bounds the device can be and still start localizing
against that area, in meters.
Covers ordinary GPS error, so a device standing just outside an area still picks it up. An
area the server published no bounds for is always a candidate. Use 0 to apply the default
value (25m). Use a negative value for no margin, judging the bounds exactly.
Default: 0f (uses native default of 25m)
areaTargetingExitMarginMetersFloat
How far outside its bounds an area already being localized against is kept, in meters.
Larger than [areaTargetingEnterMarginMeters] on purpose: the gap between the two is what stops
a device sitting on the boundary between two areas swapping between them on every position
update. A value below the enter margin is raised to it. Use 0 to apply the default value (50m).
Use a negative value for no margin.
Default: 0f (uses native default of 50m)
continuousVpsRequestsPerSecondFloat
Number of VPS localization requests per second to send the server while successfully
localized on a VPS map.
Default: 0.2f (native default)
deviceMapLocalizationFramerateInt
Number of times per second to attempt localization on available device maps.
Default: 10 (native default)
enableAerialLocalizationBoolean
If true, universal localization can localize in areas that have been mapped by a drone or
other aerial capture. Requires [enableUniversalLocalization].
There is currently no way to query aerial coverage; contact Niantic Spatial for details.
Default: false
enableBlurDetectionBoolean
If true, enable the image blur check on the cloud localization path.
Advisory only: a frame whose sharpness score is below [minSharpnessScore] produces a
FRAME_FLAGGED localization request record (error IMAGE_TOO_BLURRY) so the app can warn
the user, but is still sent for localization, never rejected.
Default: false (disabled)
enableDeviceMapLocalizationBoolean
If true, localization on device maps is enabled.
Device maps are created by the on-device mapping feature. They do not provide
a georeference.
Default: false (native default)
enableGeolocationSmoothingBoolean
If true, geolocation smoothing is enabled.
Default: true (native default)
enableTemporalFusionBoolean
If true, successive VPS localizations are temporally fused.
Fusion smooths the localization stream, at the cost of latency reacting to a genuine pose
change. Turn it off to see raw per-localization output.
Default: true (native default)
enableUniversalLocalizationBoolean
If true, universal localization is enabled.
Universal localization provides geographic positioning that works anywhere without requiring
pre-scanned maps.
Default: false
enableVpsDebuggerBoolean
If true, VPS debugger logging is enabled for this session.
Default: false (native default)
enableVpsDebuggerSavingFrameImageBoolean
If true, attach a small JPEG thumbnail of localize frames to VPS debugger
network request events. Requires [enableVpsDebugger].
Default: false (native default)
enableVpsMapLocalizationBoolean
If true, VPS map localization is enabled.
VPS maps only exist in pre-scanned areas. Your device must be localized on a VPS map in order
for VPS anchors to be placed with high accuracy.
Default: true (native default)
initialVpsRequestsPerSecondFloat
Number of VPS localization requests per second to send the server prior to the first
successful localization on a VPS map.
Default: 1.0f (native default)
maxRequestsInTransitPerTargetInt
Maximum number of concurrent localization requests per target.
Limits how many in-flight cloud localization requests can be active for a single target
simultaneously. Use 0 to apply the default value (2).
Default: 0 (uses native default of 2)
minSharpnessScoreFloat
Sharpness threshold below which a frame is flagged as too blurry.
Higher scores mean sharper images. Only used when [enableBlurDetection] is true.
Default: 0.0f (flags nothing, since the score is always non-negative)
universalLocalizationRequestsPerSecondFloat
Number of requests per second to send to server for universal localization.
Default: 1.0f (native default)
universalLocalizationRequestTimeoutMsInt
Timeout in milliseconds for universal localization requests.
Responses in uncached areas may take 60+ seconds; subsequent requests are typically under
1 second. Use 0 to apply the default value (90000 ms).
Default: 90000 (90 seconds)