public class AccelProfile extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AccelProfile.DurAccel
A pair of acceleration and duration.
|
Constructor and Description |
---|
AccelProfile()
Create an acceleration profile.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public void add(double dur, double acc)
dur
- the durationacc
- the accelerationpublic int size()
public List<AccelProfile.DurAccel> getDurAccelList()
public AccelSchedule toAccelSchedule(double initTime)
initTime
- the initial time of the acceleration schedulepublic AccelSchedule toAccelSchedule(double initTime, double lastAccel)
initTime
- the initial time of the acceleration schedulelastAccel
- the last accelerationCopyright © 2013. All rights reserved.