This commit is contained in:
Nikolai V. Chr
2021-04-27 21:35:10 +02:00
parent 74fed9851c
commit 0d3b2dbab4
13 changed files with 427623 additions and 1359458 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 KiB

After

Width:  |  Height:  |  Size: 632 KiB

File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+28867 -50070
View File
File diff suppressed because it is too large Load Diff
+91496 -140604
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+24026 -27883
View File
File diff suppressed because it is too large Load Diff
+60
View File
@@ -34,6 +34,66 @@
</condition>
</animation>
<model>
<path>MLRS/MLRS.ac</path>
<name>mlrs</name>
</model>
<animation>
<type>select</type>
<object-name>mlrs</object-name>
<condition>
<equals>
<property>sim/multiplay/generic/int[17]</property>
<value>2</value>
</equals>
</condition>
</animation>
<model>
<path>Bradle/Bradle.ac</path>
<name>brad</name>
</model>
<animation>
<type>select</type>
<object-name>brad</object-name>
<condition>
<equals>
<property>sim/multiplay/generic/int[17]</property>
<value>3</value>
</equals>
</condition>
</animation>
<model>
<path>Buffalo/buffalo.ac</path>
<name>buf</name>
</model>
<animation>
<type>select</type>
<object-name>buf</object-name>
<condition>
<equals>
<property>sim/multiplay/generic/int[17]</property>
<value>4</value>
</equals>
</condition>
</animation>
<model>
<path>Stryker/stryker.ac</path>
<name>stry</name>
</model>
<animation>
<type>select</type>
<object-name>stry</object-name>
<condition>
<equals>
<property>sim/multiplay/generic/int[17]</property>
<value>5</value>
</equals>
</condition>
</animation>
<model>
<path>Aircraft/BUK-M2/Models/smoke.xml</path>
<offsets>
+22 -28
View File
@@ -37,36 +37,30 @@ var shells = {
# 0.20 means a direct hit will disable 20% of the failure modes on average.
# or, 0.20 also means a direct hit can do 20 hitpoints damage.
#
# Damage roughly proportional to projectile weight.
# If weight isn't listed here, it was estimated from dimensions (proportional to diameter^2 * length).
# Approximate formulae for cannons:
# damage ~ weight / 3.6 (in g)
# or damage ~ diameter^2 * length / 1.6e6 (in mm)
#
"M70 rocket": [0,0.500], # 135mm, ~5kg warhead
"S-5 rocket": [1,0.200], # 55mm, ~1-2kg warhead
"M55 shell": [2,0.060], # 30x113mm, 220g
"KCA shell": [3,0.100], # 30x173mm, 360g
"GSh-30": [4,0.095], # 30x165mm mig29/su27
"GAU-8/A": [5,0.100], # 30x173mm, 360g
"Mk3Z": [6,0.060], # 30x113mm Jaguar, 220g
"BK27": [7,0.070], # 27x145mm, 270g
"GSh-23": [8,0.040], # 23x115mm,
"M61A1 shell": [9,0.030], # 20x102mm F14, F15, F16, 100g
"50 BMG": [10,0.015], # 12.7mm (non-explosive)
"M70 rocket": [0,0.250], #135mm
"S-5 rocket": [1,0.200], # 55mm
"M55 shell": [2,0.100], # 30mm
"KCA shell": [3,0.100], # 30mm
"GSh-30": [4,0.100], # 30mm mig29/su27
"GAU-8/A": [5,0.100], # 30mm
"Mk3Z": [6,0.100], # 30mm Jaguar
"BK27": [7,0.070], # 27mm
"GSh-23": [8,0.065], # 23mm
"M61A1 shell": [9,0.050], # 20mm F14, F15, F16
"50 BMG": [10,0.015], # 12.7mm (non-explosive)
"7.62": [11,0.005], # 7.62mm (non-explosive)
"Hydra-70": [12,0.500], # 70mm, F-16/A-6 LAU-68 and LAU-61, ~4-6kg warhead
"SNEB": [13,0.500], # 68mm, Jaguar
"DEFA 554": [14,0.060], # 30x113mm Mirage, 220g
"20mm APDS": [15,0.030], # CIWS
"LAU-10": [16,0.500], # 127mm, ~4-7kg warhead
};
"Hydra-70": [12,0.250], # F-16/A-6 LAU-68 and LAU-61
"SNEB": [13,0.250], # Jaguar
"DEFA 554": [14,0.100], # 30mm Mirage
"20mm APDS": [15,0.050], # CIWS
"LAU-10": [16,0.225], # 127mm
};
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
var warheads = {
# [id,lbs,anti surface,cluster,(name)]
"AGM-65": [ 0, 126.00,1,0],
"AGM-65B": [ 0, 126.00,1,0],
"AGM-84": [ 1, 488.00,1,0],
"AGM-88": [ 2, 146.00,1,0],
"MK-82SE": [ 3, 192.00,1,0],# snake eye
@@ -75,12 +69,12 @@ var warheads = {
"AGM-158": [ 6, 1000.00,1,0],
"ALARM": [ 7, 450.00,1,0],
"AM 39 Exocet": [ 8, 364.00,1,0],
"AS 37 Martel": [ 9, 330.00,1,0],
"AS 37 Martel": [ 9, 330.00,1,0],# Also : AJ 168 Martel
"AS30L": [10, 529.00,1,0],
"BL755": [11, 100.00,1,1],# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
"CBU-87": [12, 100.00,1,1],# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
"CBU-105": [13, 100.00,1,1],# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
"AJ 168 Martel": [14, 330.00,1,0],
"AS 37 Armat": [14, 330.00,1,0],
"FAB-100": [15, 92.59,1,0],
"FAB-250": [16, 202.85,1,0],
"FAB-500": [17, 564.38,1,0],
@@ -124,9 +118,9 @@ var warheads = {
"AIM-7F": [55, 88.00,0,0],
"AGM-62": [56, 2000.00,1,0],
"AIM-9L": [57, 20.80,0,0],
"d-7": [58, 44.00,0,0],#deprecated
"AGM-65D": [58, 126.00,1,0],
"AIM-132": [59, 22.05,0,0],
"d-8": [60, 20.80,0,0],#deprecated
"Apache AP": [60, 110.23,0,1],# Real mass of bomblet. (x 10). Anti runway.
"KN-06": [61, 315.00,0,0],
"9M317": [62, 145.00,0,0],
"d9": [63, 27.00,0,0],#deprecated
+6 -2
View File
@@ -102,8 +102,12 @@ var PositionUpdater = func () {
var type = getprop("sim/multiplay/generic/int[17]");
if (type != last_type) {
if (damage.hp_max == damage.hp) {
if (type == 0) {damage.hp_max=5;damage.hp=5;speed=25;}
if (type == 1) {damage.hp_max=100;damage.hp=100;speed=15;}
if (type == 0) {damage.hp_max=5;damage.hp=5;speed=25;}#humvee
if (type == 1) {damage.hp_max=100;damage.hp=100;speed=15;}#tank
if (type == 2) {damage.hp_max=75;damage.hp=75;speed=10;}#rocket launcher
if (type == 3) {damage.hp_max=85;damage.hp=85;speed=20;}#small tank
if (type == 4) {damage.hp_max=80;damage.hp=80;speed=20;}#APC (mine proected)
if (type == 5) {damage.hp_max=75;damage.hp=75;speed=20;}#APC
last_type = type;
} else {
print("Can only switch type when not damaged!!");
+43 -10
View File
@@ -2,7 +2,7 @@ var Math = {
#
# Authors: Nikolai V. Chr, Axel Paccalin.
#
# Version 1.93
# Version 1.94
#
# When doing euler coords. to cartesian: +x = forw, +y = left, +z = up.
# FG struct. coords: +x = back, +y = right, +z = up.
@@ -13,6 +13,8 @@ var Math = {
# When doing euler angles (from pilots point of view): yaw = yaw left, pitch = rotate up, roll = roll right.
# FG rotations: heading = yaw right, pitch = rotate up, roll = roll right.
#
# Cartesian is right-handed coord system.
#
clamp: func(v, min, max) { v < min ? min : v > max ? max : v },
convertCoords: func (x,y,z) {
@@ -57,7 +59,9 @@ var Math = {
# length of vector
magnitudeVector: func (a) {
return math.sqrt(math.pow(a[0],2)+math.pow(a[1],2)+math.pow(a[2],2));
me.mag = 1;
call(func {me.mag = math.sqrt(math.pow(a[0],2)+math.pow(a[1],2)+math.pow(a[2],2))},nil,nil,var err =[]);#strange bug in Nasal can sometimes mess up sqrt
return me.mag;
},
# dot product of 2 vectors
@@ -83,6 +87,20 @@ var Math = {
return me.multiplyMatrixWithVector(me.rotation, vector);
},
# rotate a vector. Order: yaw, pitch
yawPitchVector: func (yaw, pitch, vector) {
me.pitchM = me.pitchMatrix(pitch);
me.yawM = me.yawMatrix(yaw);
me.rotation = me.multiplyMatrices(me.pitchM, me.yawM);
return me.multiplyMatrixWithVector(me.rotation, vector);
},
# rotate a vector. Order: pitch
pitchVector: func (pitch, vector) {
me.pitchM = me.pitchMatrix(pitch);
return me.multiplyMatrixWithVector(me.pitchM, vector);
},
# multiply 3x3 matrix with vector
multiplyMatrixWithVector: func (matrix, vector) {
return [matrix[0]*vector[0]+matrix[1]*vector[1]+matrix[2]*vector[2],
@@ -107,10 +125,10 @@ var Math = {
# matrix for pitching
pitchMatrix: func (pitch) {
pitch = pitch * D2R;
return [math.cos(pitch),0,-math.sin(pitch),
pitch = -pitch * D2R;
return [math.cos(pitch),0,math.sin(pitch),
0,1,0,
math.sin(pitch),0,math.cos(pitch)];
-math.sin(pitch),0,math.cos(pitch)];
},
# matrix for yawing
@@ -126,7 +144,8 @@ var Math = {
me.horz = math.sqrt(vector[0]*vector[0]+vector[1]*vector[1]);
if (me.horz != 0) {
me.pitch = math.atan2(vector[2],me.horz)*R2D;
me.hdg = math.asin(-vector[1]/me.horz)*R2D;
me.div = math.clamp(-vector[1]/me.horz, -1, 1);
me.hdg = math.asin(me.div)*R2D;
if (vector[0] < 0) {
# south
@@ -268,7 +287,7 @@ var Math = {
# print vector to console
format: func (v) {
return sprintf("(%.1f, %.1f, %.1f)",v[0],v[1],v[2]);
return sprintf("(%.2f, %.2f, %.2f)",v[0],v[1],v[2]);
},
# make vector length 1.0
@@ -288,6 +307,20 @@ var Math = {
return me.magnitudeVector(me.crossProduct(me.minus(L2,L1), me.minus(L1,P)))/me.magnitudeVector(me.minus(L2,L1));
},
interpolateVector: func (start, end, fraction) {
me.xx = (start[0]*(1-fraction) +end[0]*fraction);
me.yy = (start[1]*(1-fraction) +end[1]*fraction);
me.zz = (start[2]*(1-fraction) +end[2]*fraction);
return [me.xx, me.yy, me.zz];
},
# move distance 'along' from start towards end. Total dist from start to end is dist.
alongVector: func (start, end, dist, along) {
me.fraction = along/dist;
return me.interpolateVector(start, end, me.fraction);
},
# Orthogonal projection of a vector `vec` onto another `ref` !!can throw an exception if the referential vector is null!!.
orthogonalProjection: func(vec, ref){
@@ -319,9 +352,9 @@ var Math = {
#| 0 cos(roll) -sin(roll) |
#| 0 sin(roll) cos(roll) |
#
#| cos(pitch) 0 -sin(pitch) |
#| 0 1 0 |
#| sin(pitch) 0 cos(pitch) |
#| cos(-pitch) 0 sin(-pitch) |
#| 0 1 0 |
#| -sin(-pitch) 0 cos(-pitch) |
#
#| cos(yaw) -sin(yaw) 0 |
#| sin(yaw) cos(yaw) 0 |
+33 -3
View File
@@ -5,7 +5,7 @@
<name>type</name>
<layout>vbox</layout>
<width>250</width>
<width>400</width>
<resizable>false</resizable>
<group>
@@ -55,7 +55,14 @@
<value>1</value>
</binding>
</button>
<button>
<legend>Rocket launcher</legend>
<binding>
<command>property-assign</command>
<property>sim/multiplay/generic/int[17]</property>
<value>2</value>
</binding>
</button>
</group>
@@ -65,7 +72,30 @@
<empty><stretch>true</stretch></empty>
<button>
<legend>Tracked fighting vehicle</legend>
<binding>
<command>property-assign</command>
<property>sim/multiplay/generic/int[17]</property>
<value>3</value>
</binding>
</button>
<button>
<legend>Mine protected Vehicle</legend>
<binding>
<command>property-assign</command>
<property>sim/multiplay/generic/int[17]</property>
<value>4</value>
</binding>
</button>
<button>
<legend>Armoured personal Carrier</legend>
<binding>
<command>property-assign</command>
<property>sim/multiplay/generic/int[17]</property>
<value>5</value>
</binding>
</button>
</group>
</group>
+8 -90
View File
@@ -1,64 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 onox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PropertyList>
<environment>
<in-to-wind type="bool">false</in-to-wind>
</environment>
<carrier>
<fdm>
<settings>
<!-- The maximum bank angle during full rudder deflection -->
<bank-limit type="double">15.0</bank-limit>
<!-- Frequency and overshoot of the oscillator used to
simulate heeling (roll).
-->
<heel-frequency type="double">0.5</heel-frequency>
<heel-overshoot type="double">4.0</heel-overshoot>
<!-- Frequency and overshoot of the oscillator used to
simulate trimming (pitch).
-->
<trim-frequency type="double">0.32</trim-frequency>
<trim-overshoot type="double">0.45</trim-overshoot>
<!-- The speed of the waves plus speed of the ship in knots
which generates the maximum overshoot of the trim
oscillation.
-->
<max-trim-oscillation-wave-kt type="double">30.0</max-trim-oscillation-wave-kt>
<!-- The speed of the waves in knots which generates the
maximum overshoot of the heel oscillation.
-->
<max-heel-oscillation-wave-kt type="double">20.0</max-heel-oscillation-wave-kt>
<movement type="bool">true</movement>
</settings>
</fdm>
</carrier>
<sim include="Sim/views.xml">
<author>pinto and onox</author>
<sim>
<author>pinto, Nikolai V. Chr., FGUK, onox</author>
<description>groundtarget</description>
<status>alpha</status>
<aircraft-version>0.1</aircraft-version>
@@ -87,17 +32,6 @@
<splash-texture>Aircraft/groundtarget/splash1.png</splash-texture>
</startup>
<current-view>
<deck-park type="bool">true</deck-park>
<z-offset-dec-step type="double">0.0</z-offset-dec-step>
<z-offset-inc-step type="double">0.0</z-offset-inc-step>
<can-change-z-offset type="bool">false</can-change-z-offset>
<z-offset-min-m type="float">100.0</z-offset-min-m>
<z-offset-max-m type="float">2000.0</z-offset-max-m>
</current-view>
<hud>
<path n="1">Aircraft/groundtarget/Hud/hud.xml</path>
<visibility n="1">true</visibility>
@@ -115,18 +49,6 @@
</generic>
</multiplay>
<systems>
<autopilot>
<path>Systems/fbw.xml</path>
</autopilot>
<autopilot>
<path>Systems/fdm.xml</path>
</autopilot>
<property-rule n="100">
<path>Systems/views.xml</path>
</property-rule>
</systems>
<menubar>
<default>
@@ -157,12 +79,12 @@
<models type="string">Aircraft/groundtarget/Models/emesary/</models>
<msg type="bool">true</msg>
<enable-craters type="bool">true</enable-craters>
<MLW-bearing type="double">0</MLW-bearing>
<MLW-count type="int">0</MLW-count>
<MLW-launcher type="string"></MLW-launcher>
<MAW-bearing type="double">0</MAW-bearing>
<MAW-active type="bool">false</MAW-active>
<spike type="bool">false</spike>
<MLW-bearing type="double">0</MLW-bearing>
<MLW-count type="int">0</MLW-count>
<MLW-launcher type="string"></MLW-launcher>
<MAW-bearing type="double">0</MAW-bearing>
<MAW-active type="bool">false</MAW-active>
<spike type="bool">false</spike>
</armament>
</payload>
@@ -180,8 +102,4 @@
</damage>
</nasal>
<input>
<mice include="Sim/mice.xml"/>
</input>
</PropertyList>