Jump to content

Several EWR radar to simulate radar coverage


vctpil

Recommended Posts

Hi,

 

I would like to create this scenario :

 

- 3 EWRs appears randomly at different location

- One activate to scan the airspace for a moment then de-activate

- After a moment, another EWR appears and do the same

- The scenario must be continuous.

 

I tried some scenario with flags, but seems not working. the 3 appears, one at a time, budoes appear again. See mission in attached.

 

Any ideas to solve the problem ?

 

Thanks,

Vincent

Test.miz

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Could try a:

Mission start -> -> Group AI Off (EWR 1), Group AI Off (EWR 2), Group AI Off (EWR 3)

- Or you can start with just two of the off.

 

repetitive -> random(1) -> Group AI On (EWR 1), Group AI Off (EWR 2), Group AI Off (EWR 3)

repetitive -> random(1) -> Group AI On (EWR 2), Group AI Off (EWR 1), Group AI Off (EWR 3)

repetitive -> random(1) -> Group AI On (EWR 3), Group AI Off (EWR 1), Group AI Off (EWR 2)

 

Mission starts with the EWR's off. Then each second there is a 1% chance that one of the 3 EWR's turns on (can be anywhere from 1 second to about 3-4 minutes usually), and when it turns on it also turns off the other two. And this keeps repeating.

If not frequent enough just increase the random value.

- Jack of many DCS modules, master of none.

- Personal wishlist: F-15A, F-4S Phantom II, JAS 39A Gripen, SAAB 35 Draken, F-104 Starfighter, Panavia Tornado IDS.

 

| Windows 11 | i5-12400 | 64Gb DDR4 | RTX 3080 | 2x M.2 | 27" 1440p | Rift CV1 | Thrustmaster Warthog HOTAS | MFG Crosswind pedals |

Link to comment
Share on other sites

Thank for the reply.

 

The problem is the EWR turn On then OFF right away. Is it possible to let the EWR scanning for 2 minutes, then all the EWR off for 1 minutes, etc ?

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Thank for the reply.

 

The problem is the EWR turn On then OFF right away. Is it possible to let the EWR scanning for 2 minutes, then all the EWR off for 1 minutes, etc ?

 

Have you looked in to Skynet?

 

It features EW radars and much more:

https://github.com/walder/Skynet-IADS

 

If your goal is to simulate an IADS, check it out

Link to comment
Share on other sites

I looked at Skynet, but I don't know anything about scripting. I also try to understand the ME and create complex mission.

 

I made this example in attached. I just wonder how to do the same without the car and the trigger.

EWR Scan Airspace Randomly.miz

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Paste this code in ONCE trigger, No Conditions, ACTION DO SCRIPT; then change the names in the "EWR_GroupNames" table to the group names you have in the mission editor. Also, set the "activeScanTime to the number of seconds each EWR will scan. It doesn't necessarily account for randomization of the EWR group if one dies, nor does it account for more than three EWRs, though these two issues can be changed; however, it does what you ask.

 

 

EWR_GroupNames = { --exact Group names from the mission editor, include #001 if applicable.
"GroupNameFromMissionEditor",
"GroupNameFromMissionEditor2",
"GroupNameFromMissionEditor3",
}

activeScanTime = 300 --seconds, how long each EWR will scan

for i=1, #EWR_GroupNames do --this turns the EWRs off, initially.
local group = Group.getByName(EWR_GroupNames[i])
	if group ~= nil and group:isExist() then
		group:getController():setOnOff(false)
	end
end

activeScanner = {} --keeps track of active scanner 
function ewrScanner()
local r = nil
local activeGroup = nil

	if #activeScanner == 0 or activeScanner == nil then
		r = math.random(1, 3)
	else
		r = math.random(1, 2)
		activeGroup = Group.getByName(activeScanner[1])
		if activeGroup ~= nil and activeGroup:isExist() then
			activeGroup:getController():setOnOff(false)
			table.remove(activeScanner, 1)
			table.insert(EWR_GroupNames, activeGroup:getName())
		end
	end

local newScanner = Group.getByName(EWR_GroupNames[r])
if newScanner ~= nil and newScanner:isExist() then
	newScanner:getController():setOnOff(true)	
	table.insert(activeScanner, newScanner:getName())
	table.remove(EWR_GroupNames, r)
end

timer.scheduleFunction(ewrScanner, nil, timer.getTime() + activeScanTime)
end
ewrScanner()


Edited by shnicklefritz
Link to comment
Share on other sites

In my single player missions I use a trigger that sets a flag to a value from 1 to 60 every minute. This can then be used to controll all kinds of ramdom activities. Like starting a AI-flight from a base for example. This works pretty good for missions that dont take more than a hour. If a mission takes more than that one may consider to increase the max value from 60 to something else.

 

It can also be used for this, if you use switched condiotions to turn each EWR on and off.

Make EWR1 turn on when the random flag is 1-20, EWR2 on when it is 21-40, EWR3 when it is 41-60.

 

And EWR1 off when the flag is higher than 20, EWR2 off when the flag is lower than 21 and higher than 40, EWR3 off when the flag is lower than 41.

 

If you have the random flag to set it self every minute then a EWR may at minimum just stay on for one minute. If you like to limit this you can change how often the flag is set or you can perhaps include time since flag conditions in the triggers I described.

 

This should work if you change beween green state and red state in alarm state (if I remember right its called alarm state). If you use activate and deactivate the group I dont think you can reactivate them again when they have been deactivated.

Link to comment
Share on other sites

Can you detail your flags, please ? I have so much difficulty to understand how flags are working.

 

Thanks.

 

Edit : I don't even know how to set a flag to a value from 1 to 60 every minutes!


Edited by vctpil

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

I have tried this one from https://wiki.hoggitworld.com/view/DCS_editor_Randomization#Simple :

 

Once > Time Less than 5 > Set Flag 1 Random Value from 50 to 100

Switched Condition >Time Since Flag 1 is 30 seconds > Flag 1 Decrease 1

Once > Flag 1 Equals 1 > Activate Group

 

Switched condition does not work, I have to use Repetitive action. Nice to know that this document may not be correct.

 

I have now to deactivate the EWR and create a loop. No idea how to do that.

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Here are 2 EWR's that swap duties with each other

 

 

You don't want to use Activate Group, that's a one time thing. Use Group AI On/Off or Unit Emission On/Off.

alternateEWRv2.miz

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

Link to comment
Share on other sites

Wow, that's great, it works fine, thank you very much.

 

Seems easy right now, but apparently, I am not able to elaborate that.

 

If I may : is it possible to use random time on this system ?

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...