Click here to get back home

Formula for Dist Measuremet in WGS 84?

 HomeNewsGroups | Search | About
 comp.infosystems.gis    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Formula for Dist Measuremet in WGS 84? Suraj Joneja 07-30-2004
Get Chitika Premium
Posted by Suraj Joneja on July 30, 2004, 3:44 pm
Please log in for more thread options
Hi All,

I'm using a custom VB Program to plot LAt/Long on a screen. The formula that
I use to measure Distances is

Public Function calcDist(long1 As Double, lat1 As Double, long2 As Double,
lat2 As Double) As Double
calcDist = Earth_Radius * ArcCos(Sin(toRadians(lat1)) *
Sin(toRadians(lat2)) + Cos(toRadians(lat1)) * Cos(toRadians(lat2)) *
Cos(toRadians(long1 - long2)))
End Function

Now, this assumes the earth to be spherical (And so the Earth radius)
How Do I modify this formula to use a WGS 84 Ellipsoid?

Many Thanks,
Suraj




Posted by Bob Chamberlain on July 30, 2004, 9:10 am
Please log in for more thread options
Hi Suraj,

It's not easy. Check out the discussion deep inside
<http://www.census.gov/cgi-bin/geo/gisfaq?Q5.1>.

Bob

Bob (Robert G.) Chamberlain | Joe Pro: "You're not sure of anything?
rgc@jpl.nasa.gov | ... Is the earth round?"
Opinions & quips are mine | Bob: "Well, to the second order,
- or public - not JPL's | that seems to be a good approximation."



> Hi All,
>
> I'm using a custom VB Program to plot LAt/Long on a screen. The formula that
> I use to measure Distances is
>
> Public Function calcDist(long1 As Double, lat1 As Double, long2 As Double,
> lat2 As Double) As Double
> calcDist = Earth_Radius * ArcCos(Sin(toRadians(lat1)) *
> Sin(toRadians(lat2)) + Cos(toRadians(lat1)) * Cos(toRadians(lat2)) *
> Cos(toRadians(long1 - long2)))
> End Function
>
> Now, this assumes the earth to be spherical (And so the Earth radius)
> How Do I modify this formula to use a WGS 84 Ellipsoid?
>
> Many Thanks,
> Suraj


Posted by Suraj Joneja on July 31, 2004, 12:06 pm
Please log in for more thread options
Many Thanks,

I'm going through the great doc you referred, it'll take me some time!

This question came to my mind when In my GPS (Garmin Etrex) I changed the
Datum from WGS 84 to Everest (I'm in India, New delhi) I got slightly
different lat-long. This made me think that the GPS translates the position
it obtains through triangulation, to the ellipsoid chosen, for better
mappability on a map which uses Everest Datum. IS that correct?

If I further Ask something- I want to measure distances on a relatively
'local' basis- say All of India - Should I use a locally fitting ellipsoid?
or should I use WGS 84? If I use a globally best fitting ellipsoid, what is
the approximate loss of accuracy I'll have n my hands, say, for measuring 20
KM? will it depend entirely on the relief of the local area where I'm
measuring the distance?

And another thing- now when when DEM and DTMs are available, shouldn't all
of these elipsoids and datums be done away with? I mean you just get the DTM
of the area in question, and use 3D geometry to calculate distances, rather
tthan an approximating ellipsoid?

I'm rather new to GIS, so might sound rather...
Thanks Again

Suraj



> Hi Suraj,
>
> It's not easy. Check out the discussion deep inside
> <http://www.census.gov/cgi-bin/geo/gisfaq?Q5.1>.
>
> Bob
>
> Bob (Robert G.) Chamberlain | Joe Pro: "You're not sure of anything?
> rgc@jpl.nasa.gov | ... Is the earth round?"
> Opinions & quips are mine | Bob: "Well, to the second order,
> - or public - not JPL's | that seems to be a good approximation."
>
>
>
> > Hi All,
> >
> > I'm using a custom VB Program to plot LAt/Long on a screen. The formula
that
> > I use to measure Distances is
> >
> > Public Function calcDist(long1 As Double, lat1 As Double, long2 As
Double,
> > lat2 As Double) As Double
> > calcDist = Earth_Radius * ArcCos(Sin(toRadians(lat1)) *
> > Sin(toRadians(lat2)) + Cos(toRadians(lat1)) * Cos(toRadians(lat2)) *
> > Cos(toRadians(long1 - long2)))
> > End Function
> >
> > Now, this assumes the earth to be spherical (And so the Earth radius)
> > How Do I modify this formula to use a WGS 84 Ellipsoid?
> >
> > Many Thanks,
> > Suraj




Similar ThreadsPosted
Need conversion formula for x,y data September 28, 2005, 7:06 am
Formula for Earth radius at any given latitude. January 31, 2008, 1:54 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap