src/robolib/trajectory/ballistics: Added function to
get total travel time for ReversableRadialBM Feeds posTarget.getMeasureX() into this.getTimeAtX()
This commit is contained in:
parent
f49d8434aa
commit
80a7626c00
|
|
@ -56,4 +56,14 @@ public abstract class ReversableRadialBM<P> extends BallisticModel<P> {
|
|||
);
|
||||
return this.getTimeAtRadius(candidate, radialDistance);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time to target on a given candidate trajectory
|
||||
*
|
||||
* @param candidate The generated velocity to compute against
|
||||
* @return The time it takes to travel to the target position
|
||||
*/
|
||||
public Time getTimeAtTarget(Velocity3d candidate) {
|
||||
return this.getTimeAtX(candidate, posTarget.getMeasureX());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue