| 1 |
Lead Computer Configuration: |
| 2 |
|
| 3 |
The following properties will need to be set to configure the lead computer for your aircraft. |
| 4 |
|
| 5 |
These are set in the aircraft's *set.xml file in the section where you are setting initialization values |
| 6 |
for various properties. This MUST happen before the nasal section in the *set.xml file. |
| 7 |
|
| 8 |
The following five values can be found in the submodels.xml configuration file where the guns |
| 9 |
ballistics are configured. |
| 10 |
|
| 11 |
/controls/armament/gunsight/z-gunOffsetFeet = Gun position on z axis relative to the sight line in feet. |
| 12 |
|
| 13 |
Will = <z-offset>offset value</z-offset> + distance from aircraft center line to sight line height in feet. |
| 14 |
|
| 15 |
/controls/armament/gunsight/y-gunOffsetFeet = Gun position on y axis relative to the sight line in feet. |
| 16 |
|
| 17 |
Will = <y-offset>abs value</y-offset> if the guns are equally distributed about the aircraft center line |
| 18 |
set this to 0. If this value in non-zero this is in feet. |
| 19 |
|
| 20 |
/controls/armament/gunsight/gunElevationDegrees = <pitch-offset>gun pitch setting</pitch-offset> in degrees. |
| 21 |
|
| 22 |
/controls/armament/gunsight/ballisticCoefficienct = <eda>xxxxx</eda> |
| 23 |
|
| 24 |
/controls/armament/gunsight/muzzleVelocity = <speed>xxxxx</speed> = In feet per second |
| 25 |
|
| 26 |
Additional parameters need to be set that are not in the submodels.xml file. |
| 27 |
|
| 28 |
/controls/armament/gunsight/gunHarminizationRangeFeet = Range where the sight and the bullet |
| 29 |
path cross is straight and level flight in feet. |
| 30 |
|
| 31 |
/controls/armament/gunsight/timeStep = The computer cycle time in seconds. |
| 32 |
|
| 33 |
This will typically be values between 0.5 and 0.05. These correspond to |
| 34 |
lead computer update frequencies of 2 to 20 times per second. Use a slower update |
| 35 |
rate for older purely mechanical gun sights and faster rates for newer fully |
| 36 |
digital gun sights. Slower rates will tend to make the gun sight lag. |
| 37 |
|
| 38 |
/controls/armament/gunsight/dampingFactor = The computer damping factor adjustment. |
| 39 |
|
| 40 |
The optimum dampingFactor is 1.0. Lower values will make the reticle less stable and |
| 41 |
prone to over shoot and jitter. However using lower values may result in a more |
| 42 |
accurate simulation of older mechanical gun sights which were under damped. Modern |
| 43 |
gun sights will be well damped and for those this should be set to 1.0. This value is |
| 44 |
capped by the lead computer and values above 1.0 will result in 1.0 being used and |
| 45 |
values below 0.3 will result in 0.3 being used. |
| 46 |
|
| 47 |
/controls/armament/gunsight/MaxAzimuth and /controls/armament/gunsight/MaxElevation = The |
| 48 |
maximum deflection of the sight reticle in mils. Used to limit the movement of the reticle |
| 49 |
to the mechanical limits of sight being simulated. |
| 50 |
|
| 51 |
Lead Computer Input Values: |
| 52 |
|
| 53 |
/controls/armament/gunsight/range = The range to the target in feet. |
| 54 |
|
| 55 |
With radar ranging this value will be constantly changing. Internally the lead computer |
| 56 |
also uses this data to calculate the rate at which the range changes (IE. how fast |
| 57 |
the target is being closed in on). |
| 58 |
|
| 59 |
/controls/armament/gunsight/computer-on = 0 to turn the lead computer off and 1 to start the |
| 60 |
lead computer. Cycling power will reinitialize the lead computer. |
| 61 |
|
| 62 |
Lead Computer Output: |
| 63 |
|
| 64 |
/controls/armament/gunsight/azimuth and /controls/armament/gunsight/elevation = Deflection |
| 65 |
needed to hit the target in mils. 1 mil = 1 foot at a 1000 foot range. These values are |
| 66 |
used to drive the sight reticle animation. This is usually done by applying these to a |
| 67 |
factor that is then using the resulting product to move the reticle in the animation code. |
| 68 |
|
| 69 |
Including the Lead Computer in the Aircraft's Set File: |
| 70 |
|
| 71 |
For the lead computer to function it needs to be added to the aircrafts *set.xml file's nasal section. |
| 72 |
|
| 73 |
This will look something like this. |
| 74 |
|
| 75 |
<nasal> |
| 76 |
<!-- your other nasal files --> |
| 77 |
<!-- the following three lines must be exactly like this --> |
| 78 |
<name of you gun sight> |
| 79 |
<file>Aircraft/Instruments-3d/computing-gun-sights/Nasal/lead-computer.nas</file> |
| 80 |
</name of your gun sight> |
| 81 |
</nasal> |