计算坐标/线之间的角度 [英] Calculate angles between coordinates / lines

查看:101
本文介绍了计算坐标/线之间的角度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对如何计算坐标/线之间的角度有疑问。

我有四个标签,用XY坐标逗号分隔。

我应该使用哪些C#代码在Label_Angle_Result中获得所需的值



首选路线

固定点A. Label_FP_A 的。 X,Y

固定点B。 Label_FK_B 的。 X,Y



GPS的测量点

GPS点A. Label_GPS_A 的。 X,Y

GPS点B。 Label_GPS_B 的。 X,Y



结果

角度 Label_Angle_Result 。号码



我尝试了什么:



我看一下CAD解决方案,但我没有找到任何好的连接..

I have a question about how the calculate angles between coordinates / lines.
I have four labels filled with XY coordinates comma delimited.
Which C# code should I use to get the desired value in Label_Angle_Result

Preferred route
Fixed Point A . Label_FP_A . X,Y
Fixed Point B . Label_FK_B . X,Y

Measured point of GPS
GPS Point A . Label_GPS_A . X,Y
GPS Point B . Label_GPS_B . X,Y

Result
Angle Label_Angle_Result . number

What I have tried:

I look in the CAD solutions but I have not found anything good here in connection..

推荐答案

因为你有3个组件我们正在谈论3D空间中的向量(为什么?).. 。

要计算角度,你必须知道两件事:



1.两个向量的点积......

As you have 3 components we are talking about vectors in the 3D space (Why?)...
To calculate the angle you have to know two things:

1. Dot product of two vectors...


\vec {a} \cdot \ vec {b}
\vec{a} \cdot \vec{b}




哪个是


Which is


这篇关于计算坐标/线之间的角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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