See my original post for an example of a flight path record.
Flight Path Record
I used the free (and great) Eclipse development environment to build a small Java app.
The core of the app is
Open a DatagramSocket for port 49002 on localHost
Reading the socket yields alternating lines of the form
XATTAerofly FS 2,170.9,-17.02,3.62
XGPSAerofly FS 2,11.6079,46.7867,1312.0,170.7,35.0
The XPGS tokens are longitude,latitude,altitude,?,?
Write the KML header to a file.
Parse the XGPS events and write the coordinate values to the KML file
Write the tail of the KML file when you stop recording.
Load the KML into Google Earth
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Folder><name>flight_path</name>
<Placemark>
<Style><LineStyle><color>ff0000ff</color><width>4</width></LineStyle></Style>
<LineString>
<altitudeMode>absolute</altitudeMode>
<extrude>0</extrude>
<coordinates>
11.511824999999998,46.868275,1324.2749999999999
11.511849999999999,46.868199999999995,1323.8249999999998
...
...
...
</coordinates>
</LineString>
</Placemark>
</Folder>
</Document>
</kml>
Most of the code was for handling exception conditions for stopping and restarting recording.
Getting the curtain effect required a lot more fiddling to generate two line strings in the KML.
I have experimented with the yaw, pitch and roll data in the XATT event but KML is a rather blunt tool for complex graphics.
And I have yet to wrap my head around the transforms required to locate the wingtips in lat,long and altitude space starting with lat,long and altitude of the CG and yaw,pitch and roll data.
cheers
/Stu