# XRVps2Subsystem Source: https://www.nianticspatial.com/docs/api/unity/NianticSpatial.NSDK.AR.XRSubsystems.XRVps2Subsystem/ XRVps2Subsystem > extends UnityEngine.SubsystemsImplementation.SubsystemWithProvider --- ## Declaration public class XRVps2Subsystem : SubsystemWithProvider ## Summary The subsystem owning the VPS2 feature's lifecycle: configuration, localization, and geolocation. Anchors and asset origins are served by the XRVps2AnchorSubsystem and XRVps2AssetSubsystem trackable subsystems, which run against the feature this subsystem manages. --- ## Constructors public XRVps2Subsystem() --- ## Properties | Name | Type | Summary | | --- | --- | --- | | AnchorDistanceGateMeters | float | 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. Pass 0 to use the default value (100 meters geo-corrected, 200 meters GPS-only). Pass -1 to disable the distance check entirely. | | AssetTargetingEnterMarginMeters | float | 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. Pass 0 to use the default value (25 meters). Pass a negative value for no margin, judging the bounds exactly. | | AssetTargetingExitMarginMeters | float | 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. Pass 0 to use the default value (50 meters). Pass a negative value for no margin. | | BlurDetectionEnabled | bool | 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). | | ContinuousVpsRequestsPerSecond | float | Number of VPS localization requests per second to send the server while successfully localized on a VPS map. | | DeviceMapLocalizationEnabled | bool | If true, localization on device maps is enabled. Device maps are created by the on-device mapping feature. They do not provide a georeference. | | DeviceMapLocalizationFramerate | int | Number of times per second to attempt localization on available device maps. | | GeolocationSmoothingEnabled | bool | If true, enables smooth interpolation between VPS2 localization updates. As VPS2 updates its estimate from one localization to another, having interpolation enabled will provide a more stable experience, especially when GPS or compass readings update abruptly. | | InitialVpsRequestsPerSecond | float | Number of VPS localization requests per second to send the server prior to the first successful localization on a VPS map. | | MaxRequestsInTransitPerTarget | uint | Maximum number of concurrent localization requests per target. Limits how many in-flight cloud localization requests can be active for a single target simultaneously. Pass 0 to use the default value (2). | | MinSharpnessScore | float | Sharpness threshold below which a frame is flagged as too blurry. Higher scores mean sharper images. The default 0 flags nothing, since the score is always non-negative. Only used when BlurDetectionEnabled is true. | | TemporalFusionEnabled | bool | 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. | | UniversalLocalizationEnabled | bool | If true, universal localization is enabled. Universal localization provides geographic positioning that works anywhere without requiring pre-scanned maps. | | UniversalLocalizationRequestsPerSecond | float | Number of requests per second to send the cloud for universal localization. | | UniversalLocalizationRequestTimeoutMs | int | Timeout in milliseconds for universal localization requests. Responses in uncached areas may take 60+ seconds; subsequent requests are typically under 1 second. Pass 0 to use the default value (90000 ms). | | VpsDebuggerEnabled | bool | If true, enable the VPS Debugger, which will log VPS2 related internal events to diagnose VPS2 tracking behavior and issues. | | VpsDebuggerSavingFrameImageEnabled | bool | If true (and VpsDebuggerEnabled), attach a 180x135 JPEG thumbnail of each camera frame submitted with a VPS map localization request to the VPS debugger data. | | VpsMapLocalizationEnabled | bool | If true, localization on VPS maps 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. | --- ## Methods | Name | Type | Summary | | --- | --- | --- | | GetDeviceGeolocation | XRVps2Geolocation | Get the geolocation of the device's last known camera pose. | | GetLatestDebuggerData | List | Get all the debugger data since the last time this method was called. | | GetLatestLocalization | XRVps2Localization | Get the latest VPS2 localization. The localization contains the metadata required to perform bidirectional conversions between the application's AR tracking space and the global coordinate system (lat/lng/alt/heading). | | GetLatestLocalizationRequestRecords | List | Get all the network request records since the last time this method was called. | | GetPose | XRVps2Pose | Convert a position and orientation in the global coordinate system to a pose in the device's AR tracking space. | | GetSessionId | bool | Get the session id, if one exists. | | TryGetAssetTrackingData | bool | Gets the pose of a VPS asset's origin in the device's AR tracking space. | | TryGetPose | bool | Convert a position and orientation in the global coordinate system to a pose in the device's AR tracking space, using the latest VPS2 localization. | | TryLocalize | bool | Requests localization to a site, identified by its site ID. | --- ## Relationships derived: NsdkVps2Subsystem