Condition Sensors

A condition sensor is a user-defined element that consists of a data element array and strings. It references an existing variable class element (data element variable or measure solver computed), which is then tied to the label and unit strings by the array. The array also encapsulates a request (for plotting convenience) and a units conversion factor.
In essence, a condition sensor represents a relationship between a measurable solver quantity (the variable class object) and a string label identifier that can be used in an event file (.xml) to define a condition for Adams Car full-vehicle analyses.

Use of Condition Sensors in Adams Car

Adams Car browses the assembly for condition sensor elements prior to each vehicle analysis and updates the data element end_conditions_array with the derived list. At the beginning of the simulation, the Standard Driver Interface (SDI) then uses the specified end condition measure string in the driver control file to identify the associated variable class object in the dataset, that calculates the quantity the end condition sensor should compare to the target value.
This architecture allows you to extend the provided set of standard end conditions. If, for example, a ramp-steer like custom vehicle event should be ended when the turn radius falls short of a certain threshold, you could:
add a variable class element to calculate the desired turn radius
variable name = .__MDI_SDI_TESTRIG.body_turn_radius
function = (vx2 + vy2)1.5 / (vx*ay - vy*ax)
add a condition sensor referencing the variable above
label = "radius"
variable = .__MDI_SDI_TESTRIG.body_turn_radius
units = length
Then, you could use this new condition sensor with the following line in your driver control file:
(END_CONDITIONS)
{measure test value allowed_error filter_time delay_time group}
'RADIUS' '|<' 20000.0 500.0 0.0 0.0

Creating or Modifying Condition Sensors

To create/modify condition sensors:
1. From the Build menu, point to Condition Sensors, and then select New/Modify.
2. Press F1 and then follow the instructions in the dialog box help for Create/Modify Condition Sensor.
3. Select OK.