public static class BasicVehicle.MoveToTargetVelocityMovement extends BasicVehicle.PhysicalMovement
spec| Constructor and Description |
|---|
BasicVehicle.MoveToTargetVelocityMovement(BasicVehicle.NonAccelMovement basicMovement,
double acceleration,
double targetVelocity)
Create a move-to-target-velocity movement.
|
BasicVehicle.MoveToTargetVelocityMovement(VehicleSpec spec,
Point2D position,
double heading,
double velocity,
double steeringAngle,
double acceleration,
double targetVelocity)
Create a move-to-target-velocity movement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
coast()
Maintain the speed of the vehicle.
|
void |
move(double currentTime,
double timeStep)
Move the vehicle for a given period of time.
|
void |
setAccelerationWithBound(double acceleration)
Set the acceleration with respect to the physical limit of the vehicle.
|
void |
setAccelWithMaxTargetVelocity(double acceleration)
Set the acceleration with maximum target velocity.
|
void |
setMaxAccelWithMaxTargetVelocity()
Set the Vehicle's acceleration to its maximum value.
|
void |
setTargetVelocityWithBound(double targetVelocity)
Set the target velocity of the velocity
|
void |
setTargetVelocityWithMaxAccel(double targetVelocity)
Set the target velocity (with maximum acceleration).
|
void |
slowToStop()
Set the Vehicle's acceleration to its minimum value without going
backward.
|
String |
toString() |
getAcceleration, getHeading, getNonAccelMovement, getPosition, getVelocity, moveWithoutAcceleration, setVelocityWithBoundpublic BasicVehicle.MoveToTargetVelocityMovement(VehicleSpec spec, Point2D position, double heading, double velocity, double steeringAngle, double acceleration, double targetVelocity)
spec - the vehicle specificationposition - the positionheading - the headingvelocity - the velocitysteeringAngle - the steering angleacceleration - the accelerationtargetVelocity - the target velocitypublic BasicVehicle.MoveToTargetVelocityMovement(BasicVehicle.NonAccelMovement basicMovement, double acceleration, double targetVelocity)
basicMovement - the basic movementacceleration - targetVelocity - public void setTargetVelocityWithBound(double targetVelocity)
targetVelocity - the target velocitypublic void setAccelerationWithBound(double acceleration)
setAccelerationWithBound in interface BasicVehicle.MovementWithAccelsetAccelerationWithBound in class BasicVehicle.PhysicalMovementacceleration - the accelerationpublic void coast()
coast in class BasicVehicle.PhysicalMovementpublic void slowToStop()
public void setMaxAccelWithMaxTargetVelocity()
public void setTargetVelocityWithMaxAccel(double targetVelocity)
targetVelocity - the target velocitypublic void setAccelWithMaxTargetVelocity(double acceleration)
acceleration - the accelerationpublic void move(double currentTime,
double timeStep)
move in interface BasicVehicle.Movementmove in class BasicVehicle.PhysicalMovementcurrentTime - the current timetimeStep - the period of time for which the vehicle moves.public String toString()
toString in class BasicVehicle.PhysicalMovementCopyright © 2013. All rights reserved.