#include <simgear/debug/logstream.hxx>
#include <simgear/structure/exception.hxx>
#include <simgear/structure/event_mgr.hxx>
-#include <simgear/math/point3d.hxx>
#include <simgear/math/polar3d.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/misc/sg_path.hxx>
#include <Navaids/navdb.hxx>
#include <Navaids/navlist.hxx>
#include <Navaids/fix.hxx>
+#include <Navaids/fixlist.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
#include <Scripting/NasalSys.hxx>
if (fg_home)
config = fg_home;
+ SGPath home_export(config.str());
+ home_export.append("Export/dummy");
+ home_export.create_dir(0777);
+
// Set /sim/fg-home and don't allow malign code to override it until
// Nasal security is set up. Use FG_HOME if necessary.
SGPropertyNode *home = fgGetNode("/sim", true);
// Set current_options lon/lat given an airport id and heading (degrees)
static bool fgSetPosFromFix( const string& id )
{
- FGFix* fix;
-
- // set initial position from runway and heading
- if ( !globals->get_fixlist()->query( id.c_str(), fix ) ) {
- SG_LOG( SG_GENERAL, SG_ALERT, "Failed to locate NAV = " << id );
+ FGPositioned::TypeFilter fixFilter(FGPositioned::FIX);
+ FGPositioned* fix = FGPositioned::findNextWithPartialId(NULL, id, &fixFilter);
+ if (!fix) {
+ SG_LOG( SG_GENERAL, SG_ALERT, "Failed to locate fix = " << id );
return false;
}
return true;
}
-
/**
* Initialize vor/ndb/ils/fix list management and query systems (as
* well as simple airport db list)
SGPath p_metar( globals->get_fg_root() );
p_metar.append( "Airports/metar.dat" );
- FGAirportList *airports = new FGAirportList();
- globals->set_airports( airports );
-
- fgAirportDBLoad( airports, aptdb.str(), p_metar.str() );
+ fgAirportDBLoad( aptdb.str(), p_metar.str() );
FGNavList *navlist = new FGNavList;
FGNavList *loclist = new FGNavList;
FGNavList *gslist = new FGNavList;
FGNavList *dmelist = new FGNavList;
- FGNavList *mkrlist = new FGNavList;
FGNavList *tacanlist = new FGNavList;
FGNavList *carrierlist = new FGNavList;
FGTACANList *channellist = new FGTACANList;
globals->set_loclist( loclist );
globals->set_gslist( gslist );
globals->set_dmelist( dmelist );
- globals->set_mkrlist( mkrlist );
globals->set_tacanlist( tacanlist );
globals->set_carrierlist( carrierlist );
globals->set_channellist( channellist );
- if ( !fgNavDBInit(navlist, loclist, gslist, dmelist, mkrlist, tacanlist, carrierlist, channellist) ) {
+ if ( !fgNavDBInit(navlist, loclist, gslist, dmelist, tacanlist, carrierlist, channellist) ) {
SG_LOG( SG_GENERAL, SG_ALERT,
"Problems loading one or more navigational database" );
}
p_fix.append( "Navaids/fix.dat" );
FGFixList *fixlist = new FGFixList;
fixlist->init( p_fix );
- globals->set_fixlist( fixlist );
SG_LOG(SG_GENERAL, SG_INFO, " Airways");
SGPath p_awy( globals->get_fg_root() );