Skip to main content
←API Reference ←NSDK ←NSDKVps2Session

getPose


Declaration​

func getPose(location: GeolocationData) -> Vps2Pose?

Summary​

Converts a geolocation to an AR pose using the latest localization.
Equivalent to getPose(localization:location:) with getLatestLocalization().
location can be any geolocation, not just the device's; the result does not depend on
the current camera pose.

Returns​

The pose in ARKit tracking space corresponding to the given geolocation, with
translation in meters from the tracking space origin, or nil if VPS2 has not
localized yet.

Parameters​

NameTypeSummary
locationGeolocationData
The geolocation to convert.

Overload 1​

func getPose(location: CLLocation) -> Vps2Pose?

Summary​

Converts a CLLocation to an AR pose using the latest localization.

Returns​

The pose in the device's AR tracking space, with translation in meters, or
nil if VPS2 has not localized yet.

Parameters​

NameTypeSummary
locationCLLocation
The CLLocation to convert. Its ellipsoidalAltitude (WGS84) is
used, not its mean sea level altitude.

Overload 2​

func getPose(localization: Vps2Localization, location: GeolocationData) -> Vps2Pose?

Summary​

Converts a geolocation to an AR pose using the provided localization snapshot.
location can be any geolocation, not just the device's; the result is where that
geolocation lies in AR tracking space, and does not depend on the current camera pose.
In most cases you want the overload that uses the latest localization automatically; use
this one only when a batch of geolocations must share a single snapshot.

Returns​

The pose in ARKit tracking space corresponding to the given geolocation, with
translation in meters from the tracking space origin, or nil if localization has
no tracking state.

Parameters​

NameTypeSummary
localizationVps2Localization
The localization to use for the conversion.
locationGeolocationData
The geolocation to convert.

Overload 3​

func getPose(localization: Vps2Localization, location: CLLocation) -> Vps2Pose?

Summary​

Converts a CLLocation to an AR pose using the provided localization snapshot.

Returns​

The pose in the device's AR tracking space, with translation in meters, or
nil if localization has no tracking state.

Parameters​

NameTypeSummary
localizationVps2Localization
The localization to use for the conversion.
locationCLLocation
The CLLocation to convert. Its ellipsoidalAltitude (WGS84) is used,
not its mean sea level altitude.

Overload 4​

func getPose(coordinate: CLLocationCoordinate2D, altitude: Double = 0) -> Vps2Pose?

Summary​

Converts a coordinate and altitude to an AR pose using the latest localization.

Returns​

The pose in the device's AR tracking space, with translation in meters, or
nil if VPS2 has not localized yet.

Parameters​

NameTypeSummary
coordinateCLLocationCoordinate2D
The coordinate to convert.
altitudeDouble
The altitude in meters above the WGS84 ellipsoid (not mean sea level).
When taking it from a CLLocation, use ellipsoidalAltitude, not altitude.
Defaults to 0.

Overload 5​

func getPose(localization: Vps2Localization, coordinate: CLLocationCoordinate2D, altitude: Double = 0) -> Vps2Pose?

Summary​

Converts a coordinate and altitude to an AR pose using the provided localization snapshot.

Returns​

The pose in the device's AR tracking space, with translation in meters, or
nil if localization has no tracking state.

Parameters​

NameTypeSummary
localizationVps2Localization
The localization to use for the conversion.
coordinateCLLocationCoordinate2D
The coordinate to convert.
altitudeDouble
The altitude in meters above the WGS84 ellipsoid (not mean sea level).
When taking it from a CLLocation, use ellipsoidalAltitude, not altitude.
Defaults to 0.