Incorrect results using Autodesk Forge Viewer Geolocation Extension

可紊 提交于 2021-01-07 01:38:34

问题


This is related to my previous question. I'm posting a new question to try and explain the situation better.

I am placing marker objects on a model using data taken from drone surveys. I have access to high accuracy GPS data and also omega/phi/kappa rotation data.

I am trying to use the Autodesk.Geolocation extension to convert the lon/lat/alt data to viewer space.

All models were originally created in Revit.

When I use the Geolocation extension, it seems like the refPointLMV and GlobalOffset are not correctly being taken into account.

Here's an example:

As you can see, the selected point [0] on the model is nowhere near the real GPS coords. Also, the refPointLMV has huge values.

Something similar happens when I take some lon/lat/alt data from the drone photo. The drone GPS data will be close to the model positionLL84, e.g (4.586577106, 51.626037158, 49.095). However, when I do Geolocation.lonLatToLMV(4.586577106, 51.626037158, 49.095) I get a result way off screen.

We've had a support query open with Autodesk related to this open for over two months now, but not had much success there. They said the engineering team is too busy to work on this and recommended to try and fix the error on our side. Support ref LMV-5261.

I have been able to bring the result of Geolocation.lonLatToLMV into viewer space with the following code:

const gpsPosition = new THREE.Vector3(
  longitude,
  latitude,
  altitude,
);

const position = viewer
  .getExtension('Autodesk.Geolocation')
  .lonLatToLmv(gpsPosition);

const data = viewer.model.getData();

const globalOffset = data.globalOffset;
const refPointTransform = data.refPointTransform;

// applying the transform

position.add(globalOffset)
position.applyMatrix4(refPointTransform);

// HACK: after applying the above transforms, a final
// rotation of -45 degrees is required to move the points into position
// once this has been done, the locations match up exactly to photos. 
// Seems like a weird hack, but I've tested with over 20 drone photos, they all match up. 

const quaterion = new THREE.Quaternion().setFromEuler(
  new THREE.Euler(0, 0, -Math.PI / 4),
);

position.applyQuaternion(quaterion);

The problem here is that we are testing with a single model and this is clearly not a robust solution that we can expect to work with all future models and drone data we throw at it.

How long is it likely to take for the engineering team to fix this? Or are they likely to fix this at all?


回答1:


Sorry for the delay due to the Chinese New Year. After checking with our engineering team, the current solution is to do the followings:

  1. Move the Project base point to N0 E0, but remain the angle to true north
  2. Copy the LAT LONG to Survey point

Afterward, the result of the GEO conversion should be expected.

Here are the snapshots of the above setting and the result



来源:https://stackoverflow.com/questions/59985541/incorrect-results-using-autodesk-forge-viewer-geolocation-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!