where r is in km and