Index: /osgVisual/trunk/bin/osgVisualConfig.xml
===================================================================
--- /osgVisual/trunk/bin/osgVisualConfig.xml	(revision 211)
+++ /osgVisual/trunk/bin/osgVisualConfig.xml	(revision 212)
@@ -43,4 +43,5 @@
       <!-- Models can be loaded and placed in the scenery.
         - objectname: Name of the object to identify it in the scenegraph.
+        - tracking ID: ID to manage which object should be tracked
         - label: text to label the model with.
         - dynamic: "yes" to add an standard updater to the model. 
@@ -53,5 +54,5 @@
         - Geometryscale [optional]: Scale factors for the loaded 3D model in all three dimensions.
       -->
-      <model objectname="TestObject" label="TestText!" dynamic="yes">
+      <model objectname="TestObject" trackingid="1" label="TestText!" dynamic="yes">
         <position lat="47.12345" lon="11.234567" alt="1500.0"></position>
         <attitude rot_x="0.0" rot_y="0.0" rot_z="0.0"></attitude>
@@ -65,9 +66,10 @@
           <rotation rot_x="0.0" rot_y="0.0" rot_z="0.0"></rotation>
         </cameraoffset>
-        <geometry filename="../models/Boing777-200.ive">
+        <geometry filename="../models/saenger1.flt">
           <offset rot_x="0.0" rot_y="0.0" rot_z="0.0"></offset>
           <scalefactor scale_x="1.0" scale_y="1.0" scale_z="1.0"></scalefactor>
         </geometry>
       </model>
+      <trackmodel id="1"></trackmodel>
     </models>
     <datetime day="0" month="0" year="0" hour="12" minute="30"></datetime>
Index: /osgVisual/trunk/include/core/visual_core.h
===================================================================
--- /osgVisual/trunk/include/core/visual_core.h	(revision 211)
+++ /osgVisual/trunk/include/core/visual_core.h	(revision 212)
@@ -111,4 +111,5 @@
 
 	void setupScenery();
+	void trackNode( osg::Node* node_ );
 	
 protected:
Index: /osgVisual/trunk/src/core/visual_core.cpp
===================================================================
--- /osgVisual/trunk/src/core/visual_core.cpp	(revision 211)
+++ /osgVisual/trunk/src/core/visual_core.cpp	(revision 212)
@@ -404,4 +404,7 @@
 			}
 		}
+
+		// Track Node
+
 #endif
 	}// FOR all nodes END
@@ -414,6 +417,8 @@
 	arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
 	arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the new FSD visualization tool, written by Torben Dannhauer");
-    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] Terrain_filename");
+    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [OSG options] -c XML-Configurationfile");
 	arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+	arguments.getApplicationUsage()->addCommandLineOption("-c or --config","XML configuration filename");
+
 
     // if user request help write it out to cout.
@@ -470,9 +475,9 @@
 	////testObj2->addUpdater( new object_updater(testObj2) );	// todo memleak
 
-	osg::ref_ptr<visual_object> testObj3 = new visual_object( rootNode, "SAENGER1" );	// todo memleak
-	testObj3->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 600 );
-	testObj3->loadGeometry( "../models/saenger1.flt" );
-	testObj3->addUpdater( new object_updater(testObj3) );	// todo memleak
-	
+	//osg::ref_ptr<visual_object> testObj3 = new visual_object( rootNode, "SAENGER1" );	// todo memleak
+	//testObj3->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 600 );
+	//testObj3->loadGeometry( "../models/saenger1.flt" );
+	//testObj3->addUpdater( new object_updater(testObj3) );	// todo memleak
+	//
 
 	osg::ref_ptr<visual_object> testObj4 = new visual_object( rootNode, "SAENGER2" );	// todo memleak
@@ -482,35 +487,11 @@
 	testObj4->addLabel("testLabel", "LabelTest!!\nnächste Zeile :)",osg::Vec4(1.0f,0.25f,1.0f,1.0f));
 
-	osg::ref_ptr<visual_object> testObj5 = new visual_object( rootNode, "SAENGER" );	// todo memleak
-	testObj5->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 550 );
-	testObj5->loadGeometry( "../models/saengerCombine.flt" );
-	//testObj5->setScale( 2 );
-	testObj5->addUpdater( new object_updater(testObj5) );	// todo memleak
-
-#ifdef USE_SPACENAVIGATOR
-	// Manipulatoren auf dieses Objekt binden (Primärobjekt)
-	if (objectMountedCameraManip.valid())
-		objectMountedCameraManip->setAttachedObject( testObj4 );
-	if (mouseTrackerManip.valid())
-	{
-		mouseTrackerManip->setTrackNode( testObj4->getGeometry() );
-		mouseTrackerManip->setMinimumDistance( 100 );
-	}
-#endif
-
-	if(nt.valid())
-	{
-		osgGA::NodeTrackerManipulator::TrackerMode trackerMode = osgGA::NodeTrackerManipulator::NODE_CENTER;
-		osgGA::NodeTrackerManipulator::RotationMode rotationMode = osgGA::NodeTrackerManipulator::ELEVATION_AZIM;
-		nt->setTrackerMode(trackerMode);
-		nt->setRotationMode(rotationMode);
-		//nt->setAutoComputeHomePosition( true );
-		nt->setMinimumDistance( 100 );
-		nt->setTrackNode(testObj4->getGeometry());
-		//nt->computeHomePosition();
-		nt->setAutoComputeHomePosition( true );
-		nt->setDistance( 250 );
-	}
-
+	//osg::ref_ptr<visual_object> testObj5 = new visual_object( rootNode, "SAENGER" );	// todo memleak
+	//testObj5->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 550 );
+	//testObj5->loadGeometry( "../models/saengerCombine.flt" );
+	////testObj5->setScale( 2 );
+	//testObj5->addUpdater( new object_updater(testObj5) );	// todo memleak
+
+	trackNode( testObj4 );
 
 	// Load EDDF
@@ -553,2 +534,47 @@
 
 }
+
+void visual_core::trackNode( osg::Node* node_ )
+{
+	if(!node_)
+		return;
+
+	osg::Node* node = NULL;
+	// Check if tracked node is a visual_object
+	osgVisual::visual_object* trackedObject = dynamic_cast<osgVisual::visual_object*>(node_);
+	if(trackedObject)
+	{
+		if(trackedObject->getGeometry())
+			node = trackedObject->getGeometry();
+		else
+			node = trackedObject;
+	}
+	else
+		node = node_;
+
+	// Object mounted manipulator
+	if (objectMountedCameraManip.valid())
+		objectMountedCameraManip->setAttachedObject( node );
+	
+	// Spacemouse Node Tracker
+#ifdef USE_SPACENAVIGATOR
+	if (mouseTrackerManip.valid())
+	{
+		mouseTrackerManip->setTrackNode( node );
+		mouseTrackerManip->setMinimumDistance( 100 );
+	}
+#endif
+
+	// Classical OSG Nodetracker
+	if(nt.valid())
+	{
+		osgGA::NodeTrackerManipulator::TrackerMode trackerMode = osgGA::NodeTrackerManipulator::NODE_CENTER;
+		osgGA::NodeTrackerManipulator::RotationMode rotationMode = osgGA::NodeTrackerManipulator::ELEVATION_AZIM;
+		nt->setTrackerMode(trackerMode);
+		nt->setRotationMode(rotationMode);
+		nt->setMinimumDistance( 100 );
+		nt->setTrackNode( node );
+		nt->setAutoComputeHomePosition( true );
+		nt->setDistance( 250 );
+	}
+}
