Skip to content
Snippets Groups Projects
README 1.65 KiB
The program I have designed is branching off of Homework 3 to expand the scenario a bit and 
add some more PDUs to be utilized in a simulation.

My scenario starts with a US vehicle (JLTV) equipped with an M240 medium machine gun 
starting at (0,0,0) and moving on a straight line route to (10,0,0).

While on the route, the unit is struck by an IED detonated by a civilain male with a cell 
phone at coordinates (10,0,100). Upon being struck, the friendly unit fires at the enemy 
with an M240 machine gun with a range of 1000m firing at the rapid rate (200 rounds per minute).

After a few seconds of firing, the threat has been neutralized and the simulation ends.

You will notice a few things in this code that can be changed by the user for simulating 
different scenarios and effects. First, there are three different detonation effects used depending on the probability of detonation used. If we set a low probability of the detonation, the effect will be a dud. 
If we put a medium probability (0.2-0.8) then we receive a proximate detonation. If we use a high detonation 
rate (>0.8) then we will see a direct hit. Future developers could then assess levels of damage based on this. 
I have also added a contactCounter. This can be used to see effects on the enemy based on marksmanship of 
the shooter. It is currently set to 50% (2/4) meaning the first 2 of 4 bursts will impact the dirt around the
enemy. This is done using another detonation PDU with dirt impact effects. After the first 2 bursts hit 
short of the target, we then see the next 2 impacts show in the detonation PDU as direct hit effects. 
After this the enemy has been neutralized and the simulation is over.