Use the Custom Inline Script for Volumetric Analyses

« Go Back

Information

 
ProblemHow do I use the Custom Inline Script for volumetric analyses?
Solution
The Volumetric object is a powerful tool that is useful for doing many types of analyses in a spatial region. Out of the box, the volumetric tool is configured for you to use for many different applications. One of these applications is Link Metrics for Communications/Radar objects. The limitations out of the box become apparent when trying to do analyses for more than one object in one volumetric grid. An example is a combined Probability of Detection (PDet) for more than one radar. To set up such a scenario, perform the following steps:
  • Insert and configure all of your radars.
  • Insert an area target.
  • Create a spatial grid on the area target and make sure it is limited by the shape of the area target.
  • Get the necessary spatial condition of combined PDet by creating a dummy aircraft with a radar cross section on it. The reason to do this is because you need an object that would give PDet values if you were to do a regular access from a radar to the aircraft.
  • Use this aircraft at every PDet point. Go into  aircraft menu > Radar cross section, enable a constant value, and set it to a value that suits the mission.
  • Calculate access from each of the radars to the aircraft. The reason you need to do this is because you need to grab the PDet metric to use on the volumetric, which only exists on the access object.
  • Create your Volumetric object on the aircraft, the access object.
Note: This example assumes that you have a basic understanding of how to use the Volumetric object. If you don't, please check out the tutorial Build A Volumetric Object.

Before we go further, let's review what you have accomplished so far:
You created a spatial grid on the area target to make sure that the volumetric only does the calculation over the area target and does not waste time doing calculations elsewhere. You also inserted a dummy aircraft with a radar cross section and simulated the radar cross section on each volumetric grid point so you can actually get PDet values. You can’t get PDet if the radar is trying to look for something without a radar cross section!

User-added image

Then you computed access from each radar to the aircraft, because PDet is only available on the access object, as PDet is a metric between two objects and not attached to just the aircraft or just the radar.

Now we are going to create the scalar that combines the PDet.
Go to Analysis Workbench and make sure you are in the scalar calculation tab. Select the aircraft on the left and create a new scalar calculation. Select the type called Custom Inline Script. Here you get to add other scalars as arguments to use in equations. Make sure JScript is the Script type. You can use different coding languages by selecting them in the dropdown, but the equation is easy enough that JScript is good. Click the "Set Arguments and Expressions" button.

User-added image

Click Add and go to the first access object between your first radar and the phantom aircraft. On the right, scroll through the list and select RadarSearchTrack > PrimaryPolarization > Integrated PDet and click OK. In the Inline Script menu, you will see the argument added.

User-added image

Repeat this for all of the accesses between the radars and the single phantom aircraft. Once done, you now have the independent PDets that you need to combine. It isn’t a difficult equation, but you need to create the following:
User-added image
For this equation, n is the number of radars.

In the macro, every argument is a variable that starts with x1 and goes to xn, so write the following in the first line:
User-added image
Set the second line to 0, because you do not need the derivative for PDet.

User-added image
 
Each of the x variables corresponds to the integrated PDet between that particular radar and the phantom aircraft, and you can now use this Custom Inline Script scalar on the volumetric.
Now that this is all configured, close out of Analysis Workbench and go into the volumetric properties. Select the ellipsis for the spatial condition and make sure the area target is selected on the left. Click the button in the center to create a new spatial condition type of Scalar At Location. Here you have the option of selecting a scalar to use. This is where we will select the Merged PDet Scalar. Click the ellipsis next to the scalar and select the phantom aircraft on the left of this new window. Select the Merged PDet scalar on the right and click OK out of all the windows until you are back at the volumetric properties.

User-added image

Now set all the other volumetric parameters as you would like to and run the volumetric. It may take some time, but the values on the volumetric will now reflect the merged PDet instead of just PDet from a single radar.

User-added image

 
Product 
Version(s)
TitleUse the Custom Inline Script for Volumetric Analyses
URL NameUse-the-Custom-Inline-Script-for-Volumetric-Analyses

Related Files