Lead computer updates. Mostly documentation improvements.
This commit is contained in:
parent
6c826feb44
commit
534d7d3b05
4 changed files with 163 additions and 66 deletions
|
@ -53,10 +53,11 @@ var harmonizationRange = 0;
|
|||
var range = 0;
|
||||
|
||||
# constants
|
||||
var timeStep = 0.1;
|
||||
var timeStep = getprop(propertyTreeRoot, "timeStep");
|
||||
|
||||
# sight damping factor
|
||||
var SIG = 0.4;
|
||||
var SIG = getprop(propertyTreeRoot, "dampingFactor") * 0.4;
|
||||
|
||||
var KSIG = 1.0 / (1.0 + SIG);
|
||||
|
||||
var seaLevelAirDensity = 0.00238;
|
||||
|
|
79
Aircraft/Instruments-3d/computing-gun-sights/README.K-14
Normal file
79
Aircraft/Instruments-3d/computing-gun-sights/README.K-14
Normal file
|
@ -0,0 +1,79 @@
|
|||
To enable full functionality of the K14 gun sight there are several things
|
||||
that need to be done.
|
||||
|
||||
First change the <nasal> section of your *set.xml file so that it looks like the
|
||||
following.
|
||||
|
||||
<nasal>
|
||||
<!-- your other nasal files -->
|
||||
<!-- the following three lines must be exactly like this -->
|
||||
<K14>
|
||||
<file>Aircraft/Instruments-3d/computing-gun-sights/Nasal/lead-computer.nas</file>
|
||||
</K14>
|
||||
</nasal>
|
||||
|
||||
Animation:
|
||||
|
||||
For dark conditions when cabin/cockpit illumination is used all of the K14 sight
|
||||
is illuminated in response to
|
||||
|
||||
<property>/controls/lighting/cabin-norm</property>
|
||||
|
||||
If you are using a different property for your cabin/cockpit lights you will need to map your
|
||||
lighting property to /controls/lighting/cabin-norm.
|
||||
|
||||
Aircraft Specific Properties:
|
||||
|
||||
See README.lead-computer
|
||||
|
||||
Below is an example from the P-51D using the K14A sight which needs some additional
|
||||
settings to control power and lighting for the sight.
|
||||
|
||||
<controls>
|
||||
<armament>
|
||||
<gunsight>
|
||||
<!-- gunsight computer parameters -->
|
||||
|
||||
<!-- start/stop the sight computer
|
||||
the computer will be reinitialized if the power is cycled -->
|
||||
<computer-on type="int">0</computer-on>
|
||||
<!-- offset of guns below sight line in feet -->
|
||||
<z-offsetFeet type="float">3.125</z-offsetFeet>
|
||||
<!-- average lateral offset of guns in feet relative to sight line -->
|
||||
<y-offsetFeet type="float">0.0</y-offsetFeet>
|
||||
<!-- elevation of guns relative to alpha in degrees -->
|
||||
<gunElevationDegrees type="float">1.0</gunElevationDegrees>
|
||||
<ballisticCoefficienct type="float">0.00136354</ballisticCoefficienct> <!-- 0.50 BMG -->
|
||||
<muzzleVelocity type="float">2900.0</muzzleVelocity> <!-- feet per second 0.50 BMG -->
|
||||
<!-- convergence distance in feet -->
|
||||
<gunHarminizationRangeFeet type="float">900.0</gunHarminizationRangeFeet>
|
||||
<timeStep type="float">0.2</timeStep> <!-- cycle rate of gun sight computer in seconds -->
|
||||
<!-- sight computer damping factor must be between 0.3 and 1.0 -->
|
||||
<dampingFactor type="float">1.0</dampingFactor>
|
||||
<gunsight-computer-initialized type="int">0</gunsight-computer-initialized>
|
||||
<maxAzimuth type="int">170</maxAzimuth> <!-- maximum sight deflection in mils -->
|
||||
<maxElevation type="int">170</maxElevation>
|
||||
|
||||
<!-- K14 parameters -->
|
||||
|
||||
<power-on type="int">0</power-on>
|
||||
<intensity type="float">1.0</intensity>
|
||||
<mask-off type="int">1</mask-off>
|
||||
<reticleSelectorPos type="int">0</reticleSelectorPos>
|
||||
<rocketLadder type="int">1</rocketLadder> <!-- set to 0 for K14 and 1 for other K14 models -->
|
||||
|
||||
<!-- The next three are to setup the reticle to the correct starting values -->
|
||||
<span type="int">30</span>
|
||||
<mils type="float">0.0</mils>
|
||||
<range type="float">1000.0</range> <!-- in feet -->
|
||||
|
||||
<fixedReticleOn type="int">0</fixedReticleOn>
|
||||
<zCenterLine type="float">0.7375</zCenterLine> <!-- sight line distance from model z axis in meters -->
|
||||
<K14C type="int">0</K14C> <!-- set to 1 for K14C -->
|
||||
|
||||
<sunScreenDown type="int">1</sunScreenDown>
|
||||
</gunsight>
|
||||
...
|
||||
</controls>
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
Lead Computer Configuration:
|
||||
|
||||
The following properties will need to be set to configure the lead computer for your aircraft.
|
||||
|
||||
These are set in the aircraft's *set.xml file in the section where you are setting initialization values
|
||||
for various properties. This MUST happen before the nasal section in the *set.xml file.
|
||||
|
||||
The following five values can be found in the submodels.xml configuration file where the guns
|
||||
ballistics are configured.
|
||||
|
||||
/controls/armament/gunsight/z-gunOffsetFeet = Gun position on z axis relative to the sight line in feet.
|
||||
|
||||
Will = <z-offset>offset value</z-offset> + distance from aircraft center line to sight line height in feet.
|
||||
|
||||
/controls/armament/gunsight/y-gunOffsetFeet = Gun position on y axis relative to the sight line in feet.
|
||||
|
||||
Will = <y-offset>abs value</y-offset> if the guns are equally distributed about the aircraft center line
|
||||
set this to 0. If this value in non-zero this is in feet.
|
||||
|
||||
/controls/armament/gunsight/gunElevationDegrees = <pitch-offset>gun pitch setting</pitch-offset> in degrees.
|
||||
|
||||
/controls/armament/gunsight/ballisticCoefficienct = <eda>xxxxx</eda>
|
||||
|
||||
/controls/armament/gunsight/muzzleVelocity = <speed>xxxxx</speed> = In feet per second
|
||||
|
||||
Additional parameters need to be set that are not in the submodels.xml file.
|
||||
|
||||
/controls/armament/gunsight/gunHarminizationRangeFeet = Range where the sight and the bullet
|
||||
path cross is straight and level flight in feet.
|
||||
|
||||
/controls/armament/gunsight/timeStep = The computer cycle time in seconds.
|
||||
|
||||
This will typically be values between 0.5 and 0.05. These correspond to
|
||||
lead computer update frequencies of 2 to 20 times per second. Use a slower update
|
||||
rate for older purely mechanical gun sights and faster rates for newer fully
|
||||
digital gun sights. Slower rates will tend to make the gun sight lag.
|
||||
|
||||
/controls/armament/gunsight/dampingFactor = The computer damping factor adjustment.
|
||||
|
||||
The optimum dampingFactor is 1.0. Lower values will make the reticle less stable and
|
||||
prone to over shoot and jitter. However using lower values may result in a more
|
||||
accurate simulation of older mechanical gun sights which were under damped. Modern
|
||||
gun sights will be well damped and for those this should be set to 1.0. This value is
|
||||
capped by the lead computer and values above 1.0 will result in 1.0 being used and
|
||||
values below 0.3 will result in 0.3 being used.
|
||||
|
||||
/controls/armament/gunsight/MaxAzimuth and /controls/armament/gunsight/MaxElevation = The
|
||||
maximum deflection of the sight reticle in mils. Used to limit the movement of the reticle
|
||||
to the mechanical limits of sight being simulated.
|
||||
|
||||
Lead Computer Input Values:
|
||||
|
||||
/controls/armament/gunsight/range = The range to the target in feet.
|
||||
|
||||
With radar ranging this value will be constantly changing. Internally the lead computer
|
||||
also uses this data to calculate the rate at which the range changes (IE. how fast
|
||||
the target is being closed in on).
|
||||
|
||||
/controls/armament/gunsight/computer-on = 0 to turn the lead computer off and 1 to start the
|
||||
lead computer. Cycling power will reinitialize the lead computer.
|
||||
|
||||
Lead Computer Output:
|
||||
|
||||
/controls/armament/gunsight/azimuth and /controls/armament/gunsight/elevation = Deflection
|
||||
needed to hit the target in mils. 1 mil = 1 foot at a 1000 foot range. These values are
|
||||
used to drive the sight reticle animation. This is usually done by applying these to a
|
||||
factor that is then using the resulting product to move the reticle in the animation code.
|
||||
|
||||
Including the Lead Computer in the Aircraft's Set File:
|
||||
|
||||
For the lead computer to function it needs to be added to the aircrafts *set.xml file's nasal section.
|
||||
|
||||
This will look something like this.
|
||||
|
||||
<nasal>
|
||||
<!-- your other nasal files -->
|
||||
<!-- the following three lines must be exactly like this -->
|
||||
<name of you gun sight>
|
||||
<file>Aircraft/Instruments-3d/computing-gun-sights/Nasal/lead-computer.nas</file>
|
||||
</name of your gun sight>
|
||||
</nasal>
|
|
@ -1,64 +0,0 @@
|
|||
To enable full functionality of the K14 gun sight there are several things
|
||||
that need to be done.
|
||||
|
||||
First change the <nasal> section of your *set.xml file so that it looks like the
|
||||
following.
|
||||
|
||||
<nasal>
|
||||
<!-- your other nasal files -->
|
||||
<!-- the following three lines must be exactly like this -->
|
||||
<K14>
|
||||
<file>Aircraft/Instruments-3d/computing-gun-sights/Nasal/lead-computer.nas</file>
|
||||
</K14>
|
||||
</nasal>
|
||||
|
||||
Animation:
|
||||
|
||||
For dark conditions when cabin/cockpit illumination is used all of the K14 sight
|
||||
is illuminated in response to
|
||||
|
||||
<property>/controls/lighting/cabin-norm</property>
|
||||
|
||||
If you are using a different property for your cabin/cockpit lights you will need to map your
|
||||
lighting property to /controls/lighting/cabin-norm.
|
||||
|
||||
Aircraft Specific Properties:
|
||||
|
||||
The following properties will need to be set to configure the site for an aircraft.
|
||||
|
||||
The following five values can be found in the submodels.xnl configuration file.
|
||||
|
||||
/controls/armament/gunsight/z-gunOffsetFeet = Gun position on z axis relative to the sight line in feet.
|
||||
Will = <z-offset>offset value</z-offset> + distance from
|
||||
aircraft center line to sight line height.
|
||||
/controls/armament/gunsight/y-gunOffsetFeet = Gun position on y axis relative to the sight line in feet.
|
||||
Will = <y-offset>abs value</y-offset>
|
||||
/controls/armament/gunsight/gunElevationDegrees = <pitch-offset>gun pitch setting</pitch-offset>
|
||||
/controls/armament/gunsight/ballisticCoefficienct = <eda>xxxxx</eda>
|
||||
/controls/armament/gunsight/muzzleVelocity = <speed>xxxxx</speed> = In feet per second
|
||||
|
||||
/controls/armament/gunsight/gunHarminizationRangeFeet = Range where the sight and the bullet
|
||||
path cross is level flight in feet.
|
||||
|
||||
Below is an example from the P-51D using the K14A sight which needs some additional
|
||||
settings to control power and lighting for the sight.
|
||||
|
||||
<controls>
|
||||
<armament>
|
||||
<gunsight>
|
||||
<power-on type="int">0</power-on>
|
||||
<intensity type="float">1.0</intensity>
|
||||
<z-offsetFeet type="float">-4.0</z-offsetFeet>
|
||||
<y-offsetFeet type="float">0.0</y-offsetFeet>
|
||||
<scale type="float">0.6</scale>
|
||||
<gunElevationDegrees type="float">3.8</gunElevationDegrees>
|
||||
<ballisticCoefficienct type="float">0.00136354</ballisticCoefficienct>
|
||||
<muzzleVelocity type="float">2900.0</muzzleVelocity>
|
||||
<gunHarminizationRangeFeet type="float">900.0</gunHarminizationRangeFeet>
|
||||
<range type="float">900.0</range> <!-- startup default -->
|
||||
</gunsight>
|
||||
</armament>
|
||||
...
|
||||
</controls>
|
||||
|
||||
|
Loading…
Reference in a new issue