September 30, 200718 yr I'm having difficulties converting the lat / lon of airports & runways from the BGL format to decimal. I'm using the formulae:double airLon = br.ReadInt32() * (360.0 / ((3.0 * 0x10000000) - 180.0));double airLat = br.ReadInt32() * (180.0 / (2.0 * 0x10000000));Using Scenery0302sceneryAPX25170.bgl as an example, Dowagiac Municipal (C91) is the first airport and should have roughly 41.9929342 / -86.1280125 as its coordinates, but I am getting 48.007066436111927 / 93.872006953956259the bgl coded longitude retrieved from the example file is 209988078the bgl coded latitude retrieved from the example file is 143186653I'm not sure whether this is a C# casting (don't think so) issue, or a problem with the formulae I'm using. Any pointers would be appreciated.Cheers
October 1, 200718 yr Jacky,Your english is just fine!looks like 90 - my lat == correct lat and my lon - 180 == correct lonThanks for the pointers. The formulae I was using came from Winfried Orthmann's FS X BGL File Structure doc, which has been fantastically useful.Cheers
Create an account or sign in to comment