LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
DriveEncoders Class Reference

Class containing left and right drivetrain encoders. More...

#include <DriveEncoders.h>

Inheritance diagram for DriveEncoders:
Collaboration diagram for DriveEncoders:

Public Member Functions

 ~DriveEncoders ()
 Destructor.
 
void Configure ()
 Configures constants.
 
void Log ()
 Logs values to the log file.
 
double GetRawForwardSpeed ()
 Get non-normalized average forward speed.
 
double GetNormalizedForwardSpeed ()
 Get normalized average forward speed.
 
double GetRawTurningSpeed ()
 Get non-normalized turning speed.
 
double GetNormalizedTurningSpeed ()
 Get normalized turning speed assuming high gear.
 
double GetRobotDist ()
 Get robot traveled distance in engineering units.
 
int GetTurnTicks ()
 Get number of ticks during turn.
 
double GetTurnRevolutions ()
 Get number of revolutions during turn. Counter-clockwise is positive, clockwise is negative.
 
double GetTurnAngle ()
 Get calibrated turning angle.
 
double GetWheelDist (Side side)
 Get the distance travelled by a wheel.
 
double GetNormalizedSpeed (Side side)
 Normalized speed of a side.
 
double GetTurnRadius ()
 Arc radius calculated from turn and forward speed, defined as distance between the center of rotation and the center of the robot.
 
LRTEncoderGetEncoder (Side side)
 Access the LRTEncoder.
 

Static Public Member Functions

static double GetMaxEncoderRate ()
 Gets the fastest attainable encoder rate.
 
static double GetMaxSpeed ()
 Gets the fastest attainable encoder rate.
 
static double GetMaxTurnRate ()
 Gets the fastest attainable turning rate.
 

Additional Inherited Members

- Protected Member Functions inherited from Loggable
template<typename T >
void LogToFile (T *field, std::string name)
 Saves a variable to the Logger for logging.
 
template<typename T >
void LogToFile (T *field, int count, std::string name)
 Saves a dynamically allocated array to the Logger for logging.
 
template<typename T >
void LogToFile (T value, std::string name)
 Saves a value to the Logger for logging.
 

Detailed Description

Class containing left and right drivetrain encoders.

Member Function Documentation

LRTEncoder * DriveEncoders::GetEncoder ( Side  side)

Access the LRTEncoder.

Returns
the LRTEncoder
double DriveEncoders::GetMaxEncoderRate ( )
static

Gets the fastest attainable encoder rate.

Returns
maxEncoderRate

Here is the caller graph for this function:

double DriveEncoders::GetMaxSpeed ( )
static

Gets the fastest attainable encoder rate.

Returns
fastest possible encoder pulse rate
double DriveEncoders::GetMaxTurnRate ( )
static

Gets the fastest attainable turning rate.

Returns
fastest possible turning rate
double DriveEncoders::GetNormalizedForwardSpeed ( )

Get normalized average forward speed.

Returns
normalized forward speed
double DriveEncoders::GetNormalizedSpeed ( Side  side)

Normalized speed of a side.

Parameters
sideLEFT or RIGHT
Returns
normalized speed of the side
double DriveEncoders::GetNormalizedTurningSpeed ( )

Get normalized turning speed assuming high gear.

Returns
turning speed
double DriveEncoders::GetRawForwardSpeed ( )

Get non-normalized average forward speed.

Returns
forward speed

Here is the caller graph for this function:

double DriveEncoders::GetRawTurningSpeed ( )

Get non-normalized turning speed.

Returns
turning speed

Here is the caller graph for this function:

double DriveEncoders::GetRobotDist ( )

Get robot traveled distance in engineering units.

Returns
distance in inches (if properly calibrated)

Here is the caller graph for this function:

double DriveEncoders::GetTurnAngle ( )

Get calibrated turning angle.

Returns
turn agnle

Here is the caller graph for this function:

double DriveEncoders::GetTurnRadius ( )

Arc radius calculated from turn and forward speed, defined as distance between the center of rotation and the center of the robot.

Returns
radius of turn
double DriveEncoders::GetTurnRevolutions ( )

Get number of revolutions during turn. Counter-clockwise is positive, clockwise is negative.

Returns
turn revolutions
int DriveEncoders::GetTurnTicks ( )

Get number of ticks during turn.

Returns
turn ticks
double DriveEncoders::GetWheelDist ( Side  side)

Get the distance travelled by a wheel.

Parameters
sideLEFT or RIGHT
Returns
the distance of the wheel

Here is the call graph for this function:


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