Skip to main content
API Reference com.nianticspatial.nsdk

WPSLocation

Contains world positioning data from the WPS (World Positioning System). WPSLocation provides global positioning information that combines GPS/GNSS data with visual positioning for enhanced accuracy and reliability. ### Overview WPS location data includes: - Reference GPS coordinates (latitude, longitude, altitude) - Transformation matrix for coordinate conversions - Status information about positioning quality ### Example kotlin val result = wpsSession.getLatestLocation() when (result) { is ARDKResult.Success -> { val location = result.value println("GPS Coordinates: ${location.referenceLatitudeDegrees}, ${location.referenceLongitudeDegrees}") println("Altitude: ${location.referenceAltitudeMetres} meters") // Use the transformation matrix for coordinate conversions val worldPosition = location.trackingToRelativeEdn placeARContent(worldPosition) } is ARDKResult.Error -> { println("WPS error: ${result.code}") } }

Declaration

data class WPSLocation

Properties

NameTypeSummary
referenceAltitudeMetresDouble
Reference altitude in meters above sea level. This represents the GPS altitude of the reference point used for WPS positioning calculations.
referenceLatitudeDegreesDouble
Reference latitude in degrees (WGS84 coordinate system). This represents the GPS latitude of the reference point used for WPS positioning calculations.
referenceLongitudeDegreesDouble
Reference longitude in degrees (WGS84 coordinate system). This represents the GPS longitude of the reference point used for WPS positioning calculations.
trackingToRelativeEdnPose
Transformation matrix from tracking to relative coordinate system. This transformation matrix converts between the tracking coordinate system and the relative coordinate system used for AR content placement.