aim4.driver

## Class DriverUtil

- java.lang.Object
- - aim4.driver.DriverUtil

-     public class DriverUtil
      extends Object

  A utility class for drivers.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static double` | `DEFAULT_LEAD_TIME` The default amount of lead time for lane following, in seconds.
    `static double` | `MIN_LEAD_DIST` The constant term in the formula of calculating lead distances.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `calculateMaxFeasibleVelocity(VehicleDriverView vehicle)` Determine the maximum velocity at which the Vehicle should travel given the Lane in which it is.
    `static double` | `getLeadDistance(VehicleDriverView vehicle)` Get the estimated lead distance, which is roughly equal to the speed of the vehicle times the default lead time.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_LEAD_TIME

          public static final double DEFAULT_LEAD_TIME

      The default amount of lead time for lane following, in seconds. The lead time indicates how far along the Lane from the point nearest to the Vehicle's current location the Vehicle should aim. By default, lead distance = DEFAULT_LEAD_TIME * velocity + MIN_LEAD_DIST. 0.4 seconds.
      See Also:
        Constant Field Values

    - #### MIN_LEAD_DIST

          public static final double MIN_LEAD_DIST

      The constant term in the formula of calculating lead distances. It is the minimum possible lead distance. By default, lead distance = leadTime * velocity + MIN_LEAD_DIST. 0.2 meters.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getLeadDistance

          public static double getLeadDistance(VehicleDriverView vehicle)

      Get the estimated lead distance, which is roughly equal to the speed of the vehicle times the default lead time.
      Returns:
        the lead distance

    - #### calculateMaxFeasibleVelocity

          public static double calculateMaxFeasibleVelocity(VehicleDriverView vehicle)

      Determine the maximum velocity at which the Vehicle should travel given the Lane in which it is.
      Parameters:
        `vehicle` - the vehicle
      Returns:
        the maximum velocity at which the Vehicle should travel given the Lane in which it is

Copyright © 2013. All rights reserved.