Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Positions/Location

Featured Replies

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

Lattitude and logitude..

Did I spell those correct?

Not quite. :P

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.

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.

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.

  • Author

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 by Guest
Thought to add this..

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.