?
Solved

Calculating East/West Latitude/Longitude points that are x miles from a given GPS point

Posted on 2011-09-23
3
Medium Priority
?
712 Views
Last Modified: 2012-05-12
Hello Experts,

I have a GPS point:

51.747724,-0.406958

I want to know what the GPS point is exactly 3 miles east and west of this point.

I've use the formulae to work out the northern position (in PHP):

$lat = 51.747724;
$lng = -0.406958;

$radius_metres = ceil(3 * 1609.344);
$top_lat = $lat + $radius_metres/111111*(cos(10 * pi() / 180));

$north_lat = $top_lat;
$north_lng = $lng;

Open in new window


East point:
$left_lng = $lng - $radius_metres/111111*(cos(10 * pi() / 180));
$east = array($lat,$left_lng);

Open in new window


West point:
$right_lng = $lng + $radius_metres/111111*(cos(10 * pi() / 180));
$west = array($lat,$right_lng);

Open in new window


However, when I use an as-the-crow-files formula, the point is approximately 1.8 miles away
(and not 3 miles)

What is the best way of working out the east and west points.
The maximum distance between my GPS coordinate and these points will be 20 miles (so not a lot).

Many Thanks!
0
Comment
Question by:jagku
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36590494
0
 
LVL 3

Accepted Solution

by:
nrbreen earned 2000 total points
ID: 36590940

You aren't taking account of the effect of lattitude on the width of a longitudinal degree,

$longitudinal_distance=3*1609.344;

$lng = -0.406958;
$latitude_degrees=51.747724;
$latitude_radians=$latitude_degrees*pi()/180;

$meridional_radius=6367449;

$longitudinal_delta_degrees =  $longitudinal_distance/(Cos($latitude_radians) * $meridional_radius * Pi() / 180 ) 

$left_lng = $lng - $longitudinal_delta_degrees ;
$east = array($lat,$left_lng);

$right_lng = $lng + $longitudinal_delta_degrees ;
$west = array($lat,$right_lng);

Open in new window

0
 

Author Closing Comment

by:jagku
ID: 36597713
Many Thanks!

I have realised that my formulae for north/south might not work either.
If I can't get it working - I'll post another question.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question