CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

GPS question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rret



Joined: 01 Dec 2009
Posts: 9
Location: sherman CT

View user's profile Send private message

GPS question
PostPosted: Fri Mar 19, 2010 7:00 am     Reply with quote

I am building a "GPS box" that will only open when brought to a known set location. If I want to get to within +/- 300 ft of a location, how many minutes is that?
mbradley



Joined: 11 Jul 2009
Posts: 118
Location: California, USA

View user's profile Send private message Visit poster's website

PostPosted: Fri Mar 19, 2010 11:32 am     Reply with quote

This can not be answered directly, as distance in minutes is closer at the poles than the equator, and only for lon, not lat (I believe the order).

What you need is to know the distance between coordinates.

Here is a super simple formula, and its not accurate, but, well within your 300ft criteria.

Polar Coordinate Flat-Earth Formula
Code:

a = pi/2 - lat1
b = pi/2 - lat2
c = sqrt(a^2 + b^2 - 2 * a * b * cos(lon2 - lon1)
d = R * c

Abstracted from here, 1/4 page down
http://www.movable-type.co.uk/scripts/gis-faq-5.1.html

Also, there was a similar project on hackaday.com, about a week ago.
_________________
Michael Bradley
www.mculabs.com
Open Drivers and Projects
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group