ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
|
#include <arpirobot/core/drive/CubicAxisTransform.hpp>
Public Member Functions | |
CubicAxisTransform (double minPower, double midPower) | |
double | applyTransform (double rawAxisValue) override |
Transform that applies a cubic function to the magnitude of the input. The cubic function is fit to the data set (0, minPower), (0.5, midPower), (1, 1) This gives a wide range of inputs that will yield a value near midPower Sign of the output will match the sign of the input
WARNING: Since input of 0 results in an output of minPower DO NOT use with a non-zero minPower and a non-zero deadband.
arpirobot::CubicAxisTransform::CubicAxisTransform | ( | double | minPower, |
double | midPower | ||
) |
minPower | The minimum output of this cubic function (leave as zero if unsure) |
midPower | The "middle" power where the "flat" part of the function should be positioned |
|
overridevirtual |
Axis transforms should override this function to implement specific calculations.
Implements arpirobot::BaseAxisTransform.