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

Vps2Config

Configuration structure for the VPS2 session.

Declaration​

class Vps2Config

See also​

  • Vps2Session.configure

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)
assetTargetingEnterMarginMetersFloat
How far outside a VPS asset's geographic bounds the device can be and still start localizing
against that asset, in meters.
Covers ordinary GPS error, so a device standing just outside an asset still picks it up. An
asset 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)
assetTargetingExitMarginMetersFloat
How far outside its bounds an asset already being localized against is kept, in meters.
Larger than [assetTargetingEnterMarginMeters] on purpose: the gap between the two is what stops
a device sitting on the boundary between two assets 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)
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 (native default is applied if you leave this unset/zeroed).
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)