Christchurch Landscape - Runway Direction data

Moderators: Uros, OXO

Post Reply
User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Christchurch Landscape - Runway Direction data

Post by JBlyth » Mon May 11, 2020 4:33 am

I hope this is the correct part of the forum to ask this on...

I have been using Frank Paynter's nice utility CondorWPFileGen.exe to extract Airport and Waypoint data from Condor to LK8000.

In the Christchurch Landscape, every Airport runway bearing data seems to be different from my other landscapes in that the numbers are 6 digits rather than the 1-3 digits expected.
"Christchurch",,,4329.292S,17231.968E,33m,5,113110,1000,0,

Sorry, but in spite of Bod1's excellent description of the .apt file format, I am not sufficiently skilful to decipher the .apt data for Christchurch field by field.

Is there an error in the runway bearing field in the Christchurch.apt file, or is it in the extraction process to .cup? I have attached the Christchurch.apt file to save you looking for it.....

The designer of the landscape gives me the impression that he didn't create the Christchurch.apt file, so I don't know where else to turn....

Many thanks
John in Sunny Carnarvon - Western Australia
You do not have the required permissions to view the files attached to this post.

User avatar
EDB
Posts: 1575
Joined: Mon Oct 31, 2011 1:17 am
Location: The Netherlands, Europe Continent, Earth Planet, Milky Way Galaxy, Virgo Super Cluster

Re: Christchurch Landscape - Runway Direction data

Post by EDB » Mon May 11, 2020 4:47 am

I haven't checked that landscape, but I think it is made with the latest LE. We now can enter the correct heading of the runway in decimal degrees. These newer landscapes are only compatible with Condor 2.0.8 and above...

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Christchurch Landscape - Runway Direction data

Post by JBlyth » Mon May 11, 2020 8:37 am

Ah Ha!

That could be it. Can you point me towards any other newer landscapes that will have used that degree of accuracy, and I will check Frank's program against them...

Many thanks
John in Sunny Carnarvon - Western Australia

User avatar
EDB
Posts: 1575
Joined: Mon Oct 31, 2011 1:17 am
Location: The Netherlands, Europe Continent, Earth Planet, Milky Way Galaxy, Virgo Super Cluster

Re: Christchurch Landscape - Runway Direction data

Post by EDB » Mon May 11, 2020 1:09 pm

No.
I haven't seen many new landscapes yet.

User avatar
wickid
Posts: 2429
Joined: Mon Dec 04, 2006 7:32 pm
Location: Venlo, NL
Contact:

Re: Christchurch Landscape - Runway Direction data

Post by wickid » Mon May 11, 2020 1:13 pm

Look on Condor-club. You can sort by release date.
PH-1504, KOE

Xavier
Posts: 622
Joined: Fri Jun 20, 2008 2:22 pm
Location: France

Re: Christchurch Landscape - Runway Direction data

Post by Xavier » Mon May 11, 2020 1:49 pm

Hi JBlyth

I can confirm that the Christchurch scenery is made with Landscape Editor 2.01 with all the airports with the new coding (some sceneries had mixed data about direction).

I use a modified version of vnks dirty Python 3.8 code to open the apt file for Landscapes Editor 2.01
------------------------------------
# Made by vnks (2020) and XDL pour version 2.01 de LandscapeEditor.



import struct



with open("Christchurch.apt", "rb") as afile:
# Le script python et le fichier apt doivent être dans le même répertoire.
while True:
len = struct.unpack("B", afile.read(1))[0]
name = afile.read(len)
print(name)
padding = afile.read(0x23 - len)
lat, lon, alt, direction, length, width, d1, d2, d3 = struct.unpack("<fffllllll", afile.read(36))
direction = (direction - 100000)/100
print(lat, lon, alt, direction, length, width, d1, d2, d3)

________________________________

and the result is :

