LocalizationResult
Overview
LocalizationResult is delivered to onLocalizationSuccess(result:) when a pose is returned and accepted. It carries the computed pose that the SDK applied, the raw server values behind it, and optional geographic data.
Properties
mapCode
String
The map code where localization succeeded
mapCodes
[String]
All map codes returned, which may be several for a MapSet
position
SIMD3<Float>
Computed position in AR world coordinates
rotation
simd_quatf
Computed rotation in AR world coordinates
confidence
Float?
Confidence score of the localization (0.0 to 1.0)
geoCoordinates
GeoCoordinates?
Geographic position, when geoCoordinatesInResponse is enabled
geoPose
GeoPose?
Full geographic pose, including orientation, when geoCoordinatesInResponse is enabled
estimatedPosition
SIMD3<Float>?
Raw camera position the server returned, in the map frame
estimatedRotation
simd_quatf?
Raw camera rotation the server returned, in the map frame
queryCameraPosition
SIMD3<Float>?
AR camera position that produced this fix, in the AR session frame
queryCameraRotation
simd_quatf?
AR camera rotation that produced this fix, in the AR session frame
timestamp
Date
When the result was produced
mode
LocalizationMode
The localization mode used
Computed pose versus raw pose
position and rotation are the computed pose: the transform between the AR session frame and the map frame, which is what the SDK applies to the scene. This is the pair almost every app wants.
estimatedPosition / estimatedRotation and queryCameraPosition / queryCameraRotation are the untransformed inputs the computed pose was derived from. They are exposed for diagnostics, for logging a fix faithfully, and for apps that need to recompute the transform themselves.
GeoCoordinates
Geographic position of the localized pose. Populated only when geoCoordinatesInResponse is enabled and the map is georeferenced in the portal.
latitude
Double
WGS-84 latitude
longitude
Double
WGS-84 longitude
altitude
Double
Altitude in metres
GeoPose
The full geographic pose the server returns when geoCoordinatesInResponse is enabled. GeoCoordinates carries only the position and is kept for existing integrations. GeoPose additionally exposes the orientation quaternion and the frame specification, which is what you need to draw a heading or record a pose faithfully.
Every field is optional, because the server may omit the block or any part of it.
frameModel
String?
The geodetic model, for example "WGS-84"
frameName
String?
The local tangent frame, for example "Y-Up-ENU". Needed to read quaternion as a compass heading
position
GeoPose.Position?
Geographic position in the frame named by frameName
quaternion
GeoPose.Quaternion?
Orientation within that frame
GeoPose.Position
latitude
Double
longitude
Double
altitude
Double
GeoPose.Quaternion
x
Float
y
Float
z
Float
w
Float
Supporting Enums
LocalizationMode
.singleFrame
Single frame capture, quick but lower accuracy
.multiFrame
Multi-frame capture, slower but higher accuracy
QueryMode
Applies to single-frame localization only. See Query Mode.
.vps1
Standard matching. Fastest response, best for well-mapped areas
.vps2
Deep search. Slower, but recovers a pose in harder or sparsely mapped areas
TrackingState
.tracking
AR tracking is working normally
.paused
AR tracking is temporarily paused
.stopped
AR tracking has stopped
Related
Last updated
Was this helpful?

