LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
okapi Namespace Reference

Namespaces

namespace  literals
 

Classes

class  AbstractButton
 
class  AbstractMotor
 
class  AbstractRate
 
class  AbstractTimer
 
class  ADIButton
 
class  ADIEncoder
 
class  ADIGyro
 
class  ADIMotor
 
class  ADIUltrasonic
 
class  AsyncController
 Closed-loop controller that steps on its own in another thread and automatically writes to the output. More...
 
class  AsyncLinearMotionProfileController
 
class  AsyncMotionProfileController
 
class  AsyncMotionProfileControllerBuilder
 
class  AsyncPosControllerBuilder
 
class  AsyncPosIntegratedController
 Closed-loop controller that uses the V5 motor's onboard control to move. More...
 
class  AsyncPositionController
 
class  AsyncPosPIDController
 
class  AsyncVelControllerBuilder
 
class  AsyncVelIntegratedController
 Closed-loop controller that uses the V5 motor's onboard control to move. More...
 
class  AsyncVelocityController
 
class  AsyncVelPIDController
 
class  AsyncWrapper
 
class  AverageFilter
 A filter which returns the average of a list of values. More...
 
class  ButtonBase
 
class  ChassisController
 
class  ChassisControllerBuilder
 
class  ChassisControllerIntegrated
 
class  ChassisControllerPID
 
class  ChassisModel
 A version of the ReadOnlyChassisModel that also supports write methods, such as setting motor speed. More...
 
class  ChassisScales
 
class  ClosedLoopController
 An abstract closed-loop controller. More...
 
class  ComposableFilter
 
class  ConfigurableTimeUtilFactory
 A TimeUtilFactory that supplies the SettledUtil parameters passed in the constructor to every new TimeUtil instance. More...
 
class  ContinuousRotarySensor
 
class  Controller
 
class  ControllerButton
 
class  ControllerInput
 
class  ControllerOutput
 
class  ControllerRunner
 
class  ControllerRunnerFactory
 
class  ControllerUtil
 
struct  DefaultLoggerInitializer
 
class  DefaultOdomChassisController
 
class  DemaFilter
 
class  DistanceSensor
 
class  EKFFilter
 
class  EmaFilter
 
class  Filter
 
class  FilteredControllerInput
 A ControllerInput with a filter built in. More...
 
class  FlywheelSimulator
 
class  HDriveModel
 
class  IMU
 
class  IntegratedEncoder
 
class  IterativeController
 Closed-loop controller that steps iteratively using the step method below. More...
 
class  IterativeControllerFactory
 
class  IterativeMotorVelocityController
 
class  IterativePositionController
 
class  IterativePosPIDController
 
class  IterativeVelocityController
 
class  IterativeVelPIDController
 
class  Logger
 
class  MedianFilter
 A filter which returns the median value of list of values. More...
 
class  Motor
 
class  MotorGroup
 
class  OdomChassisController
 
class  Odometry
 
class  OdomMath
 
struct  OdomState
 
class  OffsetableControllerInput
 
class  OpticalSensor
 
class  PassthroughFilter
 
struct  PathfinderLimits
 
struct  PathfinderPoint
 
class  PIDTuner
 
class  PIDTunerFactory
 
struct  Point
 
class  Potentiometer
 
class  Rate
 
class  ReadOnlyChassisModel
 A version of the ChassisModel that only supports read methods, such as querying sensor values. More...
 
class  RotarySensor
 
class  RotationSensor
 
class  RQuantity
 
class  SettledUtil
 
class  SkidSteerModel
 
class  Supplier
 A supplier of instances of T. More...
 
class  ThreeEncoderOdometry
 
class  ThreeEncoderSkidSteerModel
 
class  ThreeEncoderXDriveModel
 
class  Timer
 
class  TimeUtil
 Utility class for holding an AbstractTimer, AbstractRate, and SettledUtil together in one class since they are commonly used together. More...
 
class  TimeUtilFactory
 
class  TwoEncoderOdometry
 
class  VelMath
 
class  VelMathFactory
 
class  XDriveModel
 

Enumerations

enum class  StateMode { FRAME_TRANSFORMATION , CARTESIAN }
 The mode for the OdomState calculated by Odometry. More...
 
enum class  ControllerId { master = 0 , partner = 1 }
 Which controller role this has. More...
 
enum class  ControllerAnalog { leftX = 0 , leftY = 1 , rightX = 2 , rightY = 3 }
 The analog sticks. More...
 
enum class  ControllerDigital {
  L1 = 6 , L2 = 7 , R1 = 8 , R2 = 9 ,
  up = 10 , down = 11 , left = 12 , right = 13 ,
  X = 14 , B = 15 , Y = 16 , A = 17
}
 Various buttons. More...
 
enum class  OpticalSensorOutput { hue , saturation , brightness }
 
enum class  IMUAxes { z , y , x }
 

Functions

AbstractMotor::GearsetRatioPair operator* (AbstractMotor::gearset gearset, double ratio)
 
constexpr QAcceleration operator""_mps2 (long double x)
 
constexpr QAcceleration operator""_mps2 (unsigned long long int x)
 
constexpr QAcceleration operator""_G (long double x)
 
constexpr QAcceleration operator""_G (unsigned long long int x)
 
constexpr QAngle radian (1.0)
 
constexpr QAngle operator""_rad (long double x)
 
constexpr QAngle operator""_rad (unsigned long long int x)
 
constexpr QAngle operator""_deg (long double x)
 
constexpr QAngle operator""_deg (unsigned long long int x)
 
static QAngularSpeed convertHertzToRadPerSec (QFrequency in)
 
constexpr QAngularSpeed operator""_rpm (long double x)
 
