Components for calculating angle and distance from coordinates