#include "agradar.hxx"
#include "rad_alt.hxx"
-FGInstrumentMgr::FGInstrumentMgr ()
+FGInstrumentMgr::FGInstrumentMgr () :
+ _explicitGps(false)
{
set_subsystem("od_gauge", new FGODGauge);
set_subsystem("hud", new HUD);
}
delete config_props;
+
+ if (!_explicitGps) {
+ SG_LOG(SG_INSTR, SG_INFO, "creating default GPS instrument");
+ SGPropertyNode_ptr nd(new SGPropertyNode);
+ nd->setStringValue("name", "gps");
+ nd->setIntValue("number", 0);
+ set_subsystem("gps[0]", new GPS(nd));
+ }
}
FGInstrumentMgr::~FGInstrumentMgr ()
} else if ( name == "gps" ) {
set_subsystem( id, new GPS( node ) );
-
+ _explicitGps = true;
} else if ( name == "gsdi" ) {
set_subsystem( id, new GSDI( node ) );