如何计算方位角

发布于 2024-10-16 03:39:15 字数 348 浏览 3 评论 0原文

我有很多 3D 飞机。我需要知道的是计算方位角的方式。 我希望,我可以使用每个平面的投影法线向量(我的平面方程为 ax+by-z+c=0;因此该平面的法线向量为 a,b,-1)到 XY 来计算方位角飞机。然后,我可以根据 Y 轴计算方位角。但是,我不知道投影到 XY 平面后如何获得投影法线向量。然后,我可以应用给出两个向量之间角度的方程来计算所需向量与 y 轴的角度吗?

另一方面,我发现,方位角定义为沿平面最陡坡度的任何线与北向(此处为 Y 轴)之间的角度。按照我提出的采用法向量的方式,这个定义是否会遵循?我的意思是,投影法线向量是否总是沿着平面最陡的斜率给出?另外,有人告诉我,这个问题应该被视为二维问题。 请评论我并向我发送相关公式以计算方位角。谢谢。

I have many 3D planes. The thing that I need to know is the way of computing aspect angle.
I hope, I can compute the aspect angle by using the projected normal vector of each plane (my plane equation is ax+by-z+c=0; so normal vector of this plane is a,b,-1) to the XY plane. Then, from the Y axis I can compute the aspect angle. But, I don’t know how to get the projected Normal vector after I projected to XY plane. Then, can I apply the equation which gives angle between two vectors to compute angle of my desired vector from the y axis.

On the other hand, I found, aspect angle is defined as the angle between any line which passes along the steepest slope of the plane and north direction (here, Y axis). Does this definition will follow, with my proposed way that is taking normal vectors? I mean, does the projected normal vector always given along the steepest slope of the plane? Also, some one told me, that this problem should consider as a 2D problem.
Please comment me and send me the relevant formulae in order to compute aspect angle. Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

许你一世情深 2024-10-23 03:39:15

一些快速谷歌搜索揭示了方位角的定义。

http://www.answers.com/topic/aspect-angle

这是北半球为地理北,南半球为地理南。所以基本上它是衡量斜坡面对最近的极点的距离。

如果你的世界是平面的而不是球形的,它会简化事情,所以是的 - 二维问题。我的假设具有以下含义:

  • 在球形世界中,北极是球体上的一个点。在平面世界中,“极点”是无穷远的平面。想象一下在你的世界中遥远的地方有一架飞机表示“北方”。在此任务中,只有该平面的法线很重要。该平面的单位法线为N(nz,ny,nz)。
  • Up 是指向上方的向量U(ux,uy,yz)。这是地平面的单位法向量。

现在可以像往常一样将平面 V(a,b,c) 的单位法向量投影到地平面上的向量 P 上:P = V - (V dot U) U

现在可以轻松测量平面的方位角- 它是“极”平面 N 与投影平面法线 P 之间的角度,由 acos(P > 点N)。

由于北对于您来说是正 Y 轴,因此我们有 N = (0, 1, 0)。然后我猜你得到的是 U = (0, 0, 1), 正 Z。这将使事情变得更加简单 - 为了在地平面上投影,我们只需剥离 Z 部分。方位角就是 (a,b) 和 (0,1) 之间的角度。

aspectAngle = acos(b / sqrt(a*a + b*b))

请注意,与地平面平行的平面没有明确定义的方位角,因为没有斜率可用于测量方位角。

Some quick googling reveals the definition of the aspect angle.

http://www.answers.com/topic/aspect-angle

It's the angle between the geographic north on the northern hemisphere and the geographic south on the southern hemisphere. So basically it's a measure how much a slope faces the closest pole.

If your world is planar as opposed to spherical it will simplify things, so yes - A 2D problem. I'll make this assumption having the following implications:

  • In a spherical world the north pole is a point on the sphere. In a planar world the "pole" is a plane at infinity. Think about a plane somewhere far away in your world denoting "north". Only the normal of this plane is important in this task. The unit normal of this plane is N(nz,ny,nz).
  • Up is a vector pointing up U(ux,uy,yz). This is the unit normal vector of the ground plane.

The unit normal vector of the plane V(a,b,c) can now be projected onto a vector P on the ground plane as usual: P = V - (V dot U) U

Now it's easy to measure the aspect angle of the plane - It's the angle between the "pole"-plane N and the projected plane normal P given by acos(P dot N).

Since north is positive Y-axis for you we have N = (0, 1, 0). And then I guess you have up is U = (0, 0, 1), positive Z. This will simplify things even more - To project on the ground plane we just strip the Z-part. The aspect angle is then the angle between (a,b) and (0,1).

aspectAngle = acos(b / sqrt(a*a + b*b))

Note that planes parallell with the ground plane does not have a well-defined aspect angle since there is no slope to measure the aspect angle from.

衣神在巴黎 2024-10-23 03:39:15

您使用什么样的表面? TINS(不规则三角形网络)或 DEM(数字高程模型)?

如果您使用光栅图像来创建表面,则计算纵横比的算法基本上是一个移动窗口,它检查中心像素加上 8 个相邻像素。

将中心点与每个相邻点进行比较,并检查海拔随距离的变化(上升超过运行)。您可以参数化距离检查(北、南、东和西邻居的距离 = 1,西北、西南、东南和东北的距离 = sqrt(2))以使其更快。

您也可以在 gis.stackexchange 上问这个问题。那里有很多人可以为您提供帮助。

编辑:
http://blog.geoprocessamento.net/2010/ 03/modelos-digitais-de-elevacao-e-hidrologia/

该网站以葡萄牙语提供,将帮助您可视化算法。计算出中心像元与其八个相邻像元之间的最高斜率后,您可以指定 0、2、4、8、16、32、64 或 128,具体取决于中心像元与相邻像元之间呈现最高斜率的像元的位置。

What kind of surfaces are you working with? TINS (Triangular Irregular Networks) or DEMs (Digital Elevation Models)?

If you are using raster imagery to create your surfaces, the algorithm for calculating aspect is basically a moving window, which checks a central pixel plus the 8 neighbors.

Compare the central one with each neighbor and check for difference in elevation over distance (rise over run). You can parametrize the distance checks (north, south, east and west neighbors are at distance = 1 and northwest, southwest, southeast and northeast are at distance = sqrt(2)) to make it faster.

You can ask this question on gis.stackexchange also. Many people will be able to help you there.

Edit:
http://blog.geoprocessamento.net/2010/03/modelos-digitais-de-elevacao-e-hidrologia/

this website, altought in portuguese, will help you visualize the algorithm. After calculating the highest slope between a central cell and it's eight neighbors, you assign 0, 2, 4, 8, 16, 32, 64 or 128, depending on the location of the cell that presented highest slope between center and neighboors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文