Naveed_eng
Newbie level 5
Dears i m doing final yr prjct..
i want to calculate the distance between two latitude and longitude....
for this i found this fomula
Haversine formula:
R = earth’s radius (mean radius = 6,371km)
Δlat = lat2− lat1
Δlong = long2− long1
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)
c = 2.atan2(√a, √(1−a))
d = R.c
but lat1,lat2,long1,long2 which i m getting from GPS is in degree,min,sec format..ie: 542345N , 682233E
what should i do to convert it...
or if u have any formula or code , then plz send me
thx in advance
i want to calculate the distance between two latitude and longitude....
for this i found this fomula
Haversine formula:
R = earth’s radius (mean radius = 6,371km)
Δlat = lat2− lat1
Δlong = long2− long1
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)
c = 2.atan2(√a, √(1−a))
d = R.c
but lat1,lat2,long1,long2 which i m getting from GPS is in degree,min,sec format..ie: 542345N , 682233E
what should i do to convert it...
or if u have any formula or code , then plz send me
thx in advance