Class MotionProfile
java.lang.Object
com.stuypulse.stuylib.streams.numbers.filters.MotionProfile
- All Implemented Interfaces:
IFilter
A filter, that when applied to the input of a motor, will profile it. Similar to the way in which
motion profiling can limit the amount of acceleration and jerk in an S-Curve, this can do that to
real time input. Because this will add a delay, it is recommended that the accelLimit is as high
as possible. Aside from the accelLimit, this is identical to a SlewRateLimiter or TimedRateLimit.
-
Constructor Summary
ConstructorDescriptionMotionProfile
(Number velLimit, Number accelLimit) MotionProfile
(Number velLimit, Number accelLimit, int steps) -
Method Summary
Modifier and TypeMethodDescriptiondouble
get
(double target) Get next value in Filter based on the next value given
-
Constructor Details
-
MotionProfile
- Parameters:
velLimit
- maximum change in displacement per second (u/s)accelLimit
- maximum change in velocity per second (u/s/s)steps
- number of times to apply filter (improves accuracy)
-
MotionProfile
- Parameters:
velLimit
- maximum change in velocity per second (u/s)accelLimit
- maximum change in acceleration per second (u/s/s)
-
-
Method Details