ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
Public Member Functions | List of all members
arpirobot::CubicAxisTransform Class Reference

#include <arpirobot/core/drive/CubicAxisTransform.hpp>

Inheritance diagram for arpirobot::CubicAxisTransform:
arpirobot::BaseAxisTransform

Public Member Functions

 CubicAxisTransform (double minPower, double midPower)
 
double applyTransform (double rawAxisValue) override
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CubicAxisTransform()

arpirobot::CubicAxisTransform::CubicAxisTransform ( double  minPower,
double  midPower 
)
Parameters
minPowerThe minimum output of this cubic function (leave as zero if unsure)
midPowerThe "middle" power where the "flat" part of the function should be positioned

Member Function Documentation

◆ applyTransform()

double arpirobot::CubicAxisTransform::applyTransform ( double  rawAxisValue)
overridevirtual

Axis transforms should override this function to implement specific calculations.

Implements arpirobot::BaseAxisTransform.


The documentation for this class was generated from the following file: