Location.distanceBetween() 返回的初始方位的比例是多少
当调用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您已经得出的结论:
在函数描述中,提到了真北以东的度数。真北是地理上的,与通过地磁(南磁极)确定的北有些不同。
因此,如果您向东移动,您的方位角为 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.