latitude-longitudefilemaker

Filemaker Convert DD MM SS TO DD.DDD


I am trying to convert the following fields:

LAT SS
LAT MM
LAT DD

to LATITUDE DD.DDD

LONG SS
LONG MM
LONG DD

to LONGITUDE DD.DDD

I've tried with a script but with NO resolve.

Dumped Vehicle::LATITUDE=(Dumped Vehicle::LAT SS/3600)+(Dumped Vehicle::LAT MM/60)+Dumped Vehicle::LAT DD

What am I doing wrong?

My idea was the user would enter the DD MM SS and the script would calculate during the entry of any of the fields upon exit or save of each field.


Solution

  • You don't need a script for this - only calculation fields.

    The basic formula to convert latitude or longitude given as degrees, minutes and seconds to decimal degrees is:

    degrees + minutes / 60 + seconds / 3600

    However, to determine the sign of the result, you also need to know the direction: North or South for the latitude, East or West for the longitude. I don't see that you have a field for that.