===================================== RESTART: C:\Users\user\Documents\Test\OuvrirApt2.py ====================================
b'Marlborough'
-41.51774978637695 173.86953735351562 32.0 87.85 1415 40 0 1123483648 0
b'Omaka Blenheim'
-41.54145050048828 173.9241485595703 30.0 138.0 930 40 0 1123483648 0
b'Cape Campbell'
-41.74359893798828 174.2729949951172 8.0 31.0 600 15 0 1123483648 256
b'Picton Koromiko'
-41.34519958496094 173.95701599121094 26.0 32.65 800 12 0 1123483648 0
b'Nelson'
-41.29384994506836 173.2218475341797 5.0 43.0 690 40 0 1123483648 65536
b'Motueka'
-41.12030029296875 172.9915008544922 13.0 47.7 670 13 0 1123483648 0
b'Takaka'
-40.81399917602539 172.77618408203125 26.0 21.2 800 15 0 1123483648 0
b'Triangle Flat'
-40.51681900024414 172.7487030029297 14.0 62.0 700 15 0 1123483648 256
b'Karamea'
-41.236549377441406 172.1060028076172 9.0 29.3 920 12 0 1123483648 0
b'Murchison'
-41.79570007324219 172.3145751953125 164.0 148.85 650 15 0 1123483648 0
b'Kaikoura'
-42.42443084716797 173.60435485839844 10.0 68.6 688 10 0 1123483648 256
b'Hanmer Springs'
-42.550201416015625 172.8262939453125 332.0 89.0 900 25 0 1123483648 0
b'Culverden'
-42.76496887207031 172.89352416992188 184.0 28.0 1020 30 0 1123483648 0
b'Rangiora'
-43.28860092163086 172.54144287109375 57.0 92.5 1180 50 0 1123483648 0
b'West Melton'
-43.476409912109375 172.39259338378906 93.0 68.2 800 17 0 1123483648 0
b'Christchurch'
-43.48820114135742 172.53280639648438 33.0 131.1 1000 40 0 1123483648 0
b'Lake Haupiri'
-42.60015106201172 171.69955444335938 213.0 129.0 800 12 0 1123483648 0
b'Lake Station'
-41.76110076904297 172.7509002685547 520.0 129.0 800 20 0 1123483648 256
b'Molesworth'
-42.088600158691406 173.27940368652344 860.0 79.0 800 12 0 1123483648 0
b'Kings'
-43.63949966430664 172.53036499023438 9.0 9.7 480 12 0 1123483648 0
b'Dunsandel'
-43.67995071411133 172.15139770507812 82.0 63.8 1000 25 0 1123483648 0
b'Ashburton'
-43.90079879760742 171.7989959716797 90.0 179.0 1000 30 0 1123483648 0
b'Pudding Hill'
-43.58660125732422 171.52659606933594 476.0 39.4 780 15 0 1123483648 65536
b'Hakatere'
-43.57609939575195 171.1707000732422 624.0 169.0 730 15 0 1123483648 0
b'Arrowsmith'
-43.46839904785156 171.1629638671875 702.0 169.0 800 12 0 1123483648 0
b'Manuka P Lodge'
-43.27793884277344 171.20509338378906 542.0 74.0 630 12 0 1123483648 0
b'Mesopotamia'
-43.64105987548828 170.90550231933594 484.0 124.0 750 15 0 1123483648 0
b'Westport'
-41.736351013183594 171.57916259765625 2.0 57.1 1267 28 0 1123483648 0
b'Greymouth'
-42.46171188354492 171.1903839111328 4.0 31.3 965 34 0 1123483648 0
b'Hokitika'
-42.71025085449219 170.98634338378906 42.0 57.15 1155 35 0 1123483648 0
b'Franz Josef'
-43.36220169067383 170.13270568847656 92.0 124.8 786 12 0 1123483648 256
b'Mount Cook'
-43.76565170288086 170.13499450683594 656.0 154.75 1457 30 0 1123483648 0
b'Fox Glacier'
-43.45962905883789 170.0157928466797 157.0 114.7 600 12 0 1123483648 0
b'Glentanner'
-43.9102783203125 170.12887573242188 540.0 170.6 1050 20 0 1123483648 0
b'Tekapo'
-44.0046501159668 170.4436798095703 758.0 135.5 800 13 0 1123483648 0
b'Springfield'
-43.3828010559082 171.9114532470703 368.0 61.0 800 40 0 1123483648 0
b'Maruia'
-42.266761779785156 172.21279907226562 378.0 21.4 800 15 0 1123483648 0
b'Forest Field'
-43.38199996948242 172.36216735839844 122.0 19.7 900 20 0 1123483648 0
b'Omihi'
-43.01115036010742 172.8571014404297 89.0 157.0 670 20 0 1123483648 65536
b'Mayfield'
-43.823699951171875 171.4515838623047 248.0 152.7 1000 20 0 1123483648 0
b'Ikamatua'
-42.28950119018555 171.6968231201172 125.0 145.0 720 20 0 1123483648 0
b'Haast'
-43.86479949951172 169.04139709472656 8.0 176.0 730 15 0 1123483648 0
b'Wellington'
-41.32680130004883 174.80709838867188 5.0 5.4 1000 30 0 1123483648 0
Traceback (most recent call last):
File "C:\Users\user\Documents\Test\OuvrirApt2.py", line 12, in <module>
len = struct.unpack("B", afile.read(1))[0]
struct.error: unpack requires a buffer of 1 bytes
>>>
_____________________________

For direction all is said on line 17 (underlined)

"Cup file Direction" = ("Direction int apt file" -100000)/100

Hope this help you
*****- Xavier - (XDL - VR FAN) *****

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Christchurch Landscape - Runway Direction data

Post by JBlyth » Mon May 11, 2020 3:26 pm

