Calculation returns wrong values

Using Haversine formula
See my blueprint:

  1. Your formula is wrong, your functions require radians (Multiply by PI and divide by 180 => DLat, DLong, LatHome for COS and LatDest for COS).
  2. Those coordinates are more than 1km apart. More like 70-100km.
  3. You’ll get kilometers when using R=6371 or meters when using R=6371000