jim lee Posted September 8, 2005 Posted September 8, 2005 Lattitude and logitude.. Did I spell those correct? I'd like a field type that would hold a lat/lon position, and at least a calculation for distance between two points. -jim lee
Ender Posted September 8, 2005 Posted September 8, 2005 Lattitude and logitude.. Did I spell those correct? Not quite. I'd like a field type that would hold a lat/lon position, and at least a calculation for distance between two points. You can use regular number fields to hold latitude and longitude. The trick is calculating the distance. While the distance between latitude points is consistent (though don't ask me what it is,) the distance between longitude points depends on the latitude. There's probably some magic formula out there that can determine distance correctly, if you can locate it, then it's a simple matter to build a calc out of it with the latitude and longitude fields as inputs.
comment Posted September 8, 2005 Posted September 8, 2005 It is not that simple. First, latitude and longitude are not sufficient input - you need to know the radius. Since the Earth is not a perfect sphere, the choice of a radius can be difficult. Next, there is a variety of formulae out there to choose from - including two custom functions on Brian Dunning's site.
Ender Posted September 8, 2005 Posted September 8, 2005 I hadn't thought about the differences due to the ellipsoid shape of the Earth. It looks like the CFs on Brian Dunning's site use either some sort of Mean Radius or the Equatorial Radius. I would imagine for someone good at geometry and trigonometry (not me,) it should be possible to calculate the radius for each latitude, and use those if precision is important.
jim lee Posted September 8, 2005 Author Posted September 8, 2005 (edited) Oh, Thanks! That site is absolutly too cool! The distance calculation seems to work. I'll test it more tonight. Now I -really- wish costom calculations were global to all my FM files. P.S. I wanted the Lat/Lon stuff for sailing. So the radius, for me, is pretty much sea level. This'll be fine, all I needed was a "which port is closest to me" kinda' thing. -jim lee Edited September 8, 2005 by Guest Thought to add this..
Recommended Posts
This topic is 7016 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now