Angle between two known android geolocations

后端 未结 4 492
鱼传尺愫
鱼传尺愫 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:05

    I'm not sure that I understand what you want to do, but check this: Android Reference, Location, distanceBetween(double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results)

    results parameter should be array of floats - at least 2 elements. Then in results[0] you will find distance and in results1 bearing between this two points. What is important "Distance and bearing are defined using the WGS84 ellipsoid."

提交回复
热议问题