getGeolocation
Declaration
func getGeolocation(pose: simd_float4x4) -> Vps2GeolocationData?
Summary
Returns
The latitude, longitude, altitude, heading and orientation of pose,
or nil if VPS2 has not localized yet.
Parameters
| Name | Type | Summary |
|---|---|---|
| pose | simd_float4x4 | The 4x4 transform of the pose in ARKit tracking space, with translation in meters. Any scale is ignored. |
Converts an AR pose to a geolocation using the latest localization.
The inverse of
getPose(location:).posecan be any pose in AR tracking space, notjust the camera's.
The heading is the direction of the pose's forward axis projected onto the horizontal
plane, which matches
.cameraDirectionindeviceGeolocation(headingMode:)..deviceTopis not offered because it depends on the display orientation, which anarbitrary pose does not have. The heading is not meaningful when the forward axis
points straight up or down, or close to it.