Capt. PERO Posted November 17, 2014 Report Posted November 17, 2014 Hi Pete, my name is peter and I am the author of SIMstarter a program to start your simulator with different profiles. I would like to implement a feature to select the starting position based on MakeRwys data. So far no problem.But I found out, that the data at G5.csv is not that precise that I would need. Example: EDDM (Munich, Gate 202) in runways.txt in file: Scenery\0601\scenery\APX51140.bgl Gate 202 [#G106]: N48:21:30.6333 E011:47:32.9532 Type 8 (Small Gate), Size 18.0m, Hdg 263.1T and in file: aerosoft\Afd\scenery\AF2_EDDM.BGL Gate 202 [#G106]: N48:21:30.6333 E011:47:32.9532 Type 8 (Small Gate), Size 18.0m, Hdg 263.1T Airlines: DLH CFG So far so good, both identical, because I installed Mega Airport Munich as well (just for clairification)...If we have a look into G5.csv searching for EDDM and Gate 202 we will find EDDM,,202,48.358513,11.792487,18.0,263.1,8,DLH,CFG But is that the right calculation? Because whenever I am using this value for latitude and longditue the plane will be slightly misplaced. N48:21:30.6333 should become 48.358509 not 48.358513 E011:47:32.9532 has been recalculated well to 11.792487 another example: EDDN (Nurnberg) N49:29:42.7500 E011:04:43.3772 should become 49.495208 11.078716 NOT 49.495167 11.078444 Is it a calculation problem or do I misunderstand these values?
mgh Posted November 18, 2014 Report Posted November 18, 2014 They are effectively the same. The calculation in runways.txt is: N48:21:30.6333 = 48 (degrees) + 21 *60 (minutes) + 30.6333 (seconds) = 48.35850925 degrees The calculation In g5.csv = 48.358513 degrees The difference is 48.35850925 - 48.358513 = 0.000003750 degrees which is a difference of 0.4167 m. Anyway, the actual values for the AIP from EDMM are Stand 202A N41 degrees 21.54 minutes or 48.359 degrees and Stand 202B N41 degrees 21.51 minutes or 48.3585 degrees. I don't what the differences are between A and B. The values from runway.tx are suspicious because they are given to a false accuracy of 4 decimal places of seconds. 0.0001 seconds is about 3 millimetre. That suggests they have been re-calculated from an original source
Capt. PERO Posted December 13, 2014 Author Report Posted December 13, 2014 Sorry for the late reply. ;O)I was on a business trip and forget to answer. SIMstarter is using that values to place the aircraft. Therefore it is quite important for me to get precise values. Could you please explain your calculation again? I am using: Starting: N48:21:30.6333 Seconds --------- + Minutes 60 Dezimalgrad = --------------------- + Grad 60 30,6333 --------- + 21 60 48,35850925 = --------------------- + 48 60 Thanks a lot! Seems for me, that there is a calulation mistake in G5.csv instead of runways.txt.
mgh Posted December 13, 2014 Report Posted December 13, 2014 There are no mistakes. The data is simply derived differently. runways.txt is clearly not right. As I explained, real word coordinates are not given to 4-decimal places of minutes.
Pete Dowson Posted December 13, 2014 Report Posted December 13, 2014 runways.txt is clearly not right. As I explained, real word coordinates are not given to 4-decimal places of minutes. Runways.txt is only logging values it finds. It is a progress log. What do you want it to show? Pete
Capt. PERO Posted December 13, 2014 Author Report Posted December 13, 2014 What do you want it to show? I am just wondering, why the values at G5.csv (LAT and LON) of an parking or gate are different comparing to runways.txt As I wrote I would like to use it to place aircrafts to the correct parking position. Using G5.csv would be much easier. ;O)
Pete Dowson Posted December 13, 2014 Report Posted December 13, 2014 I am just wondering, why the values at G5.csv (LAT and LON) of an parking or gate are different comparing to runways.txt As I wrote I would like to use it to place aircrafts to the correct parking position. Using G5.csv would be much easier. ;O) I thought mgh had already explained that they are not different. They can't be, they are obtained from the same data in the BGL! You don't appear to have noticed that my question was to mgh about why he thought "runways.txt is clearly not right". Pete
mgh Posted December 13, 2014 Report Posted December 13, 2014 As I said previously The values from runway.tx are suspicious because they are given to a false accuracy of 4 decimal places of seconds. 0.0001 seconds is about 3 millimetre. That suggests they have been re-calculated from an original source
Pete Dowson Posted December 13, 2014 Report Posted December 13, 2014 That suggests they have been re-calculated from an original source There's no specific accuracy being used. I just log the value I get with a default precision. By "recalculate from an original source" I've no idea what you think is going on. There are no recalculations to do, it is just a value in a file! What on Earth do you think is the recalculation being done? Re-projecting the Earth's surface or something? No, it's just the data that is available. Full stop. And the same data, albeit in a different format, goes into the G5 and any other files which demand it, all from the same database built up from reading the BGLs. Pete
mgh Posted December 13, 2014 Report Posted December 13, 2014 I have no where the data comes from. But, if they are based on the same database why are there differences between runways.txt (48.35850925 degrees) and from G5.csv (48.358513 degrees). That's a difference of 0.4167 m. Somehing must have changed them.
Capt. PERO Posted December 13, 2014 Author Report Posted December 13, 2014 I have no where the data comes from. But, if they are based on the same database why are there differences between runways.txt (48.35850925 degrees) and from G5.csv (48.358513 degrees). That's a difference of 0.4167 m. Somehing must have changed them. And that is exactly my problem. ;O)
mgh Posted December 13, 2014 Report Posted December 13, 2014 And that is exactly my problem. ;O) You can solve your problem either by truncating/rounding the data in your code before using the data.
Pete Dowson Posted December 14, 2014 Report Posted December 14, 2014 I have no where the data comes from. But, if they are based on the same database why are there differences between runways.txt (48.35850925 degrees) and from G5.csv (48.358513 degrees). That's a difference of 0.4167 m. Somehing must have changed them. The GATE structure being used, from the BGLs, has two fields: int nLon; // longitude in packed format int nLat; // latitude in packed format The FS "packed format" involves a calculation as follows to get a floating point position (this is for Latitude. Longitude is different of course): #define MAXSOUTH 536870912 double f = (((double) nLat)*180)/MAXSOUTH; if (f>90.0) f = -((f-180)+90); else f = 90-f; return (float) f; There's also a need for some of the results to return a 64-bit (long long) version, which would be: return (__int64) ((f * 10001750.0) / 90.0); FS, in different places, uses a mixture of all these ways of storing positions. If any inaccuracies arise they will be withing the limits of the precision of the storage methods used. The one used in the G5.CSV would be the floating point one. The one listed in Runways.txt is the __int64 one. Maybe the G5.CSV, using the 32-bit floating point form, is less accurate than the one logged in RUNWAYS.TXT. But is isn't "wrong". Hope this helps understand what is going on here. It these computations gives a difference of, what, just over 1 foot, I'm not sure what problems then arise. Perhaps someone can enlighten me? Pete
Pete Dowson Posted December 14, 2014 Report Posted December 14, 2014 I've modified MakeRunways to use double (64 bit) floating point accuracy for the Gate positions in G5.CSV, instead of 32-bit floats. But as far as your example is concerned, it is the same. The G5 positions are likely to be more accurate than those logged in the Runways.txt file because they've gone through less transformations from FS's 32-bit integer packing format. In the next update to MakeRunways I will probably truncate/round all the Lat/Lon positions logged to the equivalent of 1 decimal place of minutes. If you want the modified G5 download MakeRunways 4.677. Pete
Capt. PERO Posted December 14, 2014 Author Report Posted December 14, 2014 I've modified MakeRunways to use double (64 bit) floating point accuracy for the Gate positions in G5.CSV, instead of 32-bit floats. But as far as your example is concerned, it is the same. The G5 positions are likely to be more accurate than those logged in the Runways.txt file because they've gone through less transformations from FS's 32-bit integer packing format. In the next update to MakeRunways I will probably truncate/round all the Lat/Lon positions logged to the equivalent of 1 decimal place of minutes. If you want the modified G5 download MakeRunways 4.677. Pete Thanks a lot.
Recommended Posts
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