more precise calculation for coordinates