opencaching.com Forum Index opencaching.com
Geocaching by the community, for the community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

lat/lon perimeter coords

 
Post new topic   Reply to topic    opencaching.com Forum Index -> Code Monkeys
View previous topic :: View next topic  
Author Message
AxsDeny



Joined: 30 Sep 2005
Posts: 1

PostPosted: Fri Sep 30, 2005 7:48 am    Post subject: lat/lon perimeter coords Reply with quote

I'm trying to retrieve coords that fall on the perimeter of a circle that is 50 miles in radius from a central coordinate set. Using the great circle method I'm able to determine distance from the central point.

Anyone have some PHP code that would accomplishg determining such an array? I would say that a point at every 1 degree of rotation would be enough points.

I've been able to brute force it by creating an array of all possible coords in the area then using great circle to find those that fall on a 50 mile distance. But that is less than ideal for my sanity (and my processor power.)

Help appreciated. Wink
Back to top
View user's profile Send private message
Scout



Joined: 16 Sep 2003
Posts: 235

PostPosted: Mon Oct 03, 2005 9:51 am    Post subject: Reply with quote

What you want to do is project a waypoint, given the center of your circle and your radius.

Divide 360 by the number of waypoints you want on your circle, then project a new waypoint for each step around the circle, keeping the center and radius the same.

An online resource that can project a waypoint for you can be found at http://williams.best.vwh.net/gccalc.htm
_________________
Scout http://GPSgames.org

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    opencaching.com Forum Index -> Code Monkeys All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  



Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group