Angle between two known android geolocations

后端 未结 4 491
鱼传尺愫
鱼传尺愫 2021-01-14 09:52

I want to find an angle between two known geolocations.Basically what I want is, I want to direct an arrow whose tail point is at my current location and arrow head is point

4条回答
  •  花落未央
    2021-01-14 10:03

    This is simple trig, really. If they're close enough together, you can just use plane geometry. Take the two locations, figure out the right triangle that has the two locations as the acute angles, and compute.

    There's already a link to the basic math up.

    One thing -- if the locations are very far apart, you'll want to use spherical trig or the angles will be inaccurate.

    Well, there was a link ... http://www.easycalculation.com/trigonometry/triangle-angles.php

提交回复
热议问题