Discussion:
[Flightgear-scenery] apt.dat to xml
f***@sablonier.ch
13 years ago
Permalink
Here is an example I created with apt.dat EDDF (850 version):

<?xml version="1.0" ?>
<PropertyList>
<airport id="EDDF">
<linecode>1</linecode>
<elevation>356</elevation>
<deprecated1>1</deprecated1>
<deprecated2>0</deprecated2>
<identifier>EDDF</identifier>
<name>Frankfurt Main</name>
<runway end="25" id="07">
<linecode>100</linecode>
<width>60.05</width>
<surface code="1">Asphalt</surface>
<shoulder code="1">Asphalt shoulder</shoulder>
<smoothness>0.00</smoothness>
<centerline_lights code="1">Centerline lights</centerline_lights>
<edge_lighting code="2">Medium intensity edge lights</edge_lighting>
<autogenerate_distance_signs>1</autogenerate_distance_signs>
<number>07</number>
<latitude>50.03261700</latitude>
<longitude>008.53463099</longitude>
<threshold>0.00</threshold>
<overrrun>70.10</overrrun>
<marking code="3">Presicision approach markings</marking>
<approach_lighting code="2">ALSF-II</approach_lighting>
<touchdown_zone_lighting>1</touchdown_zone_lighting>
<reil code="1">omni-directional REIL</reil>
<number_end>25</number_end>
<latitude_end>50.04512800</latitude_end>
<longitude_end>008.58698099</longitude_end>
<threshold_end>0.00</threshold_end>
<overrrun_end>351.13</overrrun_end>
<marking_end code="3">Presicision approach markings</marking_end>
<approach_lighting_end code="2">ALSF-II</approach_lighting_end>
<touchdown_zone_lighting_end>1</touchdown_zone_lighting_end>
<reil_end code="1">omni-directional REIL</reil_end>
<!--++++++++++++++++++++++++++++++-->
<!--Additonal data, not in apt.dat-->
<!--++++++++++++++++++++++++++++++-->
<length-meters>4000.11009809</length-meters>
<length-feet>12192.335579</length-feet>
<heading id="07">69.6617845005</heading>
<heading_end id="25">249.621659252</heading_end>
<threshold_lat id="07">50.032617</threshold_lat>
<threshold_lon id="07">8.53463099</threshold_lon>
<threshold_lat_end id="25">50.045128</threshold_lat_end>
<threshold_lon_end id="25">8.58698099</threshold_lon_end>
</runway>
<runway end="25" id="07">
<linecode>100</linecode>
<width>45.11</width>
<surface code="2">Concrete</surface>
<shoulder code="2">Concrete shoulder</shoulder>
<smoothness>0.00</smoothness>
<centerline_lights code="1">Centerline lights</centerline_lights>
<edge_lighting code="3">None</edge_lighting>
<autogenerate_distance_signs>1</autogenerate_distance_signs>
<number>07</number>
<latitude>50.03707403</latitude>
<longitude>008.49688507</longitude>
<threshold>0.00</threshold>
<overrrun>99.97</overrrun>
<marking code="3">Presicision approach markings</marking>
<approach_lighting code="2">ALSF-II</approach_lighting>
<touchdown_zone_lighting>1</touchdown_zone_lighting>
<reil code="1">omni-directional REIL</reil>
<number_end>25</number_end>
<latitude_end>50.04589070</latitude_end>
<longitude_end>008.53377135</longitude_end>
<threshold_end>0.00</threshold_end>
<overrrun_end>99.97</overrrun_end>
<marking_end code="3">Presicision approach markings</marking_end>
<approach_lighting_end code="2">ALSF-II</approach_lighting_end>
<touchdown_zone_lighting_end>1</touchdown_zone_lighting_end>
<reil_end code="1">omni-directional REIL</reil_end>
<!--++++++++++++++++++++++++++++++-->
<!--Additonal data, not in apt.dat-->
<!--++++++++++++++++++++++++++++++-->
<length-meters>2818.42996461</length-meters>
<length-feet>8590.57453212</length-feet>
<heading id="07">69.6520655809</heading>
<heading_end id="25">249.623791892</heading_end>
<threshold_lat id="07">50.03707403</threshold_lat>
<threshold_lon id="07">8.49688507</threshold_lon>
<threshold_lat_end id="25">50.0458907</threshold_lat_end>
<threshold_lon_end id="25">8.53377135</threshold_lon_end>
</runway>
<runway end="25" id="07">
<linecode>100</linecode>
<width>45.11</width>
<surface code="1">Asphalt</surface>
<shoulder code="1">Asphalt shoulder</shoulder>
<smoothness>0.00</smoothness>
<centerline_lights code="1">Centerline lights</centerline_lights>
<edge_lighting code="2">Medium intensity edge lights</edge_lighting>
<autogenerate_distance_signs>1</autogenerate_distance_signs>
<number>07</number>
<latitude>50.02754200</latitude>
<longitude>008.53417499</longitude>
<threshold>0.00</threshold>
<overrrun>70.10</overrrun>
<marking code="3">Presicision approach markings</marking>
<approach_lighting code="2">ALSF-II</approach_lighting>
<touchdown_zone_lighting>1</touchdown_zone_lighting>
<reil code="1">omni-directional REIL</reil>
<number_end>25</number_end>
<latitude_end>50.04005300</latitude_end>
<longitude_end>008.58653099</longitude_end>
<threshold_end>0.00</threshold_end>
<overrrun_end>625.15</overrrun_end>
<marking_end code="3">Presicision approach markings</marking_end>
<approach_lighting_end code="2">ALSF-II</approach_lighting_end>
<touchdown_zone_lighting_end>1</touchdown_zone_lighting_end>
<reil_end code="1">omni-directional REIL</reil_end>
<!--++++++++++++++++++++++++++++++-->
<!--Additonal data, not in apt.dat-->
<!--++++++++++++++++++++++++++++++-->
<length-meters>4000.8833196</length-meters>
<length-feet>12194.6923581</length-feet>
<heading id="07">69.665912831</heading>
<heading_end id="25">249.625785962</heading_end>
<threshold_lat id="07">50.027542</threshold_lat>
<threshold_lon id="07">8.53417499</threshold_lon>
<threshold_lat_end id="25">50.040053</threshold_lat_end>
<threshold_lon_end id="25">8.58653099</threshold_lon_end>
</runway>
<runway end="36" id="18">
<linecode>100</linecode>
<width>45.11</width>
<surface code="2">Concrete</surface>
<shoulder code="2">Concrete shoulder</shoulder>
<smoothness>0.00</smoothness>
<centerline_lights code="1">Centerline lights</centerline_lights>
<edge_lighting code="2">Medium intensity edge lights</edge_lighting>
<autogenerate_distance_signs>1</autogenerate_distance_signs>
<number>18</number>
<latitude>50.03443900</latitude>
<longitude>008.52592800</longitude>
<threshold>0.00</threshold>
<overrrun>14.94</overrrun>
<marking code="1">Visual markings</marking>
<approach_lighting code="0">No approach lighting</approach_lighting>
<touchdown_zone_lighting>0</touchdown_zone_lighting>
<reil code="0">No REIL</reil>
<number_end>36</number_end>
<latitude_end>49.99841700</latitude_end>
<longitude_end>008.52608300</longitude_end>
<threshold_end>0.00</threshold_end>
<overrrun_end>57.91</overrrun_end>
<marking_end code="0">No runway markings</marking_end>
<approach_lighting_end code="0">No approach
lighting</approach_lighting_end>
<touchdown_zone_lighting_end>0</touchdown_zone_lighting_end>
<reil_end code="0">No REIL</reil_end>
<!--++++++++++++++++++++++++++++++-->
<!--Additonal data, not in apt.dat-->
<!--++++++++++++++++++++++++++++++-->
<length-meters>4006.72014817</length-meters>
<length-feet>12212.4830116</length-feet>
<heading id="18">179.841200579</heading>
<heading_end id="36">359.841081814</heading_end>
<threshold_lat id="18">50.034439</threshold_lat>
<threshold_lon id="18">8.525928</threshold_lon>
<threshold_lat_end id="36">49.998417</threshold_lat_end>
<threshold_lon_end id="36">8.526083</threshold_lon_end>
</runway>
</airport>
</PropertyList>