constexpr QAngularSpeed operator""_rpm (unsigned long long int x)
 
constexpr QForce operator""_n (long double x)
 
constexpr QForce operator""_n (unsigned long long int x)
 
constexpr QForce operator""_lbf (long double x)
 
constexpr QForce operator""_lbf (unsigned long long int x)
 
constexpr QForce operator""_kp (long double x)
 
constexpr QForce operator""_kp (unsigned long long int x)
 
constexpr QFrequency Hz (1.0)
 
constexpr QFrequency operator""_Hz (long double x)
 
constexpr QFrequency operator""_Hz (unsigned long long int x)
 
constexpr QLength meter (1.0)
 
constexpr QLength operator""_mm (long double x)
 
constexpr QLength operator""_cm (long double x)
 
constexpr QLength operator""_m (long double x)
 
constexpr QLength operator""_km (long double x)
 
constexpr QLength operator""_mi (long double x)
 
constexpr QLength operator""_yd (long double x)
 
constexpr QLength operator""_ft (long double x)
 
constexpr QLength operator""_in (long double x)
 
constexpr QLength operator""_tile (long double x)
 
constexpr QLength operator""_mm (unsigned long long int x)
 
constexpr QLength operator""_cm (unsigned long long int x)
 
constexpr QLength operator""_m (unsigned long long int x)
 
constexpr QLength operator""_km (unsigned long long int x)
 
constexpr QLength operator""_mi (unsigned long long int x)
 
constexpr QLength operator""_yd (unsigned long long int x)
 
constexpr QLength operator""_ft (unsigned long long int x)
 
constexpr QLength operator""_in (unsigned long long int x)
 
constexpr QLength operator""_tile (unsigned long long int x)
 
constexpr QMass kg (1.0)
 
constexpr QMass operator""_kg (long double x)
 
constexpr QMass operator""_g (long double x)
 
constexpr QMass operator""_t (long double x)
 
constexpr QMass operator""_oz (long double x)
 
constexpr QMass operator""_lb (long double x)
 
constexpr QMass operator""_st (long double x)
 
constexpr QMass operator""_kg (unsigned long long int x)
 
constexpr QMass operator""_g (unsigned long long int x)
 
constexpr QMass operator""_t (unsigned long long int x)
 
constexpr QMass operator""_oz (unsigned long long int x)
 
constexpr QMass operator""_lb (unsigned long long int x)
 
constexpr QMass operator""_st (unsigned long long int x)
 
constexpr QPressure pascal (1.0)
 
constexpr QPressure operator""_Pa (long double x)
 
constexpr QPressure operator""_Pa (unsigned long long int x)
 
constexpr QPressure operator""_bar (long double x)
 
constexpr QPressure operator""_bar (unsigned long long int x)
 
constexpr QPressure operator""_psi (long double x)
 
constexpr QPressure operator""_psi (unsigned long long int x)
 
constexpr QSpeed operator""_mps (long double x)
 
constexpr QSpeed operator""_miph (long double x)
 
constexpr QSpeed operator""_kmph (long double x)
 
constexpr QSpeed operator""_mps (unsigned long long int x)
 
constexpr QSpeed operator""_miph (unsigned long long int x)
 
constexpr QSpeed operator""_kmph (unsigned long long int x)
 
constexpr QTime second (1.0)
 
constexpr QTime operator""_s (long double x)
 
constexpr QTime operator""_ms (long double x)
 
constexpr QTime operator""_min (long double x)
 
constexpr QTime operator""_h (long double x)
 
constexpr QTime operator""_day (long double x)
 
constexpr QTime operator""_s (unsigned long long int x)
 
constexpr QTime operator""_ms (unsigned long long int x)
 
constexpr QTime operator""_min (unsigned long long int x)
 
constexpr QTime operator""_h (unsigned long long int x)
 
constexpr QTime operator""_day (unsigned long long int x)
 
constexpr QTorque operator""_nM (long double x)
 
constexpr QTorque operator""_nM (unsigned long long int x)
 
constexpr QTorque operator""_inLb (long double x)
 
constexpr QTorque operator""_inLb (unsigned long long int x)
 
constexpr QTorque operator""_ftLb (long double x)
 
constexpr QTorque operator""_ftLb (unsigned long long int x)
 
