public double getAngle ( Location location ) { // Euclidean distance (Pythagorean theorem) - not correct when the surface is a sphere double latitudeDifference = location . latitude - latitude ; double longitudeDifference = location . longitude - longitude ; return Math . atan2 ( latitudeDifference , longitudeDifference ) ; }
The angle relative to the direction EAST .