[OSM-dev] Question about Calculating Radius from GPS cord
Fire Girl
firegirl at amorous.com
Fri Aug 8 17:02:15 BST 2008
I think I am following you! :)
Here is the math I have so far....
Calculation: 5 miles
of: 45.5 latitude
and: 25.5 longitude
-------------------------------
so, for the latitude, (i.e. add and subtract 2.5/69ths of a degree of
latitude)
With 5 miles assumed, and using that forumla, the distance from 45.5
would be:
45.505797 (on the plus side)
45.494203 (on the minus side)
Right? :)
but on the Longitude side, (i.e. 2.5/f) .... f = 69 * sin(latitude)
.... i am not so clear what Latitude number I should be using there and
what that might look like.
How do I look at least so far in my calculations? :)
----- Original Message -----
From: "David Earl"
To: "Fire Girl"
Subject: Re: [OSM-dev] Question about Calculating Radius from GPS
cord
Date: Fri, 08 Aug 2008 16:02:10 +0100
On 08/08/2008 14:30, Fire Girl wrote:
> I am working with OSM data, and would like to be able to spec out
> 5 mile bounding boxes from certain GPS points.
>
> After research into this problem, I am to understand that each
> degree of latitude is approximately 69 miles (111 kilometers)
> apart with a slight variance (68.703 - 69.407 miles) between the
> equator and the poles, and that each degree of longitude is
> widest at the equator @ 69.172 miles (111.321 kilometers) and
> gradually shrinks to zero at the poles. : ) :)
>
> So what does this mean? If I want to take a input point, like lets
say,
>
> 167.9 lat
> -29.1 lon
>
> or
>
> -63.1
> 18.1
>
> Can someone say with authority, what the 'calculus' would be to
> definitivly construct a NSWE bounding box with a 5 mile radius
> around those points?.... that would be basically close enough or
> accurate? :)
If you want accuracy, then you are asking the wrong question,
because the "bounding box" will be a curved section of a surface of
the earth (or, rather, the approximation to it defined by the
ellipsoid for the datum you're using for the lat/lon coordinates -
unless you want to start taking altitude and terrain into account),
not a flat straight-edged box. So if you want to talk in terms of
flat bounding boxes, you have to start asking "in what projection?"
etc.
If all you want is the lat/lon of the corners an approximate box
parallel to lines of latitude and longitude approx 5 miles across,
then
you could indeed just add and subtract 2.5/69ths of a degree of
latitude and 2.5/f of a degree of longitude, where f is the approx
length of one degree at that latitude, i.e. f = 69 * sin(latitude)
miles (with the reasonable approximation that the earth is a
sphere, so the trigonometry is trivial).
David
--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080808/fd6e605d/attachment.html>
More information about the dev
mailing list