getGeolocation
Declaration
fun getGeolocation(pose: Pose): Vps2GeolocationData?
Summary
Returns
The latitude, longitude, altitude, heading and orientation of pose (with its tracking state and accuracy), or null if VPS2 has not localized yet.
Throws
NsdkInvalidArgumentStatusException— ifposehas a non-finite component or a zero-length rotation.
Parameters
| Name | Type | Summary |
|---|---|---|
| pose | Pose | - |
Convert an AR pose to a geolocation using the latest localization. The inverse of
getPose.posecan be any pose in AR tracking space (ARCore's coordinate convention, inmeters), not just the camera's.
The heading is the direction of the pose's forward axis projected onto the horizontal
plane, which matches
HeadingMode.CAMERA_DIRECTIONingetDeviceGeolocation.HeadingMode.DEVICE_TOPis not offered because it depends on the display orientation, whichan arbitrary pose does not have. The heading is not meaningful when the forward axis points
straight up or down, or close to it.