Professional Documents
Culture Documents
https://www.youtube.com/watch?v=O8JsMKAEjZg
hi friend,
try following in excel, refer the diagram
Angles-Radians, Distance-km
location x = (Px,Qx)
location y = (Ry,Sy)
Qx = ASIN(SIN(LatA)*COS(x/6371) + COS(LatA)*SIN(x/6371)*COS(α))
Px = LonA + ATAN2(COS(x/6371)-SIN(LatA)*SIN(Qx), SIN(α)*SIN(x/6371)*COS(LatA))
Sy = ASIN(SIN(LatB)*COS(y/6371) + COS(LatB)*SIN(y/6371)*COS(β))
Ry = LonB + ATAN2(COS(y/6371)-SIN(LatB)*SIN(Sy), SIN(β)*SIN(y/6371)*COS(LatB))
A method is given for calculating the destination point for ellipsoid earth
models using Vincenty's formula, and a second method is given to
calculate the destination point for a spherical earth model. For both
methods:
Convert the starting point latitude 'lat1' (in the range -90 to 90) to radians.
lat1 = lat1 * PI/180
Convert the starting point longitude 'lon1' (in the range -180 to 180) to
radians.
lon1 = lon1 * PI/180
Convert the bearing 'brg' (in the range 0 to 360) to radians.
brg = brg * PI/180
1. Given the distance s in meters, the semi-major axis 'a' in meters, the semi-
minor axis 'b' in meters and the polar flattening 'flat'.
2. Calculate the destination point useing Vincenty's formula. Shortened
variable names are used.
f = 1/flat
sb=sin(brg)
cb=cos(brg)
tu1=(1-f)*tan(lat1)
cu1=1/sqrt((1+tu1*tu1))
su1=tu1*cu1
s2=atan2(tu1, cb)
sa = cu1*sb
csa=1-sa*sa
us=csa*(a*a - b*b)/(b*b)
A=1+us/16384*(4096+us*(-768+us*(320-175*us)))
B = us/1024*(256+us*(-128+us*(74-47*us)))
s1=s/(b*A)
s1p = 2*PI
3. Loop through the following while condition is true.
while (abs(s1-s1p) > 1e-12)
cs1m=cos(2*s2+s1)
ss1=sin(s1)
cs1=cos(s1)
ds1=B*ss1*(cs1m+B/4*(cs1*(-1+2*cs1m*cs1m)- B/6*cs1m*(-
3+4*ss1*ss1)*(-3+4*cs1m*cs1m)))
s1p=s1
s1=s/(b*A)+ds1
4. Continue calculation after the loop.
t=su1*ss1-cu1*cs1*cb
lat2=atan2(su1*cs1+cu1*ss1*cb, (1-f)*sqrt(sa*sa + t*t))
l2=atan2(ss1*sb, cu1*cs1-su1*ss1*cb)
c=f/16*csa*(4+f*(4-3*csa))
l=l2-(1-c)*f*sa* (s1+c*ss1*(cs1m+c*cs1*(-1+2*cs1m*cs1m)))
d=atan2(sa, -t)
finalBrg=d+2*PI
backBrg=d+PI
lon2 = lon1+l;
5. Convert lat2, lon2, finalBrg and backBrg to degrees
lat2 = lat2 * 180/PI
lon2 = lon2 * 180/PI
finalBrg = finalBrg * 180/PI
backBrg = backBrg * 180/PI
6. If lon2 is outside the range -180 to 180, add or subtract 360 to bring it back
into that range.
7. If finalBrg or backBrg is outside the range 0 to 360, add or subtract 360 to
bring them back into that range.
Note: the variables 'a', 'b' and 'flat' above have the following
relationships:
b = a - (a/flat)
flat = a / (a - b)
To calculate the distance between two points, our azimuth calculator uses the
Haversine formula:
a = sin²(Δφ/2) + cos φ₁ ⋅ cos φ₂ ⋅ sin²(Δλ/2)
d = R ⋅ c
where:
φ₁ is the latitude of initial point (positive for N and negative for S);
φ₂ is the latitude of the final point (positive for N and negative for S);
is the longitude of the initial point (positive for E and negative for
λ₁
W);
λ₂ is the longitude of the final point (positive for E and negative for W);
Δφ = φ₂ - φ₁;
Δλ = λ₂ - λ₁;
θ = atan2 [(sin (-43.18°) ⋅ cos (-22.97°)), (cos (51.50°) ⋅ sin (-22.97°) − sin
(51.50°) ⋅ cos (-22.97°) ⋅ cos (-43.18°))] = -2.455 rad