GPS - Getting the distance,time while running and walking

后端 未结 5 1247
情话喂你
情话喂你 2020-12-19 18:51

i have a situation where i need to use GPS technique.

i need to find the distance between two points when the person is walking.

When the person starts walki

5条回答
  •  一向
    一向 (楼主)
    2020-12-19 19:32

    You can use currentTimeinMillis() to get your start and end time for your journey.

    You can then use the formulas explained here to find the distance and lastly you will have to use a reverse geocoding service such as Nominatim to be able to get the address of a place from your GPS coordinates.

    That being said, the distance formula will get you the distance between one point and the next, not the actual displacement. If this is not what you need, but rather you want the actual distance travelled you will need to calculate this value at a shorter interval.

提交回复
热议问题