Skip to content

Commit

Permalink
Radar: Hotfix 4
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiVChr committed Jan 17, 2022
1 parent fc7ad2c commit 11525a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Nasal/radar/apg-68.nas
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ var F16GMTMode = {
getSearchInfo: func (contact) {
# searchInfo: dist, groundtrack, deviations, speed, closing-rate, altitude
me.devGMT = contact.getDeviationStored();
if (me.devGMT[12] < 10) return nil;# A gain knob decide this. (should it be radial speed instead?)
if (me.devGMT.speed_kt < 10) return nil;# A gain knob decide this. (should it be radial speed instead?)
return [1,0,1,1,0,1];
},
};
Expand Down
16 changes: 8 additions & 8 deletions Nasal/radar/radar-system.nas
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ var Deviation = {
#frustum_norm_y: 0,
#frustum_norm_z: 0,
#alt_ft: 0,
#speed_kt: 0,
speed_kt: 0,
#closureSpeed: 0,
};

Expand Down Expand Up @@ -987,7 +987,7 @@ var AIContact = {
},

isHiddenFromDoppler: func (dopplerRadar = 1) {
return me.getType() == AIR and dopplerRadar?me.hiddenFromDoppler:me.hiddenFromMono;
return me.getType() == AIR and (dopplerRadar?me.hiddenFromDoppler:me.hiddenFromMono);
},

setHiddenFromDoppler: func (dopp, mono) {
Expand Down Expand Up @@ -1524,7 +1524,7 @@ var NoseRadar = {
#frustum_norm_y: -me.pc_y/(me.w/2),
#frustum_norm_z: me.pc_z/(me.h/2),
#alt_ft: me.crd.alt()*M2FT,
#speed_kt: contact.getSpeed(),
speed_kt: contact.getSpeed(),
#closureSpeed: contact.getClosureRate(),
};
contact.storeDeviation(me.contactDev);
Expand Down Expand Up @@ -1561,7 +1561,7 @@ var NoseRadar = {
#frustum_norm_y: 0,
#frustum_norm_z: 0,
#alt_ft: me.crd.alt()*M2FT,
#speed_kt: contact.getSpeed(),
speed_kt: contact.getSpeed(),
#closureSpeed: contact.getClosureRate(),
};
contact.storeDeviation(me.contactDev);
Expand Down Expand Up @@ -1668,7 +1668,7 @@ var SimplerNoseRadar = {
#frustum_norm_y: 0,
#frustum_norm_z: 0,
#alt_ft: me.crd.alt()*M2FT,
#speed_kt: contact.getSpeed(),
speed_kt: contact.getSpeed(),
#closureSpeed: contact.getClosureRate(),
};
contact.storeDeviation(me.contactDev);
Expand Down Expand Up @@ -1705,7 +1705,7 @@ var SimplerNoseRadar = {
#frustum_norm_y: 0,
#frustum_norm_z: 0,
#alt_ft: me.crd.alt()*M2FT,
#speed_kt: contact.getSpeed(),
speed_kt: contact.getSpeed(),
#closureSpeed: contact.getClosureRate(),
};
contact.storeDeviation(me.contactDev);
Expand Down Expand Up @@ -1815,7 +1815,7 @@ var FullRadar = {
#frustum_norm_y: 0,
#frustum_norm_z: 0,
#alt_ft: me.crd.alt()*M2FT,
#speed_kt: contact.getSpeed(),
speed_kt: contact.getSpeed(),
#closureSpeed: contact.getClosureRate(),
};
contact.storeDeviation(me.contactDev);
Expand Down Expand Up @@ -1858,7 +1858,7 @@ var FullRadar = {
#frustum_norm_y: 0,
#frustum_norm_z: 0,
#alt_ft: me.crd.alt()*M2FT,
#speed_kt: contact.getSpeed(),
speed_kt: contact.getSpeed(),
#closureSpeed: contact.getClosureRate(),
};
contact.storeDeviation(me.contactDev);
Expand Down

0 comments on commit 11525a4

Please sign in to comment.