Computing gun sight code with USAAF K-14A sight.
[fg:toms-fgdata.git] / Aircraft / Instruments-3d / computing-gun-sights / README.txt
1 To enable full functionality of the K14 gun sight there are several things \r
2 that need to be done.  \r
3 \r
4 First change the <nasal> section of your *set.xml file so that it looks like the \r
5 following.  \r
6 \r
7 <nasal>\r
8    <!-- your other nasal files -->\r
9    <!-- the following three lines must be exactly like this -->\r
10    <K14>\r
11       <file>Aircraft/Instruments-3d/computing-gun-sights/Nasal/lead-computer.nas</file>\r
12    </K14>\r
13 </nasal>\r
14 \r
15 Animation:\r
16 \r
17 For dark conditions when cabin/cockpit illumination is used all of the K14 sight \r
18 is illuminated in response to \r
19 \r
20 <property>/controls/lighting/cabin-norm</property>\r
21 \r
22 If you are using a different property for your cabin/cockpit lights you will need to map your \r
23 lighting property to /controls/lighting/cabin-norm.\r
24 \r
25 Aircraft Specific Properties:\r
26 \r
27 The following properties will need to be set to configure the site for an aircraft.\r
28 \r
29 The following five values can be found in the submodels.xnl configuration file.\r
30 \r
31 /controls/armament/gunsight/z-gunOffsetFeet = Gun position on z axis relative to the sight line in feet.  \r
32                                               Will = <z-offset>offset value</z-offset> + distance from \r
33                                                                                   aircraft center line to sight line height.\r
34 /controls/armament/gunsight/y-gunOffsetFeet = Gun position on y axis relative to the sight line in feet.\r
35                                               Will = <y-offset>abs value</y-offset> \r
36 /controls/armament/gunsight/gunElevationDegrees = <pitch-offset>gun pitch setting</pitch-offset>\r
37 /controls/armament/gunsight/ballisticCoefficienct = <eda>xxxxx</eda>\r
38 /controls/armament/gunsight/muzzleVelocity = <speed>xxxxx</speed> = In feet per second\r
39 \r
40 /controls/armament/gunsight/gunHarminizationRangeFeet = Range where the sight and the bullet \r
41                                                         path cross is level flight in feet.\r
42                                                                                                                 \r
43 Below is an example from the P-51D using the K14A sight which needs some additional\r
44 settings to control power and lighting for the sight.\r
45 \r
46 <controls>\r
47    <armament>\r
48      <gunsight>\r
49         <power-on type="int">0</power-on>\r
50         <intensity type="float">1.0</intensity>\r
51                 <z-offsetFeet type="float">-4.0</z-offsetFeet>\r
52         <y-offsetFeet type="float">0.0</y-offsetFeet>\r
53         <scale type="float">0.6</scale>\r
54         <gunElevationDegrees type="float">3.8</gunElevationDegrees>\r
55         <ballisticCoefficienct type="float">0.00136354</ballisticCoefficienct>\r
56         <muzzleVelocity type="float">2900.0</muzzleVelocity>\r
57         <gunHarminizationRangeFeet type="float">900.0</gunHarminizationRangeFeet>\r
58                 <range type="float">900.0</range>  <!-- startup default -->\r
59      </gunsight>\r
60    </armament>\r
61    ...\r
62 </controls>\r
63 \r
64