+// airways
+ FGPositioned::TypeFilter vorFilt(FGPositioned::VOR);
+ FGPositionedRef tla = FGPositioned::findClosestWithIdent("TLA", pos, &vorFilt);
+ FGPositionedRef big = FGPositioned::findClosestWithIdent("BIG", pos, &vorFilt);
+ FGPositionedRef pol = FGPositioned::findClosestWithIdent("POL", pos, &vorFilt);
+
+ const FGAirport* eddm = fgFindAirportID("EDDM");
+ FGPositionedRef mun = FGPositioned::findClosestWithIdent("MUN",
+ eddm->geod(), &vorFilt);
+
+ const FGAirport* ksfo = fgFindAirportID("KSFO");
+ FGPositionedRef sfo = FGPositioned::findClosestWithIdent("SFO",
+ ksfo->geod(), &vorFilt);
+
+
+ WayptRef awy1 = new NavaidWaypoint(tla, NULL);
+ WayptRef awy2 = new NavaidWaypoint(big, NULL);
+ WayptRef awy3 = new NavaidWaypoint(pol, NULL);
+ WayptRef awy4 = new NavaidWaypoint(mun, NULL);
+ WayptRef awy5 = new NavaidWaypoint(sfo, NULL);
+
+ WayptRef awy6 = new NavaidWaypoint(
+ (FGPositioned*) fgFindAirportID("KJFK"), NULL);
+
+ SGPath p("/Users/jmt/Desktop/airways.kml");
+ std::fstream f;
+ f.open(p.str().c_str(), fstream::out | fstream::trunc);
+
+// pre-amble
+ f << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n"
+ "<Document>\n";
+
+ WayptVec route;
+ Airway::highLevel()->route(awy1, awy3, route);
+ Route::dumpRouteToLineString("egph-egcc", route, f);
+
+ Airway::lowLevel()->route(awy1, awy2, route);
+ Route::dumpRouteToLineString("egph-big", route, f);