Skip to content

Instantly share code, notes, and snippets.

View rasikabh's full-sized avatar

Rasika Bhalerao rasikabh

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rasikabh on github.
  • I am rasikabh (https://keybase.io/rasikabh) on keybase.
  • I have a public key ASB0ppn_ivgaKRojk0OQYFOBqO1MONL3d1mUARgd_CGzYgo

To claim this, I am signing this object:

deg2rad <- function(deg) {
return(deg*pi/180)
}
# Calculates the geodesic distance between two points specified by radian latitude/longitude using the
# Haversine formula
gcd <- function(long1, lat1, long2, lat2) {
long1 = deg2rad(long1)
lat1 = deg2rad(lat1)
long2 = deg2rad(long2)