compute distance using haversione formula implementation, write to csv