Skip to main content
API Reference SwiftyNsdk

WpsLocation

Contains world positioning data from the WPS (World Positioning System)....

Declaration

struct WpsLocation

Summary

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 Usage

let (status, location) = wpsSession.latestLocation()
if status.isOk() {
print("GPS Coordinates: \(location.referenceLatitudeDegrees), \(location.referenceLongitudeDegrees)")
print("Altitude: \(location.referenceAltitudeMetres) meters")
print("Status: \(location.status)")

// Use the transformation matrix for coordinate conversions
let worldPosition = location.trackingToRelativeEdn
placeARContent(at: worldPosition)
}

Properties

NameTypeSummary
var descriptionString
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the String(describing:)
initializer. This initializer works with any type, and uses the custom
description property for types that conform to
CustomStringConvertible:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of p to a string in the assignment to s uses the
Point type's description property.
let referenceAltitudeMetresDouble
Reference altitude in meters above sea level.
This represents the GPS altitude of the reference point used for
WPS positioning calculations.
let referenceLatitudeDegreesDouble
Reference latitude in degrees (WGS84 coordinate system).
This represents the GPS latitude of the reference point used for
WPS positioning calculations.
let referenceLongitudeDegreesDouble
Reference longitude in degrees (WGS84 coordinate system).
This represents the GPS longitude of the reference point used for
WPS positioning calculations.
let trackingToRelativeEdnsimd_float4x4
Transformation matrix from tracking to relative coordinate system.
This 4x4 transformation matrix converts between the tracking coordinate
system and the relative coordinate system used for AR content placement.

Relationships

conforms to: Swift.CustomStringConvertible