Schematic functions

Top  Previous  Next

Function name:

Usage:

CorrAccLoc

Returns the current crash's location along the current diagram corridor.   For a milepost corridor, this function returns the value stored in the mile_1 field.   For a hundred-block corridor, this function returns the value stored in the block_1 or block_2 field depending on which street matches the primary street in corridor study.

CorrBegin

Returns the beginning of the corridor in the current study.  For example, if the current study examines milepost 4.5 to 9.3, this function will return 4.5.

CorrEnd

Returns the end of the corridor in the current study. For example, if the current study examines milepost 4.5 to 9.3, this function will return 9.3.

CorrLength

Returns the length of the corridor in the current study. For example, if the current study examines milepost 4.5 to 9.3, this function will return 4.8.  (9.3 - 4.5)

DistGroup(0..20)

Returns the distance group values from the settings box.   The first distance value is DistGroup(0), the second is DistGroup(1) and so on.  These values are often used in schematics to create different areas for crashes which occurred at varying distances from the intersection.

NBArriving,  NBDeparting, SBArriving, SBDeparting, EBArriving, EBDeparting, WBArriving, WBDeparting

These functions perform some calculations to determine which side of the intersection an crash occurred on. The following steps are taken to determine this value:

1.  Both of the vehicles' direction of travel values are examined to determine the overall direction of travel for the crash.  This will indicate which function will return true.  The following logic is used for this calculation:

a)  If both vehicles were traveling in the same direction that direction is the overall direction of travel for the crash.

b)  If only one of the directions was reported, it becomes the overall direction of travel for the crash.

c)  If neither of the above conditions is met, then none of these functions will return true.

2.  The value of _DirFromInt is examined.  If such a value exists and specifies a direction from intersection for this crash, that value is used to determine whether the vehicle was "arriving" or "departing" the intersection.  For example, if the overall direction of travel for the crash is Northbound and the direction from intersection is indicated to be North, then NBDeparting will return true.

3.  If the no value exists for _DirFromInt, the crash is assumed to be "arriving".

North, South, East, West, NoDir

These are constants representing North, South, East and West.  These constants apply to Veh1Dir and Veh2Dir

Veh1Dir, Veh2Dir

Returns the direction travel for vehicle 1 and 2 as described in the calculated fields file.