如果其他坐标(3个或更多点)统一给出,如何在2d平面图上找到用户位置? [英] How to find the user position on a 2d floor plan if other coordinates (3 or more points) are given in unity?

查看:157
本文介绍了如果其他坐标(3个或更多点)统一给出,如何在2d平面图上找到用户位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果已知A,B和c的坐标,则可以找到用户的位置,将其取为A(floorpointx1,floorpointy1),B(floorpointx2,floorpointy2)和C(floorpointx3,floorpointy3).D1,还可以提供D2和D3.借助所有这些详细信息,我们可以找到用户的位置[User(floorpoint_x,floorpoint_y)]吗?

Is it possible to find the position of user if the coordinates of A,B and c are known which is taken as A(floorpointx1,floorpointy1),B(floorpointx2,floorpointy2)and C(floorpointx3,floorpointy3) .D1,D2 and D3 can also be provided.With all these details can we find the user's position[User(floorpoint_x,floorpoint_y)]?

float D1 = Vector3.Distance(userposition, PointAPosition);
float D2 = Vector3.Distance(userposition, PointBPosition);
float D3 = Vector3.Distance(userposition, PointCPosition);

推荐答案

在我们的评论中进行了讨论之后,我认为针对您的问题的最佳解决方案是进行2D helmert相似性转换.如果您的楼层地图上有2个或更多已知点,并在该点上放置了模型/兴趣点(换句话说:您正在测量ARKit坐标系中的坐标!),则可以计算两个坐标系之间的关系,然后您可以将用户的ARKit位置转换为楼层地图坐标系.

After our discussion in the comments, I think the best solution for your problem is a 2D helmert similarity transformation. If you have 2 or more known points in your floor map and place a model/POI on that points, (in other words: you are measuring the coordinates in the ARKit coordinate system!) you can calculate the relationship between the two coordinate system, and then you can transform your user ARKit position to your floor map coordinate system.

相似度转换可在两个坐标系统之间进行平移旋转缩放.

The similarity transformation makes a translation, rotation and scale between your two coordiante systems.

在此处,您可以找到更多信息和示例,以及二维helmert相似度转换的外观: http://www.geo.itu.edu.tr/dersler/Example%205_2D%20Helmert%20Similarity%20Transformation.pdf 研究文档并查看第6-8页的数字示例,实现起来应该没问题.

Here you find some more infos and an example, how the 2d helmert similarity transformation looks: http://www.geo.itu.edu.tr/dersler/Example%205_2D%20Helmert%20Similarity%20Transformation.pdf Study the document and look at the numerical example on page 6-8, that should be no problem to implement.

这篇关于如果其他坐标(3个或更多点)统一给出,如何在2d平面图上找到用户位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