Check taxiways

The taxi network (groundnet) and the scenery are created separately and don’t match everywhere. At Aberdeen this made my script taxi across the grass. The whole story is in the article Rollwege abtasten und korrigieren (German).

Scanned ground at Aberdeen with the taxi network

Scan the ground

With geodinfo, FlightGear returns the material at any point, for example Grass or pa_taxiway. The script scans a grid and writes a CSV file plus a simple text view. The scenery must be loaded, so the aircraft has to be at the airport.

"$FG_BASIS/werkzeuge/starten.sh" --aircraft=c172p --airport=EGPD

In a second terminal, with the south-west corner, columns, rows and spacing in meters:

cd "$FG_BASIS/werkzeuge"
python3 rollweg_scan.py 57.2040 -2.2100 130 190 4

In the text view, # is asphalt or concrete, = is marking and . is everything else. Larger grids take correspondingly longer.

Find a route

With the grid you can compute the new route: only across asphalt, and the closer to the edge the more expensive, so that it runs in the middle. I used a Dijkstra algorithm on the cells, and then Douglas-Peucker to reduce the cells to a few points.

Correct the network in your own script

The FlightGear files stay unchanged. The taxi script loads the network and then applies a list of corrections. Wrong edges are removed, new ones with intermediate points are added:

GROUNDNET_KORREKTUR = {
    "EGPD": {"weg": [(75, 134)],
             "neu": [(75, 130, [(57.205512, -2.203570), (57.207740, -2.205428), (57.208171, -2.205428),
                                (57.208710, -2.204963), (57.209249, -2.203902), (57.209249, -2.203437)], "M")]},
}

The numbers are the nodes from the airport’s groundnet file EGPD.groundnet.xml. If you taxi automatically, don’t trust the network blindly.