Location.distanceBetween() 返回的初始方位的比例是多少

发布于 2024-09-26 16:08:04 字数 157 浏览 2 评论 0原文

当调用 Location.distanceBetween() 并获取初始和最终方位时,方位的比例是多少?我得到了负值,这对我来说没有意义。方位角从 0 度到 360 度(相对或绝对,没关系)。我唯一能想到的是N到E到S是0到180度,N到W到S是0到-180度。

有人可以解释一下吗?

When calling Location.distanceBetween() and getting the initial and final bearing, what scale is the bearing in? I'm getting negative values, which doesn't make sense to me. Bearing goes from 0 to 360 degrees (relative or absolute, it doesn't matter). The only thing I could think of is N through E through S is 0 through 180 degrees, and N through W through S is 0 through -180 degrees.

Can someone shed some light on this?

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

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

发布评论

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

评论(1

花开浅夏 2024-10-03 16:08:04

正如您已经得出的结论:

在函数描述中,提到了真北以东的度数。真北是地理上的,与通过地磁(南磁极)确定的北有些不同。

因此,如果您向东移动,您的方位角为 90 度,如果您向南移动,则为 +180 或 - 180,如果您向西移动,则为 -90 度。

As you already concluded:

In the function description, degrees East of true North are mentioned. True North is geographical, which somewhat differs from North determined via Earth magnetism (South magnetic pole).

So, if you are moving towards East, your bearing is 90 degrees, if you are moving towards South it is +180 or - 180, if you are moving towards West it is -90 degrees.

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