WpsLocation
Contains world positioning data from the WPS (World Positioning System)....
Declaration
struct WpsLocationSummary
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
| Name | Type | Summary |
|---|---|---|
| var description | String | |
| let referenceAltitudeMetres | Double | Reference altitude in meters above sea level. This represents the GPS altitude of the reference point used for WPS positioning calculations. |
| let referenceLatitudeDegrees | Double | Reference latitude in degrees (WGS84 coordinate system). This represents the GPS latitude of the reference point used for WPS positioning calculations. |
| let referenceLongitudeDegrees | Double | Reference longitude in degrees (WGS84 coordinate system). This represents the GPS longitude of the reference point used for WPS positioning calculations. |
| let trackingToRelativeEdn | simd_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
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
descriptionproperty for types that conform toCustomStringConvertible: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
pto a string in the assignment tosuses thePointtype'sdescriptionproperty.