VPSConfig
Configuration structure for the VPS session. VPSConfig allows you to customize VPS behavior including localization frequency, quality settings, and advanced features like temporal fusion. Use this class to optimize VPS performance for your specific use case. ### Usage
kotlin val config = VPSConfig( enableContinuousLocalization = true, cloudInitialRequestsPerSecond = 2.0f, jpegCompressionQuality = 80 ) vpsSession.configure(config) Declaration
class VPSConfigProperties
| Name | Type | Summary |
|---|---|---|
| cloudContinuousRequestsPerSecond | Float | |
| cloudInitialRequestsPerSecond | Float | Defines the number of localization requests per second which are sent to the VPS server prior to the first successful localization. This is 1.0f in the default configuration. Default: 1.0f Range: 0.1f - 5.0f (recommended) |
| enableContinuousLocalization | Boolean | Whether to enable continuous localization. This will continuously send localization requests to the VPS server even after the first successful localization response has been received. These results will help refine the position of the anchor over time. This will also help mitigate AR tracking drift. Attention: This will increase the bandwidth used by the VPS feature. Attention: This will also cause anchored objects to move in the scene as their positions are refined. Attention: This is disabled in the default configuration. See cloudContinuousRequestsPerSecond to define the frequency of the requests. Default: false |
| enableDeviceMapLocalization | Boolean | Enables localization against device-created maps. When enabled, VPS will attempt to localize against maps created locally by the mapping feature in addition to Niantic's cloud maps. This enables localization in areas without cloud VPS coverage. Default: false Requires: Mapping feature to have created a local map |
| enableGpsCorrectionForContinuousLocalization | Boolean | Whether to enable GPS correction for continuous localization. This will download additional GPS graph data from the VPS server to help correct the GPS location of the device. This is useful for refining device GPS location after localization. Default: true |
| enableInterpolation | Boolean | Whether to enable interpolation. This will interpolate the position of the anchor over time to provide a smoother result. Anchor updates will be surfaced as sequential smooth updates rather than a single update at the latest localization result. Attention: This is disabled in the default configuration. Default: false |
| enableTemporalFusion | Boolean | Whether to enable temporal fusion. This will combine the results of successive localizations over time to provide a more stable result. This will help mitigate AR tracking drift. This requires that continuous localization is enabled. Enabling temporal fusion will generate more stable results, but it will also take longer to resolve tracking drift compared to only taking the latest localization result. Attention: This is disabled in the default configuration. Default: false Requires: [enableContinuousLocalization] = true |
| enableVPSDebugger | Boolean | Enable VPS Debugger. When enabled, more detailed internal VPS related events are logged into a file as well as accessing through the getter API. (Beta feature) Default: false |
| jpegCompressionQuality | Int | Defines the quality of the JPEG compression used for the camera image sent to the VPS server as part of a localization request. Lower values will result in lower bandwidth usage. We have benchmarked that 50-90 quality for jpeg compression does not significantly impact the accuracy of the localization results. This is 70 in the default configuration. Default: 70 Range: 1 (lowest quality) - 100 (highest quality) Recommended: 50-90 for good balance of quality and bandwidth |
0.2fRange: 0.1f - 1.0f (recommended) Requires: [enableContinuousLocalization] = true