It is based completely on apt.dat data, additional data is based on
geodesic calc from geographiclib. A lot of specs are still missing, but I
can generate such xml files for every airport definition in apt.dat.

Maybe not all the data make sense to be in this per airport .xml file.
Some data is only used for scenery creation ... (and parts like freqs etc.
are missing right now, but can be added).

Cheers, Yves
Peter Morgan
13 years ago
Permalink
hi gral,

Thats almost what I've been looking for ;-)))

Where's the code that generates that ??

regards
Pete
...
Scott
13 years ago
Permalink
Pete,


If you're after a web service, I have the current fgdata version of
apt.dat in either XML or JSON (depending on the Accepts: HTTP header as
either of {"application/xml", "application/json"} it defaults to XML )
It's a REST service so you just stick the ICAO airport identifier on
the end, eg:

http://goat.hopto.org/fgatc/xml/navdb/airport/KSFO

I'm in the process or upgrading the parser to support the 10.00 version
(which is not much different than the 8.50 format that I also support).
The only thing is that I can't guarantee it will be always available,
it's my home development box... But if it is useful perhaps we can find
a more permanent home for it...


S.
...
f***@sablonier.ch
13 years ago
Permalink
Hi Pete

You can find the scripts here
http://code.google.com/p/flightgear-world-scenery/source/browse

section tools/xml-creator

(But this is not finished yet!)

All the single-apt.dat files from current xplane .dat cycle you will find
in data/xplane-single

To get the xml output you need to pull the repo and install geographiclib
(with python support, only for additional data like threshold coords
etc.), and run i.e.

python xml-creator.py data/xplane-single/E/EDDF.dat

In tools/apt-extractor I also pushed the scripts to split apt.dat into
single files.

Be aware this is all experimental and I don’t know if there will be any
use for this. The idea was to have one single xml file per airport
containing all (needed) airport data in one single file. It is far from
what terrasync delivers at the moment. So as a proposal this data could be
useful once maybe for terrasync, flightgear, but also for webservices like
maps etc. (updated automatically every 1-3 months along xplane data
cycle).

And please note that all this stuff has not to be on goolge code, it’s
just a (almost personal) interim workspace.

-Yves
...
Peter Morgan
13 years ago
Permalink
Can I ask a muppet question re below..

The "tags" are a dump of columns from prostres dn which was generated from ??

pete
...
Loading...