src/robolib/trajectory/ballistics: Added function to

get total travel time for ReversableRadialBM

Feeds posTarget.getMeasureX() into
this.getTimeAtX()
This commit is contained in:
Ray Healy 2026-02-10 20:37:14 -05:00
parent f49d8434aa
commit 80a7626c00
1 changed files with 10 additions and 0 deletions

View File

@ -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());
}
}