Skip to main content
←API Reference ←NSDK ←NSDKVps2Session

Configuration

Configuration for the VPS2 session.

Declaration​

struct Configuration

Constructors​

init(universalLocalizationEnabled: Bool? = nil, universalLocalizationRequestsPerSecond: Float? = nil, vpsMapLocalizationEnabled: Bool? = nil, initialVpsRequestsPerSecond: Float? = nil, continuousVpsRequestsPerSecond: Float? = nil, geolocationSmoothingEnabled: Bool? = nil, deviceMapLocalizationEnabled: Bool? = nil, deviceMapLocalizationFramerate: Int32? = nil, universalLocalizationRequestTimeoutMs: Int32? = nil, maxRequestsInTransitPerTarget: UInt32? = nil, anchorDistanceGateMeters: Float? = nil, vpsDebuggerEnabled: Bool? = nil, blurDetectionEnabled: Bool? = nil, minSharpnessScore: Float? = nil, vpsDebuggerSavingFrameImageEnabled: Bool? = nil, assetTargetingEnterMarginMeters: Float? = nil, assetTargetingExitMarginMeters: Float? = nil, temporalFusionEnabled: Bool? = nil)

Properties​

NameTypeSummary
var 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 (100 meters geo-corrected, 200 meters GPS-only).
Use -1 to disable the distance check entirely.
var 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 (25 meters). Use a negative value for no margin,
judging the bounds exactly.
var 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 (50 meters). Use a negative value for no margin.
var blurDetectionEnabledBool
If true, enable the image blur check on the cloud localization path.
Advisory only: a frame whose sharpness score is below minSharpnessScore produces
a .frameFlagged localization request record (error .imageTooBlurry) so the app
can warn the user, but is still sent for localization, never rejected.
Default false (disabled).
var continuousVpsRequestsPerSecondFloat
Number of VPS localization requests per second to send the server while
successfully localized on a VPS map.
var deviceMapLocalizationEnabledBool
Device maps are created by the on-device mapping feature. They do not provide
a georeference.
var deviceMapLocalizationFramerateInt32
Number of times per second to attempt localization on available device maps.
var geolocationSmoothingEnabledBool
If true, geolocation smoothing is enabled.
var initialVpsRequestsPerSecondFloat
Number of VPS localiziation requests per second to send the server prior to first
successful localization on a VPS map.
var maxRequestsInTransitPerTargetUInt32
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).
var minSharpnessScoreFloat
Sharpness threshold below which a frame is flagged as too blurry.
Higher scores mean sharper images. The default 0.0 flags nothing, since the score is
always non-negative. Only used when blurDetectionEnabled is true.
var temporalFusionEnabledBool
If true, successive VPS localizations are temporally fused.
Fusion smooths the localization stream, at the cost of latency reacting to a genuine
pose change. Enabled by default; turn it off to see raw per-localization output.
var universalLocalizationEnabledBool
If true, universal localization is enabled.
Universal localization provides geographic positioning that works anywhere
without requiring pre-scanning.
var universalLocalizationRequestsPerSecondFloat
Number of requests per second to send the cloud for universal localization.
var universalLocalizationRequestTimeoutMsInt32
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).
var vpsDebuggerEnabledBool
If true, VPS debugger logging is enabled for this session.
var vpsDebuggerSavingFrameImageEnabledBool
If true, attach a small JPEG thumbnail of localize frames to VPS debugger
network request events. Requires vpsDebuggerEnabled.
var vpsMapLocalizationEnabledBool
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.