how to convert gps north and gps west to lat/long in objective c

前端 未结 2 666
萌比男神i
萌比男神i 2021-01-26 14:17

I got these values from server:

34.22.123
81.59.345

I would like to convert these values

2条回答
  •  走了就别回头了
    2021-01-26 14:42

    The example you have given, already are latitude/longitude coordinates. There are many such lat,lon formats, what you want are lat/long coordinates in decimal degrees, probably with a sign to denote N/S or E/W.

    Use the formula above: (Degrees+(minutes/60)+(seconds/3600)) and multiply latitude with -1 when S is given. Multiply longitude by -1 when "W" is given.

提交回复
热议问题