Thank you Xavier,
'
That is very helpful. I can see that Frank's most useful app needs to be updated to handle that extra accuracy in runway bearing.

It is an interesting degree of accuracy, as in the real world of aviation, an accuracy to the nearest 10 degrees is used when denoting runway bearing - but my wife tells me I am often wrong.

Cheers
John in Sunny Carnarvon - Western Australia

User avatar
wickid
Posts: 2429
Joined: Mon Dec 04, 2006 7:32 pm
Location: Venlo, NL
Contact:

Re: Christchurch Landscape - Runway Direction data

Post by wickid » Mon May 11, 2020 4:38 pm

JBlyth wrote:
Mon May 11, 2020 3:26 pm
Thank you Xavier,
'
That is very helpful. I can see that Frank's most useful app needs to be updated to handle that extra accuracy in runway bearing.

It is an interesting degree of accuracy, as in the real world of aviation, an accuracy to the nearest 10 degrees is used when denoting runway bearing - but my wife tells me I am often wrong.

Cheers
John in Sunny Carnarvon - Western Australia
It is to line up runways exactly with photorealistic textures.
PH-1504, KOE

Xavier
Posts: 622
Joined: Fri Jun 20, 2008 2:22 pm
Location: France

Re: Christchurch Landscape - Runway Direction data

Post by Xavier » Mon May 11, 2020 4:42 pm

JBlyth,

I am happy that my answer help you.

But the initial vnks script reads the 2 kinds of direction coding because Uros use a trick to avoid changing the structure of the apt files.
Here is the coding of vnks/

lat, lon, alt, direction, length, width, d1, d2, d3 = struct.unpack("<fffllllll", afile.read(36))
if (direction > 365):
direction = (direction - 100000) / 100 + ((direction % 100) / 100.0)


In the first line I underline the type stucture that is <fffIIIIII> (f pour float, I for long Integer)
this want to say that latitude, longitude and altitude are float numbers and Direction is an Integer number.

If you need to have Direction with no decimal value, an integer is sufficient and this integer will be in the range of 0 to 365°.
So the line: if direction is under 365° direction must not be changed and you are in the old coding.

But for a lot of very good reasons the Dircetion must be much more accurate to stick to the real ground (and not the bearing). And you need to have 2 or 3 decimal. So a float is needed but you change the structure of the files.
If you want to stay with an Integer, you must hide him by a multiplication and the trick is:
multiply by 100 and add 100000. The first 1 is a flag in order that the program know that it read the new coding
and now direction is an integer number 1xxxxx (i.e. for Marlborough 187850 that is 87.85°).

Well, all this stuff is here to say that there is still an ambiguity, when you start to make some scenery with LE 2.0 and you finish with LE 2.01.
You will find the 2 coding in the apt file.
So I simplify the vnks script in order to be certain that there is only one type of coding for my sceneries.
*****- Xavier - (XDL - VR FAN) *****

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Christchurch Landscape - Runway Direction data

Post by JBlyth » Tue May 12, 2020 12:31 pm

Thank you Wickid and Xavier,

Your information is most helpful and has helped me understand better how Condor is put together. Thank you for your time.

The need the extra decimal places in the runway bearing makes absolute sense now. I use a similar approach to work out runway lengths and runway threshold displacements when creating aerodrome data from Australia's ERSA and Airspace documentation.

Cheers
John in Sunny Carnarvon - Western Australia

fpaynter
Posts: 360
Joined: Sat Nov 19, 2005 12:38 am

Re: Christchurch Landscape - Runway Direction data

Post by fpaynter » Wed May 13, 2020 3:45 am

All,

John Blythe contacted me about this issue, and although I'm no longer associated with Condor or soaring in general, I was able to resurrect the development files for my 8-year old CondorWPFileGen application and update it to handle the new LE2.01 format.

The updated version is available on my Google Drive site at https://drive.google.com/open?id=15Bsmh ... m6rJrAUOQE

I have also created a Github repository for the project, in case anyone wants to contribute. The repo is at
https://github.com/paynterf/Condor-Wayp ... ree/master

Regards,

Frank(TA)
Frank (TA1)

User avatar
JBlyth
Posts: 183
Joined: Thu Apr 23, 2020 12:10 pm

Re: Christchurch Landscape - Runway Direction data

Post by JBlyth » Wed May 13, 2020 4:05 am

Thank you Frank,

You are indeed a STAR! ⭐

Cheers
John in Sunny Carnarvon - Western Australia

witor
Posts: 200
Joined: Wed Dec 15, 2010 11:47 pm

Re: Christchurch Landscape - Runway Direction data

Post by witor » Fri Apr 01, 2022 7:59 pm

Sorry is there an exe of this still available somewhere? Google drive link seems to be dead and git hub does not have an executable file anywhere (as far as I can see)

Post Reply