|
Karen, Where are you getting your Long and Lat numbers? From zip code? For a zip code Long and Lat are typically defined as the "center" of that zip code, so this isn't an exact science to begin with. We've done a number of "locations w/in ? Miles of me" type applications and the following formula has always worked fine: SQRT(Power(69.1*(Lat2 - Lat1), 2) + Power(53*(Long2-Long1), 2)) That is X = (Lat2-Lat1)*69.1 Y = (Long2-Long1)*53 Distance = SquareRoot( X*X + Y*Y ) See http://www.meridianworlddata.com/HTML10/distance-latitude-longitude-2.as p for more information. Now, is this formula as accurate as the longer one? NO! But given that we're dealing w/inaccurate information to begin with it's "good enough" for most uses. If you actually have lat/long values for your customers (from GPS in the truck?) then you may need the more accurate formula. -Walden ------------ Walden H Leverich III President & CEO Tech Software (516) 627-3800 x11 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.