TVM for PAC-2.

This commit is contained in:
Nikolai V. Chr
2023-05-18 19:32:37 +02:00
parent 0fe8c97ab8
commit b0cd511424
3 changed files with 418 additions and 394 deletions

View File

@@ -303,7 +303,7 @@
<vol-search type="double">0.00</vol-search>
<vol-track type="double">0.15</vol-track> <!-- -->
<vol-track-weak type="double">0.1</vol-track-weak> <!-- -->
<guidance type="string">radar</guidance>
<guidance type="string">tvm</guidance>
<navigation type="string">APN3003</navigation> <!-- -->
<all-aspect type="bool">true</all-aspect>
@@ -333,7 +333,7 @@
<rail-point-forward type="bool">false</rail-point-forward>
<rail-pitch-deg type="double">45</rail-pitch-deg>
<rail-heading-deg type="double">0</rail-heading-deg>
<chaff-resistance type="double">0.96</chaff-resistance>
<chaff-resistance type="double">0.93</chaff-resistance>
<proportionality-constant type="double">3</proportionality-constant>
<class type="string">A</class>
<fire-msg>Bird away</fire-msg>

View File

@@ -232,7 +232,14 @@ var scan = func() {
radarOn = 1;
}
}
if (getprop("payload/armament/"~string.lc(missile_name)~"/guidance") == "tvm" and !radarOn) {
foreach(var tgt ; targetsV2.vector) {
if (tgt.in_air > 0) {
radarOn = 1;
break;
}
}
}
setprop("/sim/multiplay/generic/int[2]",!radarOn);
if (launcher_align_to_target and ACTIVE_MISSILE > NUM_MISSILES and systime()-missile_release_time > 2) {
@@ -542,7 +549,7 @@ var missile_launch = func(mp, launchtime, my_pos) {
setprop("sam/info", info);
if (mp.getNode("callsign") != nil and mp.getNode("callsign").getValue() != nil and mp.getNode("callsign").getValue() != "") {
setprop("sim/multiplay/generic/string[6]", left(md5(mp.getNode("callsign").getValue()), 4));
if (getprop("payload/armament/"~string.lc(missile_name)~"/guidance") != "tvm") setprop("sim/multiplay/generic/string[6]", left(md5(mp.getNode("callsign").getValue()), 4));
datalink.send_data({"contacts":[{"callsign":mp.getNode("callsign").getValue(),"iff":0}]});
} else {
clearSingleLock();

File diff suppressed because it is too large Load Diff