+ // Initialize the (new) 2D panel.
+ //
+ string panel_path = fgGetString("/sim/panel/path",
+ "Aircraft/c172p/Panels/c172-vfr-panel.xml");
+
+ FGPanel *panel = fgReadPanel(panel_path);
+ if (panel == 0) {
+ SG_LOG( SG_INPUT, SG_ALERT,
+ "Error reading new panel from " << panel_path );
+ } else {
+ SG_LOG( SG_INPUT, SG_INFO, "Loaded new panel from " << panel_path );
+ globals->get_current_panel()->unbind();
+ delete globals->get_current_panel();
+ globals->set_current_panel( panel );
+ globals->get_current_panel()->init();
+ globals->get_current_panel()->bind();
+ globals->get_current_panel()->update(0);
+ }
+
+ globals->get_aircraft_model()->reinit();
+
+ // TODO:
+ // load new electrical system