UAV Playground - NMEA to KML

This blog post is an addition to the UAV Playground project blog. It shows you how to program a very simple UAV Playground application that provides Google Earth with some KML data it receives as NMEA data from FlightGear.[The poor formatting of the code sections is unintended]DownloadUAVplayground-KMLPorvider.zipSource code (
import java.applet.Applet;import jaron.flightgear.FlightGearNMEAReceiver;import; public class ProvideKML extends Applet {  FlightGearNMEAReceiver receiver;  GoogleEarthKMLProvider provider;  public void init() {    receiver = new FlightGearNMEAReceiver();    provider = new GoogleEarthKMLProvider();    receiver.addTrackpointListener(provider);  }}
Google Earth KML file (Start-GoogleEarth-Tracking.kml)
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="">  <NetworkLink>    <name>UAV Playground Network Link</name>    <Link>      <href></href&gt;      <refreshMode>onInterval</refreshMode>      <refreshInterval>2</refreshInterval>    </Link>  </NetworkLink></kml>
FlightGear startup file (Start-FlightGear-NMEA.bat)
"%PROGRAMFILES%\FlightGear\bin\Win32\fgfs" ^  "--fg-root=%PROGRAMFILES%\FlightGear\data" ^  "--nmea=socket,out,0.5,,5557,tcp"
Start the application- Start the Java application as an Applet- Start FlightGear with the above batch file- Start Google Earth by double-clicking on the above KML file or just open the file in Google EarthTo navigate to the track In Google Earth double-click on Places -> Temporary Places -> UAV Playground Network Link -> Tracks -> GPS Tracks.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • Hi, the program works perfectly. I am trying to use it as base to take some more data out. I have tried to do it adding more lines in the start up file:


    This is just a test but it didn't work and don't understand why, I have none experience as programmer or with this kind of files neither. How can I do it?

    I would like to change the specifications of the flight too, airport, plane, etc., programing them in the start up file, is it possible?

    I apreciate any help, thanks, :)

  • Has anyone thought about using google earths NMEA live converter thing... Its free with Google Earth 5.0
This reply was deleted.