รับการแปลงภูมิสารสนเทศของกล้องในอุปกรณ์
เมื่อกําหนดการตั้งค่าแอปให้ใช้ Geospatial API แล้ว คุณจะรับ GAREarth.cameraGeospatialTransform
ของกล้องอุปกรณ์ได้ การแปลงนี้ซึ่งจัดการในออบเจ็กต์ GAREarth
มีข้อมูลต่อไปนี้
- ตำแหน่งที่แสดงเป็นละติจูดและลองจิจูด
- ระดับความสูง
- การวางแนวโดยประมาณตามทิศทางที่ผู้ใช้หันหน้าไปทางในระบบพิกัด EUS โดยที่ X+ ชี้ไปทางตะวันออก, Y+ ชี้ขึ้น และ Z+ ชี้ไปทางใต้
ปรับท่าทางเพื่อความแม่นยำ
เมื่ออุปกรณ์ตั้งตรงในแนวตั้งค่าเริ่มต้น มุมการเอียง (X+) และการพลิก (Z+) มีแนวโน้มที่จะแม่นยำเนื่องจากการวางแนวตามปกติกับการติดตาม AR อย่างไรก็ตาม มุมหมุน (Y+) อาจแตกต่างกันไปตามความพร้อมใช้งานของข้อมูล VPS และสภาพอากาศ ณ สถานที่นั้นๆ แอปของคุณอาจต้องทำการปรับเปลี่ยนเพื่อความถูกต้อง
GARGeospatialTransform.orientationYawAccuracy
แสดงรัศมีของความคลาดเคลื่อนสำหรับ GARGeospatialTransform.eastUpSouthQTarget
ซึ่งวัดเป็นองศา ค่านี้ระบุค่าเบี่ยงเบนมาตรฐานของการประมาณสำหรับมุมหมุนตามแนวราบ (Y+) ระดับท้องถิ่น
ขั้นตอนถัดไป
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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"]]