M
Marcus Fox
Sorry for making a new post, but it seems that the original has moved down
the page due to the date and wouldn't be as visible to new contributors.
Much more new information here.
Was using the Haversine formula to find the distance between two sets of
coordinates, but it seemed to break down where we didn't use North or West
coordinates, as Excel didn't like negative dd:mm:ss, as I would have has to
use for east and south. So I converted them to decimal degrees multiplying
by 24/-24 depending on a condition of N/S or E/W. The coordinates are
originally entered as they are on maps in dd:mm:ss format.
Lat1 is in B2, long1 is in B3, lat2 is in B5 and long 2 is in B6. The
letters N/S for latitude are in C2 and C5 and E/W in C3 and C6.
The formula is -
=6371*ACOS(COS(RADIANS(90-(IF(C2="S",B2*(-24),B2*24))))*COS(RADIANS(90-(IF(C
5="S",B5*(-24),B5*24))))+SIN(RADIANS(90-(IF(C2="S",B2*(-24),B2*24))))*SIN(RA
DIANS(90-(IF(C5="S",B5*(-24),B5*24))))*COS(RADIANS((IF(C3="E",B3*(-24),B3*24
))-(IF(C6="E",B6*(-24),B6*24)))))
Seems to work ok, until I realised that the earth isn't actually
spherical, - we can assume it is for the purposes of calculation, to get a
reasonably accurate approximation, as the above formula gives the radius of
curvature, but since the radius of curvature varies with latitude, say we
used a formula for an elipsoid, as the polar radius of the earth is 6357 km
and the equatorial radius 6378, would
Radius =
6378*(1-(1-6357^2/6378^2)^(1/2)^2)/(1-(1-6357^2/6378^2)^(1/2)^2SIN^2(lat))^(
3/2)
do instead of the figure of 6371 for the radius at the start of the first
equation, but I do notice I need to use a figure for the latitude, and since
I have two different latitudes as two different points, how do I integrate
it into my equation?
Marcus
the page due to the date and wouldn't be as visible to new contributors.
Much more new information here.
Was using the Haversine formula to find the distance between two sets of
coordinates, but it seemed to break down where we didn't use North or West
coordinates, as Excel didn't like negative dd:mm:ss, as I would have has to
use for east and south. So I converted them to decimal degrees multiplying
by 24/-24 depending on a condition of N/S or E/W. The coordinates are
originally entered as they are on maps in dd:mm:ss format.
Lat1 is in B2, long1 is in B3, lat2 is in B5 and long 2 is in B6. The
letters N/S for latitude are in C2 and C5 and E/W in C3 and C6.
The formula is -
=6371*ACOS(COS(RADIANS(90-(IF(C2="S",B2*(-24),B2*24))))*COS(RADIANS(90-(IF(C
5="S",B5*(-24),B5*24))))+SIN(RADIANS(90-(IF(C2="S",B2*(-24),B2*24))))*SIN(RA
DIANS(90-(IF(C5="S",B5*(-24),B5*24))))*COS(RADIANS((IF(C3="E",B3*(-24),B3*24
))-(IF(C6="E",B6*(-24),B6*24)))))
Seems to work ok, until I realised that the earth isn't actually
spherical, - we can assume it is for the purposes of calculation, to get a
reasonably accurate approximation, as the above formula gives the radius of
curvature, but since the radius of curvature varies with latitude, say we
used a formula for an elipsoid, as the polar radius of the earth is 6357 km
and the equatorial radius 6378, would
Radius =
6378*(1-(1-6357^2/6378^2)^(1/2)^2)/(1-(1-6357^2/6378^2)^(1/2)^2SIN^2(lat))^(
3/2)
do instead of the figure of 6371 for the radius at the start of the first
equation, but I do notice I need to use a figure for the latitude, and since
I have two different latitudes as two different points, how do I integrate
it into my equation?
Marcus