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

Vps2Localization


Declaration​

data class Vps2Localization

Summary​

Spatial mapping between the device's AR tracking space and real-world geolocation, as determined by VPS2. This relates two origins: the AR tracking space origin (where the AR session started) and a geographic reference point. It is not relative to the current camera pose, and does not change as the device moves; it changes only when VPS2 refines or replaces its localization. To convert a specific pose or geolocation, pass it to [Vps2Session.getPose] or [Vps2Session.getGeolocation]. All distances are in meters. If [trackingState] is [Vps2TrackingState.UNAVAILABLE], conversions are invalid and native conversion APIs will throw NsdkInvalidOperationStatusException.


Constructors​

constructor(trackingStateValue: Int, referenceLatitudeDegrees: Double, referenceLongitudeDegrees: Double, referenceAltitudeMetres: Double, trackingToRelativeLonNegAltLat: DoubleArray, localizedSiteId: String = "", localizedAssetId: String = "", localizedAreaId: String = "")

Parameters​

NameTypeSummary
trackingStateValueInt
-
referenceLatitudeDegreesDouble
-
referenceLongitudeDegreesDouble
-
referenceAltitudeMetresDouble
-
trackingToRelativeLonNegAltLatDoubleArray
-
localizedSiteIdString
-
localizedAssetIdString
-
localizedAreaIdString
-

Properties​

NameTypeSummary
isAvailableBoolean
-
localizedAssetVps2LocalizedAsset?
The VPS asset the device is localized to, or null before any visual localization has
succeeded against a submitted asset.
The device is anchored to one asset at a time; this changes when it localizes against a
different asset. It is independent of [trackingState], which describes the geolocation
estimate: an asset with no georeference still reports here while tracking stays coarse.
trackingStateVps2TrackingState
The state of VPS2 tracking. The other fields in this class are
only valid if the tracking state is not [Vps2TrackingState.UNAVAILABLE].