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

#include <odomMath.hpp>

Static Public Member Functions

static QLength computeDistanceToPoint (const Point &ipoint, const OdomState &istate)
 Computes the distance from the given Odometry state to the given point.
 
static QAngle computeAngleToPoint (const Point &ipoint, const OdomState &istate)
 Computes the angle from the given Odometry state to the given point.
 
static std::pair< QLength, QAngle > computeDistanceAndAngleToPoint (const Point &ipoint, const OdomState &istate)
 Computes the distance and angle from the given Odometry state to the given point.
 
static QAngle constrainAngle360 (const QAngle &angle)
 Constraints the angle to [0,360] degrees.
 
static QAngle constrainAngle180 (const QAngle &angle)
 Constraints the angle to [-180,180) degrees.
 

Detailed Description

Definition at line 14 of file odomMath.hpp.

Member Function Documentation

◆ computeAngleToPoint()

static QAngle okapi::OdomMath::computeAngleToPoint ( const Point ipoint,
const OdomState istate 
)
static

Computes the angle from the given Odometry state to the given point.

The point and the OdomState must be in StateMode::FRAME_TRANSFORMATION.

Parameters
ipointThe point.
istateThe Odometry state.
Returns
The angle between the Odometry state and the point.

◆ computeDistanceAndAngleToPoint()

static std::pair< QLength, QAngle > okapi::OdomMath::computeDistanceAndAngleToPoint ( const Point ipoint,
const OdomState istate 
)
static

Computes the distance and angle from the given Odometry state to the given point.

The point and the OdomState must be in StateMode::FRAME_TRANSFORMATION.

Parameters
ipointThe point.
istateThe Odometry state.
Returns
The distance and angle between the Odometry state and the point.

◆ computeDistanceToPoint()

static QLength okapi::OdomMath::computeDistanceToPoint ( const Point ipoint,
const OdomState istate 
)
static

Computes the distance from the given Odometry state to the given point.

The point and the OdomState must be in StateMode::FRAME_TRANSFORMATION.

Parameters
ipointThe point.
istateThe Odometry state.
Returns
The distance between the Odometry state and the point.

◆ constrainAngle180()

static QAngle okapi::OdomMath::constrainAngle180 ( const QAngle &  angle)
static

Constraints the angle to [-180,180) degrees.

Parameters
angleThe input angle.
Returns
The angle normalized to [-180,180) degrees.

◆ constrainAngle360()

static QAngle okapi::OdomMath::constrainAngle360 ( const QAngle &  angle)
static

Constraints the angle to [0,360] degrees.

Parameters
angleThe input angle.
Returns
The angle normalized to [0,360] degrees.

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