デバイスのカメラの地理空間変換を取得する
Geospatial API を使用するようにアプリの設定を構成したら、デバイスのカメラの GAREarth.cameraGeospatialTransform
を取得できます。この変換は GAREarth
オブジェクトで管理され、次の情報が含まれます。
- 緯度と経度で表した位置情報
- 標高
- EUS 座標系でユーザーが向いている方向に近い向き(X+ は東、Y+ は上、Z+ は南を指す)。
ポーズを調整して正確に調整する
デバイスをデフォルトの向きでまっすぐに立てると、AR トラッキングと自然に調整されるため、ピッチ(X+)とロール(Z+)の角度は正確になります。ただし、ヨー(Y+)角度は、VPS データの可用性とその場所の天候条件によって異なる場合があります。精度を高めるために、アプリによる調整が必要になる場合があります。
GARGeospatialTransform.orientationYawAccuracy
は、GARGeospatialTransform.eastUpSouthQTarget
の不確実性の半径を度単位で指定します。この値は、ローカルレベルのヨー(Y+)角度の推定値の標準偏差を示します。
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-08 UTC。
[null,null,["最終更新日 2024-11-08 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"]]