Stay organized with collections Save and categorize content based on your preferences.

ArGeospatialPose

Describes a specific location, elevation, and compass heading relative to Earth (value type).

Summary

It is comprised of:

  • Latitude and longitude are specified in degrees, with positive values being north of the equator and east of the prime meridian as defined by the WGS84 specification.
  • Altitude is specified in meters above the WGS84 ellipsoid, which is roughly equivalent to meters above sea level.
  • Heading is defined in degrees clockwise from north. See ArGeospatialPose_getHeading for more information.
  • Accuracy of the latitude, longitude, altitude, and heading are available as numeric confidence intervals where a large value (large interval) means low confidence and small value (small interval) means high confidence.

An ArGeospatialPose can be retrieved from ArEarth_getCameraGeospatialPose.

Typedefs

ArGeospatialPose typedef
struct ArGeospatialPose_
Describes a specific location, elevation, and compass heading relative to Earth (value type).

Functions

ArGeospatialPose_create(const ArSession *session, ArGeospatialPose **out_pose)
void
Allocates and initializes a new instance.
ArGeospatialPose_destroy(ArGeospatialPose *pose)
void
Releases memory used by the given pose object.
ArGeospatialPose_getAltitude(const ArSession *session, const ArGeospatialPose *geospatial_pose, double *out_altitude_meters)
void
Gets the ArGeospatialPose's altitude in meters as elevation above the WGS84 ellipsoid.
ArGeospatialPose_getEastUpSouthQuaternion(const ArSession *session, const ArGeospatialPose *geospatial_pose, float *out_quaternion_4)
void
Extracts the orientation from an Geospatial pose.
ArGeospatialPose_getHeading(const ArSession *session, const ArGeospatialPose *geospatial_pose, double *out_heading_degrees)
void
Gets the ArGeospatialPose's heading.
ArGeospatialPose_getHeadingAccuracy(const ArSession *session, const ArGeospatialPose *geospatial_pose, double *out_heading_accuracy_degrees)
void
Gets the ArGeospatialPose's estimated heading accuracy.
ArGeospatialPose_getHorizontalAccuracy(const ArSession *session, const ArGeospatialPose *geospatial_pose, double *out_horizontal_accuracy_meters)
void
Gets the ArGeospatialPose's estimated horizontal accuracy in meters with respect to latitude and longitude.
ArGeospatialPose_getLatitudeLongitude(const ArSession *session, const ArGeospatialPose *geospatial_pose, double *out_latitude_degrees, double *out_longitude_degrees)
void
Gets the ArGeospatialPose's latitude and longitude in degrees, with positive values being north of the equator and east of the prime meridian, as defined by the WGS84 specification.
ArGeospatialPose_getVerticalAccuracy(const ArSession *session, const ArGeospatialPose *geospatial_pose, double *out_vertical_accuracy_meters)
void
Gets the ArGeospatialPose's estimated altitude accuracy.

Typedefs

ArGeospatialPose

struct ArGeospatialPose_ ArGeospatialPose

Describes a specific location, elevation, and compass heading relative to Earth (value type).

Functions

ArGeospatialPose_create

void ArGeospatialPose_create(
  const ArSession *session,
  ArGeospatialPose **out_pose
)

Allocates and initializes a new instance.

This function may be used in cases where an instance of this type needs to be created to receive a pose. It must be destroyed with ArGeospatialPose_destroy after use.

Details
Parameters
session
an ArSession instance.
out_pose
the new pose.

ArGeospatialPose_destroy

void ArGeospatialPose_destroy(
  ArGeospatialPose *pose
)

Releases memory used by the given pose object.

Details
Parameters
pose
the pose to destroy.

ArGeospatialPose_getAltitude

void ArGeospatialPose_getAltitude(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  double *out_altitude_meters
)

Gets the ArGeospatialPose's altitude in meters as elevation above the WGS84 ellipsoid.

Details
Parameters
session
The ARCore session.
geospatial_pose
The Geospatial pose.
out_altitude_meters
The altitude of the pose in meters above the WGS84 ellipsoid.

ArGeospatialPose_getEastUpSouthQuaternion

void ArGeospatialPose_getEastUpSouthQuaternion(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  float *out_quaternion_4
)

Extracts the orientation from an Geospatial pose.

It represents rotation of the target with respect to the east-up-south coordinates. That is, X+ points east, Y+ points up, and Z+ points south. Right handed coordinate system.

