aim4.vehicle
Interface VehicleDriverView

All Known Subinterfaces:
AutoVehicleDriverView, AutoVehicleSimView, HumanDrivenVehicleDriverView, HumanDrivenVehicleSimView, ProxyVehicleSimView, VehicleSimView
All Known Implementing Classes:
BasicAutoVehicle, BasicVehicle, ProxyVehicle

public interface VehicleDriverView

The interface of a vehicle from the viewpoint of a driver.


Method Summary
 void coast()
          Set the acceleration to zero.
 double gaugeHeading()
          Get this Vehicle's compass gauge's reading.
 Point2D gaugePointAtMiddleFront(double delta)
          Get the point in front of the middle point of the vehicle that is at the distance of delta away from the vehicle, according to the gauges.
 Point2D gaugePointAtRear()
          Get the point at the rear center of the vehicle, according to our gauges
 Point2D gaugePointBetweenFrontWheels()
          Get the point between the front wheels, according to our gauges.
 Point2D gaugePosition()
          Get the current position of this Vehicle, represented by the point at the center of the front of the Vehicle, according to the Vehicle's gauges.
 Point2D gaugeRearLeftCornerPoint()
          Get the current global coordinate of the rear-left corner of this Vehicle, according to the Vehicle's gauges.
 Point2D gaugeRearRightCornerPoint()
          Get the current global coordinate of the rear-right corner of this Vehicle, according to the Vehicle's gauges.
 Shape gaugeShape()
          Get a Shape describing the Vehicle, according to the Vehicle's gauges.
 double gaugeTime()
          Read this Vehicle's clock (chronometer).
 double gaugeVelocity()
          Get this Vehicle's speedometer gauge's reading.
 AccelSchedule getAccelSchedule()
          Get the acceleration profile.
 Driver getDriver()
          Getter method for the Driver controlling this Vehicle.
 VehicleSpec getSpec()
          Get the specification of the vehicle
 int getVIN()
          Get the ID number of this vehicle.
 void printState()
          print the state of the driver.
 void removeAccelSchedule()
          Remove the acceleration profile.
 void setAccelSchedule(AccelSchedule accelProfile)
          Set the acceleration profile.
 void setAccelWithMaxTargetVelocity(double acceleration)
          Set the acceleration to the specified value, using maximum and minimum velocities as targets, automatically.
 void setTargetVelocityWithMaxAccel(double targetVelocity)
          Set the acceleration to the appropriate value to reach the target velocity, based on the current speedometer reading.
 void slowToStop()
          Set the Vehicle's acceleration to its minimum value without going backward.
 void turnTowardPoint(Point2D p)
          Turn the wheels toward a given Point.
 

Method Detail

getVIN

int getVIN()
Get the ID number of this vehicle. If the vehicle does not have a VIN number, this function returns a negative number.

Returns:
the Vehicle's VIN number.

getSpec

VehicleSpec getSpec()
Get the specification of the vehicle

Returns:
the specification of the vehicle

getDriver

Driver getDriver()
Getter method for the Driver controlling this Vehicle.

Returns:
the Driver controlling this Vehicle, or null if none exists.

getAccelSchedule

AccelSchedule getAccelSchedule()
Get the acceleration profile.

Returns:
the acceleration profile

gaugeTime

double gaugeTime()
Read this Vehicle's clock (chronometer).

Returns:
the Vehicle's clock gauge.

gaugePosition

Point2D gaugePosition()
Get the current position of this Vehicle, represented by the point at the center of the front of the Vehicle, according to the Vehicle's gauges.

Returns:
the position of this Vehicle according to the Vehicle's gauges

gaugeHeading

double gaugeHeading()
Get this Vehicle's compass gauge's reading.

Returns:
the Vehicle's compass gauge's reading

gaugeVelocity

double gaugeVelocity()
Get this Vehicle's speedometer gauge's reading.

Returns:
the Vehicle's speedometer gauge's reading

gaugeShape

Shape gaugeShape()
Get a Shape describing the Vehicle, according to the Vehicle's gauges.

Returns:
a Shape describing this Vehicle, according to the Vehicle's gauges.

gaugePointAtMiddleFront

Point2D gaugePointAtMiddleFront(double delta)
Get the point in front of the middle point of the vehicle that is at the distance of delta away from the vehicle, according to the gauges.

Parameters:
delta - the distance of the vehicle and the point, according to the gauges
Returns:
the projected point

gaugePointBetweenFrontWheels

Point2D gaugePointBetweenFrontWheels()
Get the point between the front wheels, according to our gauges.

Returns:
the global coordinates of the point between the front wheels, according to the gauges

gaugePointAtRear

Point2D gaugePointAtRear()
Get the point at the rear center of the vehicle, according to our gauges

Returns:
the global coordinates of the point at the center of the vehicle's rear, according to the gauges.

gaugeRearLeftCornerPoint

Point2D gaugeRearLeftCornerPoint()
Get the current global coordinate of the rear-left corner of this Vehicle, according to the Vehicle's gauges.

Returns:
a point representing the rear-left corner, according to the Vehicle's gauges.

gaugeRearRightCornerPoint

Point2D gaugeRearRightCornerPoint()
Get the current global coordinate of the rear-right corner of this Vehicle, according to the Vehicle's gauges.

Returns:
a point representing the rear-right corner, according to the Vehicle's gauges.

setTargetVelocityWithMaxAccel

void setTargetVelocityWithMaxAccel(double targetVelocity)
Set the acceleration to the appropriate value to reach the target velocity, based on the current speedometer reading. Obeys limits on acceleration and velocity as well as any disabilities.

Parameters:
targetVelocity - the desired ultimate velocity

setAccelSchedule

void setAccelSchedule(AccelSchedule accelProfile)
Set the acceleration profile.

Parameters:
accelProfile - the acceleration profile

removeAccelSchedule

void removeAccelSchedule()
Remove the acceleration profile.


turnTowardPoint

void turnTowardPoint(Point2D p)
Turn the wheels toward a given Point.

Parameters:
p - the Point toward which to turn the wheels

setAccelWithMaxTargetVelocity

void setAccelWithMaxTargetVelocity(double acceleration)
Set the acceleration to the specified value, using maximum and minimum velocities as targets, automatically. Obeys limits on acceleration and velocity as well as any disabilities.

Parameters:
acceleration - the desired acceleration.

coast

void coast()
Set the acceleration to zero. Obeys limits on acceleration and disabilities.


slowToStop

void slowToStop()
Set the Vehicle's acceleration to its minimum value without going backward. Obeys limits on acceleration as well as disabilities.


printState

void printState()
print the state of the driver.



Copyright © 2011. All Rights Reserved.