VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Add a new sensor signature modifier (addSensorSignatureModifier)

Table of Contents

The Add Sensor Signature Modifier example demonstrates the following:

Sensor Modifiers

A sensor modifier changes the signature of a target, independent of the observer and the medium between the target and observer. This is useful for example to change the signature based on the target's movement, its posture or other appearance characteristic, or the environment at the target's location.

A modifier is implemented with two classes: a DtSignatureModifier derivative which describes the configuration parameters, and a DtSignatureModifierEvaluator derivative which implements the computation. The computation includes a check function to determine if the modification is relevant, and the actual modification of the signature.

The Signature Modifier Class

The sensor modifier has parameters that are described by a class that derives from DtSignatureModifier (the DtSignatureModifier is analogous to a descriptor for simulation components). A key member of DtSignatureModifier that is inherited is type(), which is a string with the name of the modifier. This type should really be thought of as the type of a modifier evaluator. Both the evaluator and modifier have creator functions registered with the same type string. When an evaluator is created, it uses the modifier that has the same type.

Multiple types of evaluators and modifiers can use the same form of parameters; thus multiple modifiers can register their types with the modifier factory using the creator function from the same modifier class. For example, there are two modifier types based on entity speed–one for when the speed is greater than a value, and the other when the speed is less than a value. Both use the DtSpeedSignatureModifier class for their creator function.

Note that although the signature modifier classes have names that suggest the parameters have a particular meaning, the evaluator function can use them as it sees fit. On the other hand, even if two evaluators use the parameters the same way, if they perform different computations they must have different types, which means they used different modifier types, which means the modifiers must have different types–although they register the their types in the factory with the same DtSignatureModifier class creator.

The modifier type string is used in configuration files to identify the modifier and evaluator to use. The parameters in the configuration match the given type of modifier parameters, and the computation is done by the given evaluator type.

In this example, the evaluator requires a real value for the multiplying factor, and a string to define the type of soil type where the factor applies. The DtMultiplierSignatureModifier includes the real factor parameter, but there isn't a modifier class that also provides a string, so a new modifier class MySensorSignatureModifier defined, derived from DtMultiplierSignatureModifier. The new class adds a string parameter.

The Modifier Evaluator Class

The DtSignatureModifierEvaluator has two important functions to define. The first is checkCondition(), which is called each time a sensor looks at the target, and determines if the modifier condition is applicable. This function is typically called inside modifySignature(), the second evaluator function. modifySignature() takes the object and an input signature and returns a (possibly) modified signature.

In this example, the base class DtMultiplierSignatureEvaluator has a modifySignature() function that modifies the input signature by the parametric factor if checkCondition() is true. Therefore MySignatureModifierEvaluator only has to implement the checkCondition() function. checkCondition() looks up the soil at the entity position and compares the type to the parametric string.

vrfAddSignatureModifier_Configuration Configuring Sensor Modifiers

Sensor modifiers are added to the platform (.ope) files in the SMS. For example, in the AggregateLevel AggregateLevelAggregate.ope file, under (sensor-signatures (visual (modifiers there is an entry

            (concealment
(multiplier 0.25)
)

to configure a concealment modifier in the visual domain. There is a special modifier type called "file" that loads a file with signature modifiers in it, and this is used widely to refer to files in the vrfSim/signatureRules directory of an SMS.

In this example, a new Human.ope file has been modified to include

         (soil-sensor-signature-modifier
(soil "Forest")
(multiplier 0.2)
)

This file is placed in a new SMS so that it replaces the Human.ope file in EntityLevel. The scenario included with this example uses this SMS.

The Example Scenario

This example consists of a VR-Forces simulation plugin, a custom SMS, and a scenario that uses this SMS. When you run the scenario, it will use the custom SMS. In the scenario there are two human entities that are being observed by a vehicle. If you open the information console for the vehicle and look at the sensors tab, you will see which of the humans that the vehicle detects in the scenario. There is a circle graphic with radius 50m centered on the vehicle. This is the maximum range at which a human in a forest can be detected. Humans have a base visual signature of 0.5 (km) and a modifier of 0.5 when they are not moving, resulting in a detection range of 250m; the example modifier mutiplies the signature by 0.2 when the human is on Forest soil, so the detection range is 50m. There are two area graphics in the scenario that mark Grass and Forest soil areas. If you move the human entities between Grass and Forest, and between the inside and outside of the circle, you will be able to see the vehicle gain and lose acquisition of the targets.

How to Run the Example

In the launcher, set the AddSignatureModifier plugin to be loaded.

To view the new behavior:

  1. Start VR-Forces GUI and SIM.
  2. Load the scenario for the example: userData/scenarios/Sample/developer_toolkit_examples/addSignatureModifier/addSignatureModifier.scnx
  3. Click on the play button.
  4. Open the object information panel for the vehicle and select the sensors tab.
  5. Move the humans in and out of the Grass and Forest areas, and inside and outside of the circle, and observe the detection results.

You can also open the Human.ope file in the new SMS and modify the soil name or the multiplier to see their effects.

Classes

MySensorSignatureModifierThe new Signature Modifier derived from DtSignatureModifier and DtMultiplierSignatureModifier.
MySignatureModifierEvaluatorThe new Modifier Evaluator derived from DtSignatureModifierEvaluator and DtMultiplierSignatureEvaluator.

Plugin Entry Points

 

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)