STISIM Drive (SDL) - CAO - Analog Output

Sends a continuous analog output to some external piece of equipment. The AO, CAO, DO, and TDO events are the only way you can control external equipment during a simulation run. The CAO event allows you to output continuous voltages that are proportional to the specified simulation variable. The voltage range for each output channel is specified using the DIP switches on the output board and with the CB.CFG file that is created using the ComputerBoards InsCal32 program. Refer to the Additional I/O hardware section for further details about the output cards that are supported. Systems equipped with an active steering system have a digital to analog (D/A) card in them, however, an additional card is needed in order to use the CAO event. The first D/A card is used to control the steering system, speedometer and tachometer (speedometer and tachometer are optional), and then the second card is used for AO and CAO events. If you have a system that does not use the active steering system, then you would install a single D/A card and use that.

Since you can use both the AO and CAO in the same scenario, the CAO event takes precedence over the AO event.

EVENT PARAMETERS:

PARAMETER 1:

Analog channel where the voltage will be output from the computer. The channel numbers start at 0 and you will have to refer to the output board's pin diagram for determining the output pins and their grounds.

PARAMETER 2:

Simulation variable that will be output on the specified channel in parameter 1. The variables that can be output are (these are almost exactly the same as the BSAV event):

1.       Elapsed time since the beginning of the run (seconds)

2.       Driver’s longitudinal acceleration (feet/second² )

3.       Driver’s lateral acceleration (feet/second² )

4.       Driver’s longitudinal velocity (feet/second)

5.       Driver’s lateral velocity (feet/second)

6.       Total longitudinal distance that the driver has traveled since the beginning of the run (feet)

7.       Driver’s lateral lane position with respect to the roadway dividing line, positive to the right (feet).

8.       Vehicle curvature (curved path the vehicle is following based on the driver's steering and speed) (1/foot).

9.       Current roadway curvature (1/foot)

10.   Vehicle heading angle (degrees)

11.   Steering wheel angle input (degrees)

12.   For simple dynamics:

Longitudinal acceleration due to the throttle (feet/second² )

For advanced dynamics:

Throttle input (0 to 1, with 0 being no throttle input and 1 being full throttle input)

13.   For simple dynamics:

Longitudinal acceleration due to the brakes (feet/second² )

For advanced dynamics:

Brake pedal force (pounds)

14.   Current traffic signal light position:

0 - No signal light present
1 - Green light
2 - Yellow light
3 - Red light

15.   Horn indicator, 0 if horn button is pressed

16.   Left turn signal indicator, 0 if turn indicator is on

17.   Right turn signal indicator, 0 if turn indicator is on

18.   Running compilation of the crashes that the driver has been involved in. The number shown in the file is created by adding the number that corresponds to the type of accident, to the current total. This allows you to easily look at the number and tell whether an accident occurred, and if so, the type of accident. The accidents have the following numbers:

1 - Vehicle collisions
2 - Off road collisions
3 - Collisions with pedestrians

For example, if the current voltage for this parameter is 10, then on the next input the parameter has changed to 13, then an accident occurred and it was a collision with a pedestrian (13-10=3 therefore a pedestrian was run over).

19.   Overall minimum time to collision (TTC) for the current simulation frame. During each simulation frame the TTC for each vehicle traveling in the driver’s initial direction (does not work correctly if driver does a U turn) will be computed and the lowest overall value of TTC will be used.

20.   Overall minimum range for the current simulation frame. During each simulation frame the range between the driver and for each vehicle traveling in the driver’s initial direction (does not work correctly if driver does a U turn) will be computed and the lowest overall value of range will be used.

21.   Driver's head yaw angle (degrees). This is only available if you are using a head tracker.

22.   Data marker flag. If you simultaneously press the Alt and M keys during the run the voltage will change from 0 to whatever gain value (parameter 3) that you have specified. This allows you to view the driver and then mark the data file if you see something that you may want to check later. Remember this basically toggles a flag between 0 and 1, so you will have to be careful in how you use it. This means that once the flag is set, you have to press Alt and M again to return the value to 0.

23.   Driver's longitudinal velocity (miles/hour)

24.   Vehicle yaw rate (radians/second)

25.   Current transmission gear

 

PARAMETER 3:

Gain that will be applied to the output channel. Because the output board is only capable of generating a specified range of voltages, you will need to set a gain so that the voltage that is being output is proportional to the signal that you are sending. For example, lets say that you set parameter 2 to a value of 6 and that your run is 10000 feet. Lets also say that the voltage range on the channel that you will be using is set to 0-10 volts. Therefore for maximum output resolution you will want to set the gain to a value of .001 volts/foot (10 volts/10000 feet). This way at the beginning of the run the voltage output will be 0 and at the end of the run the voltage output will be 10.

You will need to refer to the board documentation for setting the output voltages for each channel on the board.

EXAMPLE:

0,CAO,1,1,.001
1000,CAO,2,25,1


The first example instructs the simulator to output the simulation time (parameter 1 set to 1) and to send it out on channel 1 (parameter 1 set to 1) of the output card. The continuous output will begin at the start of the run (0,CAO) and the output voltage on channel 1 will be the simulation time multiplied by .001 (the gain). The second example tells the simulator to output the current transmission gear (parameter 2 set to 25) on channel 2 (parameter 1 set to 2). When the driver has driven 1000 feet the signal will begin (1000,CAO). The continuous output voltage on channel 2 will be the current transmission gear multiplied by 1 (the gain).