aim4.vehicle
Class AccelProfile

java.lang.Object
  extended by aim4.vehicle.AccelProfile

public class AccelProfile
extends Object

The acceleration profile.


Nested Class Summary
static class AccelProfile.DurAccel
          A pair of acceleration and duration.
 
Constructor Summary
AccelProfile()
          Create an acceleration profile.
 
Method Summary
 void add(double dur, double acc)
          Add a duration and acceleration pair to the profile.
 List<AccelProfile.DurAccel> getDurAccelList()
          Get the list of the acceleration-duration pairs.
 int size()
          Get the number of acceleration-duration pairs in the profile.
 AccelSchedule toAccelSchedule(double initTime)
          Convert the acceleration profile to an acceleration schedule.
 AccelSchedule toAccelSchedule(double initTime, double lastAccel)
          Convert the acceleration profile to an acceleration schedule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccelProfile

public AccelProfile()
Create an acceleration profile.

Method Detail

add

public void add(double dur,
                double acc)
Add a duration and acceleration pair to the profile.

Parameters:
dur - the duration
acc - the acceleration

size

public int size()
Get the number of acceleration-duration pairs in the profile.

Returns:
the number of acceleration-duration pairs

getDurAccelList

public List<AccelProfile.DurAccel> getDurAccelList()
Get the list of the acceleration-duration pairs.

Returns:
the list of the acceleration-duration pairs

toAccelSchedule

public AccelSchedule toAccelSchedule(double initTime)
Convert the acceleration profile to an acceleration schedule.

Parameters:
initTime - the initial time of the acceleration schedule

toAccelSchedule

public AccelSchedule toAccelSchedule(double initTime,
                                     double lastAccel)
Convert the acceleration profile to an acceleration schedule.

Parameters:
initTime - the initial time of the acceleration schedule
lastAccel - the last acceleration


Copyright © 2011. All Rights Reserved.