|
-
Oct 7th, 2002, 05:54 AM
#1
Thread Starter
New Member
Orthodromic Distance Code
Hello!!
I have a lot of work and i want please if someone may help me and give the complete code in VB6 of the following formula:
It is the formula of the shortest distance between two points of the terrestrial surface.
Supposing a spherical erath model, the formula will be: formula of the ORTHODROMIC DISTANCE BETWEEN TWO POINTS OF TERRESTRIAL SURFACE.
Let the points be: A(lat1, lon1) And B(lat2, lon2)
dlat = lat1 - lat2
dlon = lon1 - lon2
a = sin²(dlat/2) + cos(lat1).cos(lat2).sin²(dlon/2)
d(A,B) = 2.R.arctan[square root (a) / square root (1-a)]
Formulas of conversion:
The unit of the co-ordinates is either in degree (°), or in (hour, minute, second), or in (°, ',").
Conversion degree - > radian: 1° = pi/180 radians
Conversion (hr, min, sec) - > degree: 1 hr = 15°; 1 min = (15/60)°; 1 sec = (15/3600)°
Conversion (dd° mm' ss") - > degree: 1' = (1/60)°; 1"= (1/3600)°
For the unit of the distance we have:
the inch (in), the foot (ft), the yard (yd), kilometer (km), the international nautical mile (Int nmi) and the statute mile (mi).
1 km = E+5/2,54 in;
1 km = E+4/3,048 ft;
1 km = E+4/9,144 yd;
1 km = 1/1.852 Int nmi;
1 km = 1/1,609344 mi
The unit of the distance will be the same one as the earth's mean radius R .
For calculations we will take R = 6371 km exactly.
For better results it is necessary to take in calculation 7 significant figures at least.
Thank you for your assistance!
-
Oct 7th, 2002, 07:02 AM
#2
Lively Member
This should go in the maths forum.
Rob.
Window XP: From the makers of DoubleSpace...
Press ANY key... NO, NO, NO!!! NOT THAT ONE!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|