First, the
meridian circumference (km)
40008.548
equatorial circumference (km)
40075.704
Latitude
40008.548 / 360 (degrees) = 111.135 km / degree
40008.548 / (360 * 60) (min) = 1.85 km / min
40008.548 / (360 * 60 * 60) (sec) = 30.87 m / s
Longitude
first count of latitude length of the respective longitudinal position of = 40075.704 * cos (longitude)
and the same method, in addition to the degree to become
Accordingly, such Beijing 40 degrees
40075.704 * COS (40) = 30699.77
40075.704 * COS (40) / 360 (degrees) = 85.277 km / degree
40075.704 * cos (40) / 360 * 60) ( min) = 1.42 km / min
40075.704 * cos (40) / 360 * 60 * 60) ( sec) = 23.688 m / s
Annex:
COS (A) = SiN (A-90)
Second, the distance between the two points is calculated latitude and longitude of two points known of
this I wrote a function with c #
{
double wd1 = ox;
double wd2 = dx;
double jd1 = oy;
double jd2 = dy;
double R = 6.371229 * 1000000.0;
double x,y,outdis;
x = (jd2 - jd1) * Math.PI * R * Math.Cos(((wd1 + wd2) / 2) * Math.PI / 180) / 180;
y = (wd2 - wd1) * Math.PI * R / 180;
outdis = Math.Sqrt(x * x + y * y);
return outdis / 1000;
}
ox, oy is the starting point of latitude and longitude, dx, dy latitude and longitude output destination is a few kilometers
here we regard the Earth as an ideal state, but also the approximate calculation
yourself to be a record.
Reproduced in: https: //www.cnblogs.com/dotLive/archive/2006/07/24/458438.html