Condition_VehicleSpeed
Description
This condition function compares the speed of the specified vehicle (BaseObject) against the given threshold values (F1, F2).
The evaluation result is compared against the given CompareType:
- Equal : Condition is true if the speed equals F1.
- NotEqual : Condition is true if the speed does not equal F1.
- Less : Condition is true if the speed is less than F1.
- LessOrEqual : Condition is true if the speed is less than or equal to F1.
- Greater : Condition is true if the speed is greater than F1.
- GreaterOrEqual: Condition is true if the speed is greater than or equal to F1.
- Between : Condition is true if the speed is between F1 and F2.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | Specifies the vehicle to check (Self or Target). |
| CompareType | Type of comparison operation. |
| F1 | The first threshold value for speed comparison. |
| F2 | The second threshold value (used for Between comparison). |
Examples
| Description | BaseObject | Command | CompareType | F1 | F2 |
|---|---|---|---|---|---|
| Is the vehicle speed greater than 50? | Self | VehicleSpeed | Greater | 50 | |
| Is the vehicle speed between 30 and 60? | Self | VehicleSpeed | Between | 30 | 60 |
| Is the vehicle stopped (speed equals 0)? | Self | VehicleSpeed | Equal | 0 |