Details
Parameters
session
The ARCore session.
geospatial_pose
The geospatial pose.
out_quaternion_4
A pointer of 4 float values, which will store the quaternion values as [x, y, z, w].

ArGeospatialPose_getHeading

void ArGeospatialPose_getHeading(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  double *out_heading_degrees
)

Gets the ArGeospatialPose's heading.

This function will return values for ArGeospatialPose's from ArEarth_getCameraGeospatialPose() and returns 0 for all other ArGeospatialPose objects.

Heading is specified in degrees clockwise from true north and approximates the direction the device is facing. The value returned when facing north is 0°, when facing east is 90°, when facing south is +/-180°, and when facing west is -90°.

The heading approximation is based on the rotation of the device in its current orientation mode (i.e., portrait or landscape) and pitch. For example, when the device is held vertically or upright, the heading is based on the camera optical axis. If the device is held horizontally, looking downwards, the heading is based on the top of the device, with respect to the orientation mode.

Note: Heading is currently only supported in the device's default orientation mode, which is portrait mode for most supported devices.

Details
Parameters
session
The ARCore session.
geospatial_pose
The Geospatial pose.
out_heading_degrees
The heading component of this pose's orientation in [-180.0, 180.0] degree range.

ArGeospatialPose_getHeadingAccuracy

void ArGeospatialPose_getHeadingAccuracy(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  double *out_heading_accuracy_degrees
)

Gets the ArGeospatialPose's estimated heading accuracy.

We define heading accuracy as the estimated radius of the 68th percentile confidence level around ArGeospatialPose_getHeading. In other words, there is a 68% probability that the true heading is within out_heading_accuracy_degrees of this ArGeospatialPose's heading. Larger numbers indicate lower accuracy.

For example, if the estimated heading is 60°, and out_heading_accuracy_degrees is 10°, then there is a 68% probability of the true heading being between 50° and 70°.

Details
Parameters
session
The ARCore session.
geospatial_pose
The geospatial pose.
out_heading_accuracy_degrees
The accuracy of the heading confidence in degrees.

ArGeospatialPose_getHorizontalAccuracy

void ArGeospatialPose_getHorizontalAccuracy(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  double *out_horizontal_accuracy_meters
)

Gets the ArGeospatialPose's estimated horizontal accuracy in meters with respect to latitude and longitude.

We define horizontal accuracy as the radius of the 68th percentile confidence level around the estimated horizontal location. In other words, if you draw a circle centered at this ArGeospatialPose's latitude and longitude, and with a radius equal to the horizontal accuracy, then there is a 68% probability that the true location is inside the circle. Larger numbers indicate lower accuracy.

For example, if the latitude is 10, longitude is 10, and out_horizontal_accuracy_meters is 15, then there is a 68% probability that the true location is within 15 meters of the (10°, 10°) latitude/longitude coordinate.

Details
Parameters
session
The ARCore session.
geospatial_pose
The geospatial pose.
out_horizontal_accuracy_meters
The estimated horizontal accuracy of this ArGeospatialPose, radial, in meters.

ArGeospatialPose_getLatitudeLongitude

void ArGeospatialPose_getLatitudeLongitude(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  double *out_latitude_degrees,
  double *out_longitude_degrees
)

Gets the ArGeospatialPose's latitude and longitude in degrees, with positive values being north of the equator and east of the prime meridian, as defined by the WGS84 specification.

Details
Parameters
session
The ARCore session.
geospatial_pose
The geospatial pose.
out_latitude_degrees
The latitude of the pose in degrees.
out_longitude_degrees
The longitude of the pose in degrees.

ArGeospatialPose_getVerticalAccuracy

void ArGeospatialPose_getVerticalAccuracy(
  const ArSession *session,
  const ArGeospatialPose *geospatial_pose,
  double *out_vertical_accuracy_meters
)

Gets the ArGeospatialPose's estimated altitude accuracy.

We define vertical accuracy as the radius of the 68th percentile confidence level around the estimated altitude. In other words, there is a 68% probability that the true altitude is within out_vertical_accuracy_meters of this ArGeospatialPose's altitude (above or below). Larger numbers indicate lower accuracy.

For example, if this ArGeospatialPose's altitude is 100 meters, and out_vertical_accuracy_meters is 20 meters, there is a 68% chance that the true altitude is within 20 meters of 100 meters.

Details
Parameters
session
The ARCore session.
geospatial_pose
The Geospatial pose.
out_vertical_accuracy_meters
The estimated vertical accuracy in meters.