기기 카메라의 지리 공간 포즈를 가져옵니다.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Geospatial API를 사용하도록 앱 설정을 구성한 후에는 기기 카메라의 AREarthManager.CameraGeospatialPose
를 가져올 수 있습니다. AREarthManager
객체에서 관리되는 이 포즈에는 다음 정보가 포함됩니다.
- 위도 및 경도로 표현된 위치
- 고도
- EUS 좌표계에서 X+가 동쪽을, Y+가 위쪽을, Z+가 남쪽을 가리키는 사용자의 방향을 근사하는 방향입니다.
추적 상태 확인
지리적 값은 AREarthManager.EarthTrackingState
이 TrackingState.Tracking
인 경우에만 유효합니다. 모든 Geospatial API 호출을 AREarthManager.EarthTrackingState
컨트롤 블록으로 래핑해야 합니다.
var earthTrackingState = EarthManager.EarthTrackingState;
if (earthTrackingState == TrackingState.Tracking)
{
// camera_geospatial_pose contains geodetic location, rotation, and
// confidences values.
var cameraGeospatialPose = EarthManager.CameraGeospatialPose;
}
AREarthManager.EarthTrackingState
가 TrackingState.Tracking
이 아닌 경우 AREarthManager.EarthTrackingState
는 TrackingState.Limited
또는 TrackingState.None
일 수 있습니다. 두 조건이 모두 false인 경우 TrackingState.EarthTrackingState
를 선택합니다. 그러면 AREarthManager
객체가 추적되지 못하게 하는 다른 오류 상태가 표시됩니다.
정확성을 위해 자세 조정
기기가 기본 방향으로 세워져 있으면 AR 추적과의 자연스러운 정렬로 인해 피치 (X+) 및 롤 (Z+) 각도가 정확한 경향이 있습니다. 하지만 요각 (Y+) 각도는 VPS 데이터 가용성과 위치의 시간적 조건에 따라 달라질 수 있습니다. 앱에서 정확성을 위해 조정해야 할 수 있습니다.
GeospatialPose.OrientationYawAccuracy
는 특정 AREarthManager.CameraGeospatialPose
의 요 (Y+) 각도에 대한 정확도 추정치를 제공합니다. 방향 요 정확도는 GeospatialPose.EunRotation
의 요 각도 주변 68번째 백분위수 신뢰도 수준의 반경(도)을 나타내는 숫자입니다. 즉, AREarthManager.CameraGeospatialPose
의 실제 요각이 GeospatialPose.OrientationYawAccuracy
에서 반환된 도수 내에 정확할 확률은 68% 입니다.
값이 클수록 정확도가 낮습니다. 예를 들어 예상 요 각도가 60도이고 요 정확도가 10도인 경우 실제 요 각도가 50도에서 70도 사이일 확률은 68% 입니다.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-14(UTC)
[null,null,["최종 업데이트: 2025-07-14(UTC)"],[[["\u003cp\u003eAccess the device camera's geospatial pose, including location, altitude, and orientation, using the \u003ccode\u003eAREarthManager.CameraGeospatialPose\u003c/code\u003e after configuring the Geospatial API.\u003c/p\u003e\n"],["\u003cp\u003eEnsure the \u003ccode\u003eAREarthManager.EarthTrackingState\u003c/code\u003e is in the \u003ccode\u003eTrackingState.Tracking\u003c/code\u003e state before using geospatial values to avoid issues caused by limited or no tracking.\u003c/p\u003e\n"],["\u003cp\u003eAccount for potential inaccuracies in the yaw (Y+) angle of the orientation, especially when the device isn't upright, and utilize \u003ccode\u003eGeospatialPose.OrientationYawAccuracy\u003c/code\u003e to estimate the yaw accuracy.\u003c/p\u003e\n"],["\u003cp\u003eUnderstand that the \u003ccode\u003eGeospatialPose.OrientationYawAccuracy\u003c/code\u003e value represents the radius, in degrees, of the 68th percentile confidence level around the yaw angles, with larger values indicating lower accuracy.\u003c/p\u003e\n"]]],[],null,["# Obtain the device camera's Geospatial pose\n\nOnce you have configured your app's settings to use the Geospatial API, you can obtain the device camera's [`AREarthManager.CameraGeospatialPose`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose). This pose, managed in an [`AREarthManager`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager) object, contains the following information:\n\n- Location, expressed in latitude and longitude\n- Altitude\n- An orientation approximating the direction the user is facing in the EUS coordinate system with X+ pointing east, Y+ pointing up, and Z+ pointing south\n\nCheck the tracking state\n------------------------\n\nGeospatial values are only valid while [`AREarthManager.EarthTrackingState`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) is [`TrackingState.Tracking`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html). Make sure to wrap all Geospatial API calls in a [`AREarthManager.EarthTrackingState`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) control block. \n\n var earthTrackingState = EarthManager.EarthTrackingState;\n if (earthTrackingState == TrackingState.Tracking)\n {\n // camera_geospatial_pose contains geodetic location, rotation, and\n // confidences values.\n var cameraGeospatialPose = EarthManager.CameraGeospatialPose;\n }\n\nIf [`AREarthManager.EarthTrackingState`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) does not become [`TrackingState.Tracking`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html), [`AREarthManager.EarthTrackingState`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate) may be [`TrackingState.Limited`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html) or [`TrackingState.None`](https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.TrackingState.html). If neither of these conditions are true, check [`TrackingState.EarthTrackingState`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#earthtrackingstate), which shows other error states that may keep the [`AREarthManager`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager) object from tracking.\n\nAdjust the pose for accuracy\n----------------------------\n\nWhen the device is upright in the default orientation, the pitch (X+) and roll (Z+) angles tend to be precise due to a natural alignment with AR tracking. However, the yaw (Y+) angles can vary depending on VPS data availability and temporal conditions at the location. Your app may have to make adjustments for accuracy.\n\n[`GeospatialPose.OrientationYawAccuracy`](/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy) provides an accuracy estimate for the yaw (Y+) angles for a certain [`AREarthManager.CameraGeospatialPose`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose). The orientation yaw accuracy is a number that describes the radius, in degrees, of the 68th percentile confidence level around the yaw angles in [`GeospatialPose.EunRotation`](/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#eunrotation). In other words, there is a 68% chance that the [`AREarthManager.CameraGeospatialPose`](/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/AREarthManager#camerageospatialpose)'s true yaw angle is accurate within the number of degrees returned by\n[`GeospatialPose.OrientationYawAccuracy`](/ar/reference/unity-arf/struct/Google/XR/ARCoreExtensions/GeospatialPose#orientationyawaccuracy).\n\nLarger values indicate lower accuracy. For example, if the estimated yaw angle is 60 degrees and the yaw accuracy is 10 degrees, then there is a 68% probability that the true yaw angle is between 50 and 70 degrees.\n\nWhat's next\n-----------\n\n- [Place a Geospatial anchor](/ar/develop/unity-arf/geospatial/anchors#wgs84_anchors) by obtaining the anchor's Geospatial pose."]]