• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Converting LAT/LONG to decimal

Messages
123
Country
us-massachusetts
Hey guys ... here's an easy one for you:

FSX displays LAT/LONG information in this format:

LAT: N36 degrees 14.46'
LON: W11 degrees 1.33'

However, there are some instances where I need to specify LAT/LON information in the following format (for example, in a camera.cfg):

LAT: N42.203762
LON: W71.005939

How do I make this conversion?

Thanks to all for thinking about this for me. I am mystified.

Cheers,
Kevin

(And to my ACES friends ... can we pick one method? Or is there some reason that's not possible?)
 
Well there are 60 minutes to one degree so I suspect dividing the second part by 60 and adding it to the degrees part would give you decimal degrees. There are also 60 seconds to one minute so if you had degrees minutes and seconds dividing the seconds by 3600 and adding it would take care of that bit. To convert to pure decimal drop the NSE or W. If it is S or W then make it negative.


See here: http://id.mind.net/~zona/mmts/trigonometryRealms/degMinSec/degMinSec.htm
 
Last edited:
FSX displays LAT/LONG information in this format:

LAT: N36 degrees 14.46'
LON: W11 degrees 1.33'
Only if you don't tell it not to ;)

Add these lines to the [Main] section of your fsx.cfg:

LatLonFormat=Degrees
FractionalLatLonDigits=6


George
 
George,

Thanks much! Exactly the info I was hunting. While I'm sure Scruffy's method is equally effective, I got a headache just reading his reply. :eek:

Cheers mate.

Kevin
 
Actually, it's not that difficult at all. To elaborate more, here's an example using some numbers for KBOS, from http:www.airnav.com:


Lat/Long: 42-21-46.7000N / 071-00-23.1000W
42-21.778333N / 071-00.385000W
42.3629722 / -71.0064167


Always divide the decimal part first, then add to the number immediately to the left. So:

46.7000 / 60 = 0.77833333 + 21 = 21.7833333
This is confirmed by the second set of numbers. Now continue left:

21.778333 / 60 = 0.362972216 + 42 = 42.362972216
Again, a match; just trim the decimal places to your desired length.

You can reverse the process by simply subtracting the integer value of the full number and then multiplying the decimal portion by 60:

42.362972216 - 42 = 0.362972216
0.362972216 * 60 = 21.77833296, etc.

Sorry but, I've done a lot of stuff with these conversions already so, just had to let it spill out. :D
 
Kevin,

You want me to write you a little app. to take care of those numbers? I could do it in about 5 minutes and email it to ya.
 
Nah, that's OK. Thanks for the offer however.

George's solution works fine. I think some of the point I was trying to make is that in Flight Simulator development, sometimes the SDK wants a variable expresed in one way, and sometimes, it wants it in another way - forcing the developer to spend time performing a conversion.

Kind of frustrating sometimes. I'm sure there's a logical reason for it ... nevertheless, well, here we are.

My pet peeve is the "Mission Completed" and "Mission Uncompleted" images, which are required to be 16-bit images to display properly in the UI.

16 bits? No other image in FSX is required to be in 16-bit format. Just those two. Takes just a moment or two to do the conversion, but really, why?

/whineoff
 
Last edited:
I can do the math but haven't the time. I used to have neat conversion ultilities that converted many items; lat and lon was one. I can't remember where I found this. It is out there somewhere. I've lost it since my computer crash. Now have a ext hard drive backup system which ain't worth a tinker's dam in my opinion.

I think the purpose of this question is when can I get a calc to do this... rather than a math lesson.

Yes- I can do it myself. I once figured out how to convert from fahrenheit to Celsius and back. Later I ofund the formula and found I figured it correctly.

I want a small utility to convert deg to dec deg and back. I'm working on some scenery, not attending a math class.

These algorithms are helpfull but a small utility would be nice. The one I had did this 3 different ways. Just wish I could remember where I found it. Google hasn't helped a bit.
 
Here's the utility I had. Spent a good 2 hours find this again. From Mentor software. Free utility.

Hope this helps all. Let me know if this helped anyone. Bob
 
Last edited:
Back
Top