constexpr Number number (1.0)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aoperator+ (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aoperator- (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< std::ratio_add< M1, M2 >, std::ratio_add< L1, L2 >, std::ratio_add< T1, T2 >, std::ratio_add< A1, A2 > > operator* (const RQuantity< M1, L1, T1, A1 > &lhs, const RQuantity< M2, L2, T2, A2 > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aoperator* (const double &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aoperator* (const RQuantity< M, L, T, A > &lhs, const double &rhs)
 
template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< std::ratio_subtract< M1, M2 >, std::ratio_subtract< L1, L2 >, std::ratio_subtract< T1, T2 >, std::ratio_subtract< A1, A2 > > operator/ (const RQuantity< M1, L1, T1, A1 > &lhs, const RQuantity< M2, L2, T2, A2 > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_subtract< std::ratio< 0 >, M >, std::ratio_subtract< std::ratio< 0 >, L >, std::ratio_subtract< std::ratio< 0 >, T >, std::ratio_subtract< std::ratio< 0 >, A > > operator/ (const double &x, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aoperator/ (const RQuantity< M, L, T, A > &rhs, const double &x)
 
template<typename M , typename L , typename T , typename A >
constexpr bool operator== (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool operator!= (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool operator<= (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool operator>= (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool operator< (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool operator> (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aabs (const RQuantity< M, L, T, A > &rhs)
 
template<typename R , typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, R >, std::ratio_multiply< L, R >, std::ratio_multiply< T, R >, std::ratio_multiply< A, R > > pow (const RQuantity< M, L, T, A > &lhs)
 
template<int R, typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< R > >, std::ratio_multiply< L, std::ratio< R > >, std::ratio_multiply< T, std::ratio< R > >, std::ratio_multiply< A, std::ratio< R > > > pow (const RQuantity< M, L, T, A > &lhs)
 
template<int R, typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< R > >, std::ratio_divide< L, std::ratio< R > >, std::ratio_divide< T, std::ratio< R > >, std::ratio_divide< A, std::ratio< R > > > root (const RQuantity< M, L, T, A > &lhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< 2 > >, std::ratio_divide< L, std::ratio< 2 > >, std::ratio_divide< T, std::ratio< 2 > >, std::ratio_divide< A, std::ratio< 2 > > > sqrt (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< 3 > >, std::ratio_divide< L, std::ratio< 3 > >, std::ratio_divide< T, std::ratio< 3 > >, std::ratio_divide< A, std::ratio< 3 > > > cbrt (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< 2 > >, std::ratio_multiply< L, std::ratio< 2 > >, std::ratio_multiply< T, std::ratio< 2 > >, std::ratio_multiply< A, std::ratio< 2 > > > square (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< 3 > >, std::ratio_multiply< L, std::ratio< 3 > >, std::ratio_multiply< T, std::ratio< 3 > >, std::ratio_multiply< A, std::ratio< 3 > > > cube (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Ahypot (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Amod (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< M1, L1, T1, A1 > copysign (const RQuantity< M1, L1, T1, A1 > &lhs, const RQuantity< M2, L2, T2, A2 > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aceil (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Afloor (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Atrunc (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Around (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
constexpr Number sin (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number cos (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number tan (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > asin (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > acos (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > atan (const Number &rhs)
 
constexpr Number sinh (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number cosh (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number tanh (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > asinh (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > acosh (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > atanh (const Number &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > atan2 (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<class QType >
std::string getShortUnitName (QType q)
 Returns a short name for a unit.
 
constexpr double ipow (const double base, const int expo)
 Integer power function.
 
constexpr double cutRange (const double value, const double min, const double max)
 Cuts out a range from the number.
 
constexpr double deadband (const double value, const double min, const double max)
 Deadbands a range of the number.
 
constexpr double remapRange (const double value, const double oldMin, const double oldMax, const double newMin, const double newMax)
 Remap a value in the range [oldMin, oldMax] to the range [newMin, newMax].
 
template<typename E >
constexpr auto toUnderlyingType (const E e) noexcept
 Converts an enum to its value type.
 
constexpr auto boolToSign (const bool b) noexcept
 Converts a bool to a sign.
 
constexpr long modulus (const long lhs, const long rhs) noexcept
 Computes lhs mod rhs using Euclidean division.
 
constexpr std::int32_t gearsetToTPR (const AbstractMotor::gearset igearset) noexcept
 Converts a gearset to its TPR.
 
constexpr std::int8_t transformADIPort (const std::int8_t port)
 Maps ADI port numbers/chars to numbers:
 

Variables

constexpr QAcceleration mps2 = meter / (second * second)
 
constexpr QAcceleration G = 9.80665 * mps2
 
constexpr QAngle degree = static_cast<double>(2_pi / 360.0) * radian
 
constexpr QAngularSpeed radps = radian / second
 
constexpr QAngularSpeed rpm = (360 * degree) / minute
 
constexpr QAngularSpeed cps = (0.01 * degree) / second
 
constexpr QArea kilometer2 = kilometer * kilometer
 
constexpr QArea meter2 = meter * meter
 
constexpr QArea decimeter2 = decimeter * decimeter
 
constexpr QArea centimeter2 = centimeter * centimeter
 
constexpr QArea millimeter2 = millimeter * millimeter
 
constexpr QArea inch2 = inch * inch
 
constexpr QArea foot2 = foot * foot
 
constexpr QArea mile2 = mile * mile
 
constexpr QForce newton = (kg * meter) / (second * second)
 
constexpr QForce poundforce = pound * G
 
constexpr QForce kilopond = kg * G
 
constexpr QLength decimeter = meter / 10
 
constexpr QLength centimeter = meter / 100
 
constexpr QLength millimeter = meter / 1000
 
constexpr QLength kilometer = 1000 * meter
 
constexpr QLength inch = 2.54 * centimeter
 
constexpr QLength foot = 12 * inch
 
constexpr QLength yard = 3 * foot
 
constexpr QLength mile = 5280 * foot
 
constexpr QLength tile = 24 * inch
 
constexpr QMass gramme = 0.001 * kg
 
constexpr QMass tonne = 1000 * kg
 
constexpr QMass ounce = 0.028349523125 * kg
 
constexpr QMass pound = 16 * ounce
 
constexpr QMass stone = 14 * pound
 
constexpr QPressure bar = 100000 * pascal
 
constexpr QPressure psi = pound * G / inch2
 
constexpr QSpeed mps = meter / second
 
constexpr QSpeed miph = mile / hour
 
constexpr QSpeed kmph = kilometer / hour
 
constexpr QTime millisecond = second / 1000
 
constexpr QTime minute = 60 * second
 
constexpr QTime hour = 60 * minute
 
constexpr QTime day = 24 * hour
 
constexpr QTorque newtonMeter = newton * meter
 
constexpr QTorque footPound = 1.355817948 * newtonMeter
 
constexpr QTorque inchPound = 0.083333333 * footPound
 
constexpr QVolume kilometer3 = kilometer2 * kilometer
 
constexpr QVolume meter3 = meter2 * meter
 
constexpr QVolume decimeter3 = decimeter2 * decimeter
 
constexpr QVolume centimeter3 = centimeter2 * centimeter
 
constexpr QVolume millimeter3 = millimeter2 * millimeter
 
constexpr QVolume inch3 = inch2 * inch
 
constexpr QVolume foot3 = foot2 * foot
 
constexpr QVolume mile3 = mile2 * mile
 
constexpr QVolume litre = decimeter3
 
std::shared_ptr< LoggerdefaultLogger
 
static DefaultLoggerInitializer defaultLoggerInitializer
 
static constexpr double inchToMM = 25.4
 Converts inches to millimeters.
 
static constexpr double mmToInch = 0.0393700787
 Converts millimeters to inches.
 
static constexpr double degreeToRadian = 0.01745329252
 Converts degrees to radians.
 
static constexpr double radianToDegree = 57.2957795
 Converts radians to degrees.
 
static constexpr double imeTorqueTPR = 627.2
 The ticks per rotation of the 393 IME with torque gearing.
 
static constexpr std::int32_t imeSpeedTPR = 392
 The ticks per rotation of the 393 IME with speed gearing.
 
static constexpr double imeTurboTPR = 261.333
 The ticks per rotation of the 393 IME with turbo gearing.
 
static constexpr double ime269TPR = 240.448
 The ticks per rotation of the 269 IME.
 
static constexpr std::int32_t imev5RedTPR = 1800
 The ticks per rotation of the V5 motor with a red gearset.
 
static constexpr std::int32_t imev5GreenTPR = 900
 The ticks per rotation of the V5 motor with a green gearset.
 
static constexpr std::int32_t imev5BlueTPR = 300
 The ticks per rotation of the V5 motor with a blue gearset.
 
static constexpr std::int32_t quadEncoderTPR = 360
 The ticks per rotation of the red quadrature encoders.
 
static constexpr double pi = 3.1415926535897932
 The value of pi.
 
static constexpr double pi2 = 1.5707963267948966
 The value of pi divided by 2.
 
static constexpr double gravity = 9.80665
 The conventional value of gravity of Earth.
 
static constexpr auto OKAPI_PROS_ERR = INT32_MAX
 Same as PROS_ERR.
 
static constexpr auto OKAPI_PROS_ERR_F = INFINITY
 Same as PROS_ERR_F.
 
static constexpr double v5MotorMaxVoltage = 12000
 The maximum voltage that can be sent to V5 motors.
 
static constexpr std::int8_t motorUpdateRate = 10
 The polling frequency of V5 motors in milliseconds.
 
static constexpr std::int8_t adiUpdateRate = 10
 The polling frequency of the ADI ports in milliseconds.
 

Enumeration Type Documentation

◆ ControllerAnalog

enum class okapi::ControllerAnalog
strong

The analog sticks.

Enumerator
leftX 

leftX

leftY 

leftY

rightX 

rightX

rightY 

rightY

Definition at line 22 of file controllerUtil.hpp.

◆ ControllerDigital

enum class okapi::ControllerDigital
strong

Various buttons.

Enumerator
L1 

L1.

L2 

L2.

R1 

R1.

R2 

R2.

up 

up

down 

down

left 

left

right 

right

X.

B.

Y.

A.

Definition at line 32 of file controllerUtil.hpp.

◆ ControllerId

enum class okapi::ControllerId
strong

Which controller role this has.

Enumerator
master 

master

partner 

partner

Definition at line 14 of file controllerUtil.hpp.

◆ IMUAxes

enum class okapi::IMUAxes
strong
Enumerator

Yaw Axis.

Pitch Axis.

Roll Axis.

Definition at line 13 of file IMU.hpp.

◆ OpticalSensorOutput

enum class okapi::OpticalSensorOutput
strong
Enumerator
hue 

The color.

saturation 

The color's intensity relative to its brightness.

brightness 

The amount of light.

Definition at line 14 of file opticalSensor.hpp.

◆ StateMode

enum class okapi::StateMode
strong

The mode for the OdomState calculated by Odometry.

Enumerator
FRAME_TRANSFORMATION 

+x is forward, +y is right, 0 degrees is along +x

CARTESIAN 

+x is right, +y is forward, 0 degrees is along +y

Definition at line 12 of file stateMode.hpp.

Function Documentation

◆ abs()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::abs ( const RQuantity< M, L, T, A > &  rhs)
constexpr

Definition at line 195 of file RQuantity.hpp.

◆ acos()

constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::acos ( const Number &  rhs)
constexpr

Definition at line 357 of file RQuantity.hpp.

◆ acosh()

constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::acosh ( const Number &  rhs)
constexpr

Definition at line 390 of file RQuantity.hpp.

◆ asin()

constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::asin ( const Number &  rhs)
constexpr

Definition at line 351 of file RQuantity.hpp.

◆ asinh()

constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::asinh ( const Number &  rhs)
constexpr

Definition at line 384 of file RQuantity.hpp.

◆ atan()

constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::atan ( const Number &  rhs)
constexpr

Definition at line 363 of file RQuantity.hpp.

◆ atan2()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::atan2 ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 403 of file RQuantity.hpp.

◆ atanh()

constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::atanh ( const Number &  rhs)
constexpr

Definition at line 396 of file RQuantity.hpp.

◆ boolToSign()

constexpr auto okapi::boolToSign ( const bool  b)
constexprnoexcept

Converts a bool to a sign.

Parameters
bThe bool.
Returns
True corresponds to 1 and false corresponds to -1.

Definition at line 198 of file mathUtil.hpp.

◆ cbrt()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< 3 > >, std::ratio_divide< L, std::ratio< 3 > >, std::ratio_divide< T, std::ratio< 3 > >, std::ratio_divide< A, std::ratio< 3 > > > okapi::cbrt ( const RQuantity< M, L, T, A > &  rhs)
constexpr

Definition at line 252 of file RQuantity.hpp.

◆ ceil()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::ceil ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 309 of file RQuantity.hpp.

◆ convertHertzToRadPerSec()

static QAngularSpeed okapi::convertHertzToRadPerSec ( QFrequency  in)
static

Definition at line 26 of file QAngularSpeed.hpp.

◆ copysign()

template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< M1, L1, T1, A1 > okapi::copysign ( const RQuantity< M1, L1, T1, A1 > &  lhs,
const RQuantity< M2, L2, T2, A2 > &  rhs 
)
constexpr

Definition at line 303 of file RQuantity.hpp.

◆ cos()

constexpr Number okapi::cos ( const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &  rhs)
constexpr

Definition at line 341 of file RQuantity.hpp.

◆ cosh()

constexpr Number okapi::cosh ( const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &  rhs)
constexpr

Definition at line 374 of file RQuantity.hpp.

◆ cube()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< 3 > >, std::ratio_multiply< L, std::ratio< 3 > >, std::ratio_multiply< T, std::ratio< 3 > >, std::ratio_multiply< A, std::ratio< 3 > > > okapi::cube ( const RQuantity< M, L, T, A > &  rhs)
constexpr

Definition at line 276 of file RQuantity.hpp.

◆ cutRange()

constexpr double okapi::cutRange ( const double  value,
const double  min,
const double  max 
)
constexpr

Cuts out a range from the number.

The new range of the input number will be (-inf, min]U[max, +inf). If value sits equally between min and max, max will be returned.

Parameters
valueThe number to bound.
minThe lower bound of range.
maxThe upper bound of range.
Returns
The remapped value.

Definition at line 139 of file mathUtil.hpp.

◆ deadband()

constexpr double okapi::deadband ( const double  value,
const double  min,
const double  max 
)
constexpr

Deadbands a range of the number.

Returns the input value, or 0 if it is in the range [min, max].

Parameters
valueThe number to deadband.
minThe lower bound of deadband.
maxThe upper bound of deadband.
Returns
The input value or 0 if it is in the range [min, max].

Definition at line 160 of file mathUtil.hpp.

◆ floor()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::floor ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 315 of file RQuantity.hpp.

◆ gearsetToTPR()

constexpr std::int32_t okapi::gearsetToTPR ( const AbstractMotor::gearset  igearset)
constexprnoexcept

Converts a gearset to its TPR.

Parameters
igearsetThe gearset.
Returns
The corresponding TPR.

Definition at line 220 of file mathUtil.hpp.

◆ getShortUnitName()

template<class QType >
std::string okapi::getShortUnitName ( QType  q)

Returns a short name for a unit.

For example: str(1_ft) will return "ft", so will 1 * foot or 0.3048_m. Throws std::domain_error when q is a unit not defined in this function.

Parameters
qYour unit. Currently only QLength and QAngle are supported.
Returns
The short string suffix for that unit.

Definition at line 20 of file RQuantityName.hpp.

◆ hypot()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::hypot ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 284 of file RQuantity.hpp.

◆ Hz()

constexpr QFrequency okapi::Hz ( 1.  0)
constexpr

◆ ipow()

constexpr double okapi::ipow ( const double  base,
const int  expo 
)
constexpr

Integer power function.

Computes base^expo.

Parameters
baseThe base.
expoThe exponent.
Returns
base^expo.

Definition at line 122 of file mathUtil.hpp.

◆ kg()

constexpr QMass okapi::kg ( 1.  0)
constexpr

◆ meter()

constexpr QLength okapi::meter ( 1.  0)
constexpr

◆ mod()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::mod ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 290 of file RQuantity.hpp.

◆ modulus()

constexpr long okapi::modulus ( const long  lhs,
const long  rhs 
)
constexprnoexcept

Computes lhs mod rhs using Euclidean division.

C's % symbol computes the remainder, not modulus.

Parameters
lhsThe left-hand side.
rhsThe right-hand side.
Returns
lhs mod rhs.

Definition at line 210 of file mathUtil.hpp.

◆ number()

constexpr Number okapi::number ( 1.  0)
constexpr

◆ operator!=()

template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator!= ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 171 of file RQuantity.hpp.

◆ operator*() [1/4]

AbstractMotor::GearsetRatioPair okapi::operator* ( AbstractMotor::gearset  gearset,
double  ratio 
)

◆ operator*() [2/4]

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::operator* ( const double &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 123 of file RQuantity.hpp.

◆ operator*() [3/4]

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::operator* ( const RQuantity< M, L, T, A > &  lhs,
const double &  rhs 
)
constexpr

Definition at line 127 of file RQuantity.hpp.

◆ operator*() [4/4]

template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< std::ratio_add< M1, M2 >, std::ratio_add< L1, L2 >, std::ratio_add< T1, T2 >, std::ratio_add< A1, A2 > > okapi::operator* ( const RQuantity< M1, L1, T1, A1 > &  lhs,
const RQuantity< M2, L2, T2, A2 > &  rhs 
)
constexpr

Definition at line 116 of file RQuantity.hpp.

◆ operator+()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::operator+ ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 95 of file RQuantity.hpp.

◆ operator-()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::operator- ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 100 of file RQuantity.hpp.

◆ operator/() [1/3]

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_subtract< std::ratio< 0 >, M >, std::ratio_subtract< std::ratio< 0 >, L >, std::ratio_subtract< std::ratio< 0 >, T >, std::ratio_subtract< std::ratio< 0 >, A > > okapi::operator/ ( const double &  x,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 153 of file RQuantity.hpp.

◆ operator/() [2/3]

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::operator/ ( const RQuantity< M, L, T, A > &  rhs,
const double &  x 
)
constexpr

Definition at line 160 of file RQuantity.hpp.

◆ operator/() [3/3]

template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< std::ratio_subtract< M1, M2 >, std::ratio_subtract< L1, L2 >, std::ratio_subtract< T1, T2 >, std::ratio_subtract< A1, A2 > > okapi::operator/ ( const RQuantity< M1, L1, T1, A1 > &  lhs,
const RQuantity< M2, L2, T2, A2 > &  rhs 
)
constexpr

Definition at line 142 of file RQuantity.hpp.

◆ operator<()

template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator< ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 183 of file RQuantity.hpp.

◆ operator<=()

template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator<= ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 175 of file RQuantity.hpp.

◆ operator==()

template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator== ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 167 of file RQuantity.hpp.

◆ operator>()

template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator> ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 187 of file RQuantity.hpp.

◆ operator>=()

template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator>= ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 179 of file RQuantity.hpp.

◆ pascal()

constexpr QPressure okapi::pascal ( 1.  0)
constexpr

◆ pow() [1/2]

template<typename R , typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, R >, std::ratio_multiply< L, R >, std::ratio_multiply< T, R >, std::ratio_multiply< A, R > > okapi::pow ( const RQuantity< M, L, T, A > &  lhs)
constexpr

Definition at line 204 of file RQuantity.hpp.

◆ pow() [2/2]

template<int R, typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< R > >, std::ratio_multiply< L, std::ratio< R > >, std::ratio_multiply< T, std::ratio< R > >, std::ratio_multiply< A, std::ratio< R > > > okapi::pow ( const RQuantity< M, L, T, A > &  lhs)
constexpr

Definition at line 216 of file RQuantity.hpp.

◆ radian()

constexpr QAngle okapi::radian ( 1.  0)
constexpr

◆ remapRange()

constexpr double okapi::remapRange ( const double  value,
const double  oldMin,
const double  oldMax,
const double  newMin,
const double  newMax 
)
constexpr

Remap a value in the range [oldMin, oldMax] to the range [newMin, newMax].

Parameters
valueThe value in the old range.
oldMinThe old range lower bound.
oldMaxThe old range upper bound.
newMinThe new range lower bound.
newMaxThe new range upper bound.
Returns
The input value in the new range [newMin, newMax].

Definition at line 174 of file mathUtil.hpp.

◆ root()

template<int R, typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< R > >, std::ratio_divide< L, std::ratio< R > >, std::ratio_divide< T, std::ratio< R > >, std::ratio_divide< A, std::ratio< R > > > okapi::root ( const RQuantity< M, L, T, A > &  lhs)
constexpr

Definition at line 228 of file RQuantity.hpp.

◆ round()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::round ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 327 of file RQuantity.hpp.

◆ second()

constexpr QTime okapi::second ( 1.  0)
constexpr

◆ sin()

constexpr Number okapi::sin ( const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &  rhs)
constexpr

Definition at line 336 of file RQuantity.hpp.

◆ sinh()

constexpr Number okapi::sinh ( const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &  rhs)
constexpr

Definition at line 369 of file RQuantity.hpp.

◆ sqrt()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< 2 > >, std::ratio_divide< L, std::ratio< 2 > >, std::ratio_divide< T, std::ratio< 2 > >, std::ratio_divide< A, std::ratio< 2 > > > okapi::sqrt ( const RQuantity< M, L, T, A > &  rhs)
constexpr

Definition at line 240 of file RQuantity.hpp.

◆ square()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< 2 > >, std::ratio_multiply< L, std::ratio< 2 > >, std::ratio_multiply< T, std::ratio< 2 > >, std::ratio_multiply< A, std::ratio< 2 > > > okapi::square ( const RQuantity< M, L, T, A > &  rhs)
constexpr

Definition at line 264 of file RQuantity.hpp.

◆ tan()

constexpr Number okapi::tan ( const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &  rhs)
constexpr

Definition at line 346 of file RQuantity.hpp.

◆ tanh()

constexpr Number okapi::tanh ( const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &  rhs)
constexpr

Definition at line 379 of file RQuantity.hpp.

◆ toUnderlyingType()

template<typename E >
constexpr auto okapi::toUnderlyingType ( const E  e)
constexprnoexcept

Converts an enum to its value type.

Parameters
eThe enum value.
Returns
The corresponding value.

Definition at line 188 of file mathUtil.hpp.

◆ transformADIPort()

constexpr std::int8_t okapi::transformADIPort ( const std::int8_t  port)
constexpr

Maps ADI port numbers/chars to numbers:

when (port) {
in ['a', 'h'] -> [1, 8]
in ['A', 'H'] -> [1, 8]
else -> [1, 8]
}
Parameters
portThe ADI port number or char.
Returns
An equivalent ADI port number.

Definition at line 246 of file mathUtil.hpp.

◆ trunc()

template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, A > okapi::trunc ( const RQuantity< M, L, T, A > &  lhs,
const RQuantity< M, L, T, A > &  rhs 
)
constexpr

Definition at line 321 of file RQuantity.hpp.

Variable Documentation

◆ adiUpdateRate

constexpr std::int8_t okapi::adiUpdateRate = 10
staticconstexpr

The polling frequency of the ADI ports in milliseconds.

Definition at line 113 of file mathUtil.hpp.

◆ bar

constexpr QPressure okapi::bar = 100000 * pascal
constexpr

Definition at line 21 of file QPressure.hpp.

◆ centimeter

constexpr QLength okapi::centimeter = meter / 100
constexpr

Definition at line 19 of file QLength.hpp.

◆ centimeter2

constexpr QArea okapi::centimeter2 = centimeter * centimeter
constexpr

Definition at line 21 of file QArea.hpp.

◆ centimeter3

constexpr QVolume okapi::centimeter3 = centimeter2 * centimeter
constexpr

Definition at line 22 of file QVolume.hpp.

◆ cps

constexpr QAngularSpeed okapi::cps = (0.01 * degree) / second
constexpr

Definition at line 22 of file QAngularSpeed.hpp.

◆ day

constexpr QTime okapi::day = 24 * hour
constexpr

Definition at line 21 of file QTime.hpp.

◆ decimeter

constexpr QLength okapi::decimeter = meter / 10
constexpr

Definition at line 18 of file QLength.hpp.

◆ decimeter2

constexpr QArea okapi::decimeter2 = decimeter * decimeter
constexpr

Definition at line 20 of file QArea.hpp.

◆ decimeter3

constexpr QVolume okapi::decimeter3 = decimeter2 * decimeter
constexpr

Definition at line 21 of file QVolume.hpp.

◆ defaultLogger

std::shared_ptr<Logger> okapi::defaultLogger
extern

◆ defaultLoggerInitializer

DefaultLoggerInitializer okapi::defaultLoggerInitializer
static

Definition at line 191 of file logging.hpp.

◆ degree

constexpr QAngle okapi::degree = static_cast<double>(2_pi / 360.0) * radian
constexpr

Definition at line 19 of file QAngle.hpp.

◆ degreeToRadian

constexpr double okapi::degreeToRadian = 0.01745329252
staticconstexpr

Converts degrees to radians.

Definition at line 28 of file mathUtil.hpp.

◆ foot

constexpr QLength okapi::foot = 12 * inch
constexpr

Definition at line 23 of file QLength.hpp.

◆ foot2

constexpr QArea okapi::foot2 = foot * foot
constexpr

Definition at line 24 of file QArea.hpp.

◆ foot3

constexpr QVolume okapi::foot3 = foot2 * foot
constexpr

Definition at line 25 of file QVolume.hpp.

◆ footPound

constexpr QTorque okapi::footPound = 1.355817948 * newtonMeter
constexpr

Definition at line 20 of file QTorque.hpp.

◆ G

constexpr QAcceleration okapi::G = 9.80665 * mps2
constexpr

Definition at line 20 of file QAcceleration.hpp.

◆ gramme

constexpr QMass okapi::gramme = 0.001 * kg
constexpr

Definition at line 18 of file QMass.hpp.

◆ gravity

constexpr double okapi::gravity = 9.80665
staticconstexpr

The conventional value of gravity of Earth.

Definition at line 88 of file mathUtil.hpp.

◆ hour

constexpr QTime okapi::hour = 60 * minute
constexpr

Definition at line 20 of file QTime.hpp.

◆ ime269TPR

constexpr double okapi::ime269TPR = 240.448
staticconstexpr

The ticks per rotation of the 269 IME.

Definition at line 53 of file mathUtil.hpp.

◆ imeSpeedTPR

constexpr std::int32_t okapi::imeSpeedTPR = 392
staticconstexpr

The ticks per rotation of the 393 IME with speed gearing.

Definition at line 43 of file mathUtil.hpp.

◆ imeTorqueTPR

constexpr double okapi::imeTorqueTPR = 627.2
staticconstexpr

The ticks per rotation of the 393 IME with torque gearing.

Definition at line 38 of file mathUtil.hpp.

◆ imeTurboTPR

constexpr double okapi::imeTurboTPR = 261.333
staticconstexpr

The ticks per rotation of the 393 IME with turbo gearing.

Definition at line 48 of file mathUtil.hpp.

◆ imev5BlueTPR

constexpr std::int32_t okapi::imev5BlueTPR = 300
staticconstexpr

The ticks per rotation of the V5 motor with a blue gearset.

Definition at line 68 of file mathUtil.hpp.

◆ imev5GreenTPR

constexpr std::int32_t okapi::imev5GreenTPR = 900
staticconstexpr

The ticks per rotation of the V5 motor with a green gearset.

Definition at line 63 of file mathUtil.hpp.

◆ imev5RedTPR

constexpr std::int32_t okapi::imev5RedTPR = 1800
staticconstexpr

The ticks per rotation of the V5 motor with a red gearset.

Definition at line 58 of file mathUtil.hpp.

◆ inch

constexpr QLength okapi::inch = 2.54 * centimeter
constexpr

Definition at line 22 of file QLength.hpp.

◆ inch2

constexpr QArea okapi::inch2 = inch * inch
constexpr

Definition at line 23 of file QArea.hpp.

◆ inch3

constexpr QVolume okapi::inch3 = inch2 * inch
constexpr

Definition at line 24 of file QVolume.hpp.

◆ inchPound

constexpr QTorque okapi::inchPound = 0.083333333 * footPound
constexpr

Definition at line 21 of file QTorque.hpp.

◆ inchToMM

constexpr double okapi::inchToMM = 25.4
staticconstexpr

Converts inches to millimeters.

Definition at line 18 of file mathUtil.hpp.

◆ kilometer

constexpr QLength okapi::kilometer = 1000 * meter
constexpr

Definition at line 21 of file QLength.hpp.

◆ kilometer2

constexpr QArea okapi::kilometer2 = kilometer * kilometer
constexpr

Definition at line 18 of file QArea.hpp.

◆ kilometer3

constexpr QVolume okapi::kilometer3 = kilometer2 * kilometer
constexpr

Definition at line 19 of file QVolume.hpp.

◆ kilopond

constexpr QForce okapi::kilopond = kg * G
constexpr

Definition at line 21 of file QForce.hpp.

◆ kmph

constexpr QSpeed okapi::kmph = kilometer / hour
constexpr

Definition at line 21 of file QSpeed.hpp.

◆ litre

constexpr QVolume okapi::litre = decimeter3
constexpr

Definition at line 27 of file QVolume.hpp.

◆ meter2

constexpr QArea okapi::meter2 = meter * meter
constexpr

Definition at line 19 of file QArea.hpp.

◆ meter3

constexpr QVolume okapi::meter3 = meter2 * meter
constexpr

Definition at line 20 of file QVolume.hpp.

◆ mile

constexpr QLength okapi::mile = 5280 * foot
constexpr

Definition at line 25 of file QLength.hpp.

◆ mile2

constexpr QArea okapi::mile2 = mile * mile
constexpr

Definition at line 25 of file QArea.hpp.

◆ mile3

constexpr QVolume okapi::mile3 = mile2 * mile
constexpr

Definition at line 26 of file QVolume.hpp.

◆ millimeter

constexpr QLength okapi::millimeter = meter / 1000
constexpr

Definition at line 20 of file QLength.hpp.

◆ millimeter2

constexpr QArea okapi::millimeter2 = millimeter * millimeter
constexpr

Definition at line 22 of file QArea.hpp.

◆ millimeter3

constexpr QVolume okapi::millimeter3 = millimeter2 * millimeter
constexpr

Definition at line 23 of file QVolume.hpp.

◆ millisecond

constexpr QTime okapi::millisecond = second / 1000
constexpr

Definition at line 18 of file QTime.hpp.

◆ minute

constexpr QTime okapi::minute = 60 * second
constexpr

Definition at line 19 of file QTime.hpp.

◆ miph

constexpr QSpeed okapi::miph = mile / hour
constexpr

Definition at line 20 of file QSpeed.hpp.

◆ mmToInch

constexpr double okapi::mmToInch = 0.0393700787
staticconstexpr

Converts millimeters to inches.

Definition at line 23 of file mathUtil.hpp.

◆ motorUpdateRate

constexpr std::int8_t okapi::motorUpdateRate = 10
staticconstexpr

The polling frequency of V5 motors in milliseconds.

Definition at line 108 of file mathUtil.hpp.

◆ mps

constexpr QSpeed okapi::mps = meter / second
constexpr

Definition at line 19 of file QSpeed.hpp.

◆ mps2

constexpr QAcceleration okapi::mps2 = meter / (second * second)
constexpr

Definition at line 19 of file QAcceleration.hpp.

◆ newton

constexpr QForce okapi::newton = (kg * meter) / (second * second)
constexpr

Definition at line 19 of file QForce.hpp.

◆ newtonMeter

constexpr QTorque okapi::newtonMeter = newton * meter
constexpr

Definition at line 19 of file QTorque.hpp.

◆ OKAPI_PROS_ERR

constexpr auto okapi::OKAPI_PROS_ERR = INT32_MAX
staticconstexpr

Same as PROS_ERR.

Definition at line 93 of file mathUtil.hpp.

◆ OKAPI_PROS_ERR_F

constexpr auto okapi::OKAPI_PROS_ERR_F = INFINITY
staticconstexpr

Same as PROS_ERR_F.

Definition at line 98 of file mathUtil.hpp.

◆ ounce

constexpr QMass okapi::ounce = 0.028349523125 * kg
constexpr

Definition at line 20 of file QMass.hpp.

◆ pi

constexpr double okapi::pi = 3.1415926535897932
staticconstexpr

The value of pi.

Definition at line 78 of file mathUtil.hpp.

◆ pi2

constexpr double okapi::pi2 = 1.5707963267948966
staticconstexpr

The value of pi divided by 2.

Definition at line 83 of file mathUtil.hpp.

◆ pound

constexpr QMass okapi::pound = 16 * ounce
constexpr

Definition at line 21 of file QMass.hpp.

◆ poundforce

constexpr QForce okapi::poundforce = pound * G
constexpr

Definition at line 20 of file QForce.hpp.

◆ psi

constexpr QPressure okapi::psi = pound * G / inch2
constexpr

Definition at line 22 of file QPressure.hpp.

◆ quadEncoderTPR

constexpr std::int32_t okapi::quadEncoderTPR = 360
staticconstexpr

The ticks per rotation of the red quadrature encoders.

Definition at line 73 of file mathUtil.hpp.

◆ radianToDegree

constexpr double okapi::radianToDegree = 57.2957795
staticconstexpr

Converts radians to degrees.

Definition at line 33 of file mathUtil.hpp.

◆ radps

constexpr QAngularSpeed okapi::radps = radian / second
constexpr

Definition at line 20 of file QAngularSpeed.hpp.

◆ rpm

constexpr QAngularSpeed okapi::rpm = (360 * degree) / minute
constexpr

Definition at line 21 of file QAngularSpeed.hpp.

◆ stone

constexpr QMass okapi::stone = 14 * pound
constexpr

Definition at line 22 of file QMass.hpp.

◆ tile

constexpr QLength okapi::tile = 24 * inch
constexpr

Definition at line 26 of file QLength.hpp.

◆ tonne

constexpr QMass okapi::tonne = 1000 * kg
constexpr

Definition at line 19 of file QMass.hpp.

◆ v5MotorMaxVoltage

constexpr double okapi::v5MotorMaxVoltage = 12000
staticconstexpr

The maximum voltage that can be sent to V5 motors.

Definition at line 103 of file mathUtil.hpp.

◆ yard

constexpr QLength okapi::yard = 3 * foot
constexpr

Definition at line 24 of file QLength.hpp.