Difference between revisions of "User:Texnicer/devblog"

From FlightGear wiki
Jump to: navigation, search
m (Adapting, Adding, Extending)
m (Adding the model to the aircraft, positioning)
Line 25: Line 25:
 
=== Understanding the components of the system ===
 
=== Understanding the components of the system ===
 
=== Adding the model to the aircraft, positioning ===
 
=== Adding the model to the aircraft, positioning ===
 +
 +
''note: understanding the euclidian space, the axis, the system's origin, helps alot placing the model roughly and visual in the cockpit. finetuning can be done while correcting the .xml file being in the simulator and using the "debug"-menu and "reload model" once and again.
  
 
'''in /Models/SenecaII.xml:'''
 
'''in /Models/SenecaII.xml:'''
Line 39: Line 41:
 
</model>
 
</model>
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
[[File:Garmin196 added to SenecaII.png|thumb|garmin196 added to SenecaII]]
  
 
=== Implementing the functionality ===
 
=== Implementing the functionality ===

Revision as of 16:07, 25 March 2020

Adding a existing component to an existing aircraft

On march 25, 2020 I was asked via mumble, if I could add the garmin196 to the Seneca II, hence the AP is not charming. Here ist what I did, an how I did it.

Creating a working copy of the aircraft

At first I aquired the Aircraft. It's part of the sourceforge/svn-repository.

I got the plane searching throught FGADDON/AIRCRAFT (https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/) using the SVN system.

   $ svn checkout https://svn.code.sf.net/p/flightgear/fgaddon/trunk/Aircraft/SenecaII

note: sourceforge does not support the correct svn-codeline, you need to correct the path starting after trunk'

Locating the system to add

I went into my system's Flightgear root directory $FG_ROOT - which is nice to know. On ubuntu and DeBIAN systems it is likely to be found in:
/usr/share/games/flightgear
  $ cd /usr/share/games/flightgear/

Hence I looked for garmin196 invoking a full recursive file-search

 me@machine:/usr/share/games/flightgear/$ ls -R | grep -A1 -i garmin196

and I figured that the device's files are located in /Aircraft/Instrument-3d/garmin196

Understanding the components of the system

Adding the model to the aircraft, positioning

note: understanding the euclidian space, the axis, the system's origin, helps alot placing the model roughly and visual in the cockpit. finetuning can be done while correcting the .xml file being in the simulator and using the "debug"-menu and "reload model" once and again.

in /Models/SenecaII.xml:

	<model> 
		<path>Aircraft/Instruments-3d/garmin196/garmin196.xml</path>
		<offsets> 
			<heading-deg>-40</heading-deg>
			<x-m>-1.945</x-m>
			<y-m>0.15</y-m>
			<z-m>1.65</z-m>
		</offsets>
	</model>
garmin196 added to SenecaII

Implementing the functionality

in /SenecaII-base.xml: (im Block "nasal")

        <garmin196>
		<file>Aircraft/Instruments-3d/garmin196/garmin196.nas</file>
	</garmin196>

Adapting, Adding, Extending

  • the autopilot menu is not working yet
  • hence the menu route manager is not working yet
  • routes must be added manually into garmin196