如何计算方位角
我有很多 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一些快速谷歌搜索揭示了方位角的定义。
http://www.answers.com/topic/aspect-angle
这是北半球为地理北,南半球为地理南。所以基本上它是衡量斜坡面对最近的极点的距离。
如果你的世界是平面的而不是球形的,它会简化事情,所以是的 - 二维问题。我的假设具有以下含义:
现在可以像往常一样将平面 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) 之间的角度。
请注意,与地平面平行的平面没有明确定义的方位角,因为没有斜率可用于测量方位角。
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:
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).
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.
您使用什么样的表面? 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.