השגת הטרנספורמציה הגיאו-מרחבית של מצלמת המכשיר
אחרי שמגדירים את ההגדרות של האפליקציה כך שישתמשו ב-Geospatial API, אפשר לקבל את GAREarth.cameraGeospatialTransform
של מצלמת המכשיר. הטרנספורמציה הזו, שמנוהלת באובייקט GAREarth
, מכילה את הפרטים הבאים:
- מיקום, שמוצג לפי קו רוחב וקו אורך
- גובה
- כיוון שמשוער לכיוון שאליו המשתמש פונה במערכת הקואורדינטות EUS, כאשר X+ מצביע לכיוון מזרח, Y+ מצביע למעלה ו-Z+ מצביע לכיוון דרום
שינוי התנוחה כדי לשפר את הדיוק
כשהמכשיר זקוף בכיוון ברירת המחדל, זוויות ההטיה (X+) והרוטציה (Z+) נוטות להיות מדויקות בגלל ההתאמה הטבעית למעקב AR. עם זאת, זוויות ההטיה (Y+) עשויות להשתנות בהתאם לזמינות הנתונים של ה-VPS ולתנאים הזמניים במיקום. יכול להיות שתצטרכו לבצע שינויים באפליקציה כדי לשפר את הדיוק.
GARGeospatialTransform.orientationYawAccuracy
מספק את רדיוס אי-הוודאות של GARGeospatialTransform.eastUpSouthQTarget
, שנמדד במעלות. הערך הזה מציין את סטיית התקן של האומדן של זווית ההטיה (Y+) ברמת המיקום הגיאוגרפי.
המאמרים הבאים
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-02-28 (שעון UTC).
[null,null,["עדכון אחרון: 2025-02-28 (שעון UTC)."],[[["Access the device camera's geospatial transform to get the user's location, altitude, and orientation in the real world."],["Adjust the yaw angle for accuracy as it can vary due to VPS data availability and local conditions."],["The `GARGeospatialTransform.orientationYawAccuracy` property provides the uncertainty radius for the yaw angle estimate."],["Use the geospatial data to place anchors and interact with the real-world environment through your AR app."]]],["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"]]