الحصول على التحويل الجيوفضائي لكاميرا الجهاز
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
بعد ضبط إعدادات تطبيقك لاستخدام Geospatial API، يمكنك الحصول على GAREarth.cameraGeospatialTransform
كاميرا الجهاز. يحتوي هذا التحويل، الذي تتم إدارته في عنصر GAREarth
، على المعلومات التالية:
- الموقع الجغرافي، معرَّفًا بخطوط الطول والعرض
- الارتفاع
- اتجاه تقريبي للاتجاه الذي يواجهه المستخدم في نظام إحداثيات EUS مع توجيه X+ نحو الشرق وY+ نحو الأعلى وZ+ نحو الجنوب
تعديل الوضع للحصول على دقة أكبر
عندما يكون الجهاز منتصبًا في الوضع التلقائي، تميل زاويتا الانحراف (X+) والدوران (Z+) إلى أن تكونا دقيقتَين بسبب المواءمة الطبيعية مع التتبّع بالواقع المعزّز. ومع ذلك، يمكن أن تختلف زوايا الانحراف (Y+) حسب مدى توفّر بيانات VPS والظروف الزمنية في الموقع الجغرافي. قد يحتاج تطبيقك إلى إجراء تعديلات لتحسين الدقة.
تقدّم GARGeospatialTransform.orientationYawAccuracy
نطاق عدم اليقين GARGeospatialTransform.eastUpSouthQTarget
، والذي يتم قياسه بالدرجات. تشير هذه القيمة إلى الانحراف المعياري لتقدير زاوية الانحراف (Y+) على المستوى المحلي.
الخطوات التالية
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eAccess the device camera's geospatial transform to get the user's location, altitude, and orientation in the real world.\u003c/p\u003e\n"],["\u003cp\u003eAdjust the yaw angle for accuracy as it can vary due to VPS data availability and local conditions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGARGeospatialTransform.orientationYawAccuracy\u003c/code\u003e property provides the uncertainty radius for the yaw angle estimate.\u003c/p\u003e\n"],["\u003cp\u003eUse the geospatial data to place anchors and interact with the real-world environment through your AR app.\u003c/p\u003e\n"]]],["After configuring the Geospatial API, the `GAREarth.cameraGeospatialTransform` provides location (latitude/longitude), altitude, and device orientation. Orientation uses the EUS coordinate system (X+ east, Y+ up, Z+ south). While pitch and roll are generally accurate, yaw can vary. `GARGeospatialTransform.orientationYawAccuracy` indicates yaw uncertainty. To proceed, use the data to place a Geospatial anchor, by obtaining the anchor's pose.\n"],null,["# Obtain the device camera's Geospatial transform\n\nOnce you have configured your app's settings to use the Geospatial API, you can obtain the device camera's [`GAREarth.cameraGeospatialTransform`](/ar/reference/ios/interface/GAREarth#camerageospatialtransform). This transform, managed in a [`GAREarth`](/ar/reference/ios/interface_g_a_r_earth) 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\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[`GARGeospatialTransform.orientationYawAccuracy`](/ar/reference/ios/interface/GARGeospatialTransform#orientationyawaccuracy) provides the radius of uncertainty for [`GARGeospatialTransform.eastUpSouthQTarget`](/ar/reference/ios/interface_g_a_r_geospatial_transform#abd5921fc07dca0e1e2c9ce3c1c2e637b), measured in degrees. This value indicates the standard deviation of the estimate for the local-level yaw (Y+) angle.\n\nWhat's next\n-----------\n\n- Place a [Geospatial anchor](/ar/develop/ios/geospatial/anchors#wgs84_anchors) by obtaining the anchor's Geospatial pose."]]