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

#include <velMathFactory.hpp>

Static Public Member Functions

static VelMath create (double iticksPerRev, QTime isampleTime=0_ms, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
 Velocity math helper.
 
static std::unique_ptr< VelMathcreatePtr (double iticksPerRev, QTime isampleTime=0_ms, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
 Velocity math helper.
 
static VelMath create (double iticksPerRev, std::unique_ptr< Filter > ifilter, QTime isampleTime=0_ms, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
 Velocity math helper.
 
static std::unique_ptr< VelMathcreatePtr (double iticksPerRev, std::unique_ptr< Filter > ifilter, QTime isampleTime=0_ms, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
 Velocity math helper.
 

Detailed Description

Definition at line 12 of file velMathFactory.hpp.

Member Function Documentation

◆ create() [1/2]

static VelMath okapi::VelMathFactory::create ( double  iticksPerRev,
QTime  isampleTime = 0_ms,
const std::shared_ptr< Logger > &  ilogger = Logger::getDefaultLogger() 
)
static

Velocity math helper.

Calculates filtered velocity. Throws a std::invalid_argument exception if iticksPerRev is zero. Averages the last two readings.

Parameters
iticksPerRevThe number of ticks per revolution.
isampleTimeThe minimum time between samples.
iloggerThe logger this instance will log to.

◆ create() [2/2]

static VelMath okapi::VelMathFactory::create ( double  iticksPerRev,
std::unique_ptr< Filter ifilter,
QTime  isampleTime = 0_ms,
const std::shared_ptr< Logger > &  ilogger = Logger::getDefaultLogger() 
)
static

Velocity math helper.

Calculates filtered velocity. Throws a std::invalid_argument exception if iticksPerRev is zero.

Parameters
iticksPerRevThe number of ticks per revolution.
ifilterThe filter used for filtering the calculated velocity.
isampleTimeThe minimum time between samples.
iloggerThe logger this instance will log to.

◆ createPtr() [1/2]

static std::unique_ptr< VelMath > okapi::VelMathFactory::createPtr ( double  iticksPerRev,
QTime  isampleTime = 0_ms,
const std::shared_ptr< Logger > &  ilogger = Logger::getDefaultLogger() 
)
static

Velocity math helper.

Calculates filtered velocity. Throws a std::invalid_argument exception if iticksPerRev is zero. Averages the last two readings.

Parameters
iticksPerRevThe number of ticks per revolution.
isampleTimeThe minimum time between samples.
iloggerThe logger this instance will log to.

◆ createPtr() [2/2]

static std::unique_ptr< VelMath > okapi::VelMathFactory::createPtr ( double  iticksPerRev,
std::unique_ptr< Filter ifilter,
QTime  isampleTime = 0_ms,
const std::shared_ptr< Logger > &  ilogger = Logger::getDefaultLogger() 
)
static

Velocity math helper.

Calculates filtered velocity. Throws a std::invalid_argument exception if iticksPerRev is zero.

Parameters
iticksPerRevThe number of ticks per revolution.
ifilterThe filter used for filtering the calculated velocity.
isampleTimeThe minimum time between samples.
iloggerThe logger this instance will log to.

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