STRUCT
ArdkFrameData.GpsData
public struct GpsData: Equatable
GPS location data for geographic positioning.
This structure contains location information from the device's GPS system, providing geographic coordinates and accuracy estimates for location-based AR features and location positioning.
Properties
timestampMs
public var timestampMs: UInt64
Timestamp when the GPS reading was captured (in milliseconds).
latitude
public var latitude: Double
Latitude coordinate in decimal degrees.
Positive values represent locations north of the equator, negative values represent locations south of the equator.
longitude
public var longitude: Double
Longitude coordinate in decimal degrees.
Positive values represent locations east of the Prime Meridian, negative values represent locations west of the Prime Meridian.
altitude
public var altitude: Double
Altitude above sea level in meters.
This value may be negative for locations below sea level. Accuracy depends on GPS signal quality and atmospheric conditions.
verticalAccuracy
public var verticalAccuracy: Float
Vertical accuracy of the altitude measurement in meters.
Lower values indicate more accurate altitude readings. GPS altitude is typically less accurate than horizontal position.
horizontalAccuracy
public var horizontalAccuracy: Float
Horizontal accuracy of the position measurement in meters.
Lower values indicate more accurate position readings. Values under 5 meters are considered good accuracy for most AR applications.
Methods
init(timestampMs:latitude:longitude:altitude:verticalAccuracy:horizontalAccuracy:)
public init(timestampMs: UInt64,
latitude: Double,
longitude: Double,
altitude: Double,
verticalAccuracy: Float,
horizontalAccuracy: Float)
Creates GPS data with the specified location parameters.
- Parameters:
- timestampMs: Timestamp of the GPS reading in milliseconds
- latitude: Latitude in decimal degrees
- longitude: Longitude in decimal degrees
- altitude: Altitude above sea level in meters
- verticalAccuracy: Vertical accuracy in meters
- horizontalAccuracy: Horizontal accuracy in meters
Parameters
| Name | Description |
|---|---|
| timestampMs | Timestamp of the GPS reading in milliseconds |
| latitude | Latitude in decimal degrees |
| longitude | Longitude in decimal degrees |
| altitude | Altitude above sea level in meters |
| verticalAccuracy | Vertical accuracy in meters |
| horizontalAccuracy | Horizontal accuracy in meters |