LARS
LARS (Light Augmented Reality System) is an open-source framework for light-based interaction and real-time tracking in multi-robot experiments. Inspired by ARK, LARS extends the augmented reality paradigm to robotic collectives by projecting dynamic visual cues and environments onto the arena, enabling new experimental possibilities for collective robotics research, education, and outreach. LARS features integrated tracking, light projection, and modular experiment control with a user-friendly Qt GUI.
Loading...
Searching...
No Matches
rcsc::AngleDeg Class Reference

degree wrapper class More...

#include <angle_deg.h>

Classes

class  DegreeCmp
 predicate function object. this compares two angles by degree value More...

Public Member Functions

 AngleDeg ()
 default constructor.
 AngleDeg (const double &deg)
 constructor with value.
const AngleDegoperator= (const double &deg)
 operator substitution.
const double & degree () const
 get value of this angle
double abs () const
 get absolute value of this angle
double radian () const
 get RADIAN value.
AngleDeg operator- () const
 get new AngleDeg multiplyed by -1.
const AngleDegoperator+= (const AngleDeg &angle)
 operator += with AngleDeg
const AngleDegoperator+= (const double &deg)
 operator += with double
const AngleDegoperator-= (const AngleDeg &angle)
 operator -= with AngleDeg
const AngleDegoperator-= (const double &deg)
 operator -= with double
const AngleDegoperator*= (const double &scalar)
 operator *=
const AngleDegoperator/= (const double &scalar)
 operator /=
bool isLeftOf (const AngleDeg &angle) const
 check if this angle is left of 'angle'
bool isLeftEqualOf (const AngleDeg &angle) const
 check if this angle is left or equal of 'angle'
bool isRightOf (const AngleDeg &angle) const
 check if this angle is right of 'angle'
bool isRightEqualOf (const AngleDeg &angle) const
 check if this angle is right or equal of 'angle'
double cos () const
 calculate cosine
double sin () const
 calculate sine
double tan () const
 calculate tarngetn
bool isWithin (const AngleDeg &left, const AngleDeg &right) const
 check if this angle is within [left, right] (turn clockwise).
void sinMinMax (const double &angle_err, double *minsin, double *maxsin) const
 calculate min/max sine value with angle error.
void cosMinMax (const double &angle_err, double *mincos, double *maxcos) const
 calculate min/max cosine value of angle with angle error.
std::ostream & print (std::ostream &os) const
 output value to ostream
std::ostream & printRound (std::ostream &os, const double &step=0.1) const
 output rounded value to ostream

Static Public Member Functions

static double normalize_angle (double dir)
 static utility. normalize angle
static double rad2deg (const double &rad)
 static utility. convert radian to degree
static double deg2rad (const double &deg)
 static utility. convert degree to radian
static double cos_deg (const double &deg)
 static utility. calculate cosine value for degree angle
static double sin_deg (const double &deg)
 static utility. calculate sine value for degree angle
static double tan_deg (const double &deg)
 static utility. calculate tangent value for degree angle
static double acos_deg (const double &cosine)
 static utility. calculate arc cosine value
static double asin_deg (const double &sine)
 static utility. calculate arc sine value
static double atan_deg (const double &tangent)
 static utility. calculate arc tangent value
static double atan2_deg (const double &y, const double &x)
 static utility. calculate arc tangent value from XY
static AngleDeg bisect (const AngleDeg &left, const AngleDeg &right)
 static utility that returns bisect angle of [left, right].

Static Public Attributes

static const double EPSILON = 1.0e-5
 epsilon value
static const double PI = M_PI
 pi valur
static const double TWO_PI = M_PI * 2.0
 2*pi valur
static const double DEG2RAD = M_PI / 180.0
 constant variable to convert DEGREE to RADIAN.
static const double RAD2DEG = 180.0 / M_PI
 constant variable to convert RADIAN to DEGREE.

Detailed Description

degree wrapper class

Constructor & Destructor Documentation

◆ AngleDeg()

rcsc::AngleDeg::AngleDeg ( const double & deg)
inline

constructor with value.

NO explicit. This means that we can use this class as follows. AngleDeg angle = 3.0;

Member Function Documentation

◆ abs()

double rcsc::AngleDeg::abs ( ) const
inline

get absolute value of this angle

Returns
absolute value of degree()

◆ acos_deg()

double rcsc::AngleDeg::acos_deg ( const double & cosine)
inlinestatic

static utility. calculate arc cosine value

Parameters
cosinecosine value
Returns
arc cosine value, that is degree type.

◆ asin_deg()

double rcsc::AngleDeg::asin_deg ( const double & sine)
inlinestatic

static utility. calculate arc sine value

Parameters
sinesine value
Returns
arc sine value, that is degree type.

◆ atan2_deg()

double rcsc::AngleDeg::atan2_deg ( const double & y,
const double & x )
inlinestatic

static utility. calculate arc tangent value from XY

Parameters
ycoordinate Y
xcoordinate X
Returns
arc tangent value, that is degree type.

◆ atan_deg()

double rcsc::AngleDeg::atan_deg ( const double & tangent)
inlinestatic

static utility. calculate arc tangent value

Parameters
tangenttangent value
Returns
arc tangent value, that is degree.

◆ bisect()

AngleDeg rcsc::AngleDeg::bisect ( const AngleDeg & left,
const AngleDeg & right )
static

static utility that returns bisect angle of [left, right].

Parameters
leftleft start angle
rightright end angle
Returns
bisect angle

this methid can take obtuse angle.

◆ cos()

double rcsc::AngleDeg::cos ( ) const
inline

calculate cosine

Returns
cosine value

◆ cos_deg()

double rcsc::AngleDeg::cos_deg ( const double & deg)
inlinestatic

static utility. calculate cosine value for degree angle

Parameters
degdegree value
Returns
cosine value

◆ cosMinMax()

void rcsc::AngleDeg::cosMinMax ( const double & angle_err,
double * mincos,
double * maxcos ) const

calculate min/max cosine value of angle with angle error.

Parameters
angle_errerror value of angle
mincospointer to the solution variable to store the min value
maxcospointer to the solution variable to store the max value

◆ deg2rad()

double rcsc::AngleDeg::deg2rad ( const double & deg)
inlinestatic

static utility. convert degree to radian

Parameters
degdegree value
Returns
radian value

◆ degree()

const double & rcsc::AngleDeg::degree ( ) const
inline

get value of this angle

Returns
const reference to the member variable

◆ isLeftEqualOf()

bool rcsc::AngleDeg::isLeftEqualOf ( const AngleDeg & angle) const
inline

check if this angle is left or equal of 'angle'

Returns
true or false

◆ isLeftOf()

bool rcsc::AngleDeg::isLeftOf ( const AngleDeg & angle) const
inline

check if this angle is left of 'angle'

Returns
true or false

◆ isRightEqualOf()

bool rcsc::AngleDeg::isRightEqualOf ( const AngleDeg & angle) const
inline

check if this angle is right or equal of 'angle'

Returns
true or false

◆ isRightOf()

bool rcsc::AngleDeg::isRightOf ( const AngleDeg & angle) const
inline

check if this angle is right of 'angle'

Returns
true or false

◆ isWithin()

bool rcsc::AngleDeg::isWithin ( const AngleDeg & left,
const AngleDeg & right ) const

check if this angle is within [left, right] (turn clockwise).

Parameters
leftleft angle
rightright angle
Returns
true if this is within [left, right]. else false

◆ normalize_angle()

double rcsc::AngleDeg::normalize_angle ( double dir)
inlinestatic

static utility. normalize angle

Parameters
dirangle value to be normalized
Returns
normalized angle value

◆ operator*=()

const AngleDeg & rcsc::AngleDeg::operator*= ( const double & scalar)
inline

operator *=

Parameters
scalarmultiply argument
Returns
const reference to this

◆ operator+=() [1/2]

const AngleDeg & rcsc::AngleDeg::operator+= ( const AngleDeg & angle)
inline

operator += with AngleDeg

Parameters
angleadded value
Returns
const reference to this

◆ operator+=() [2/2]

const AngleDeg & rcsc::AngleDeg::operator+= ( const double & deg)
inline

operator += with double

Parameters
degadded value
Returns
const reference to this

◆ operator-()

AngleDeg rcsc::AngleDeg::operator- ( ) const
inline

get new AngleDeg multiplyed by -1.

Returns
new AngleDeg object

◆ operator-=() [1/2]

const AngleDeg & rcsc::AngleDeg::operator-= ( const AngleDeg & angle)
inline

operator -= with AngleDeg

Parameters
anglesubtract argument
Returns
const reference to this

◆ operator-=() [2/2]

const AngleDeg & rcsc::AngleDeg::operator-= ( const double & deg)
inline

operator -= with double

Parameters
degsubtract argument
Returns
const reference to this

◆ operator/=()

const AngleDeg & rcsc::AngleDeg::operator/= ( const double & scalar)
inline

operator /=

Parameters
scalardivision argument
Returns
const reference to this

◆ operator=()

const AngleDeg & rcsc::AngleDeg::operator= ( const double & deg)
inline

operator substitution.

Parameters
deginitialization parameter
Returns
const reference to itself

◆ print()

std::ostream & rcsc::AngleDeg::print ( std::ostream & os) const
inline

output value to ostream

Parameters
osreference to the output stream
Returns
reference to the output stream

◆ printRound()

std::ostream & rcsc::AngleDeg::printRound ( std::ostream & os,
const double & step = 0.1 ) const
inline

output rounded value to ostream

Parameters
osreference to the output stream
stepround step
Returns
reference to the output stream

◆ rad2deg()

double rcsc::AngleDeg::rad2deg ( const double & rad)
inlinestatic

static utility. convert radian to degree

Parameters
radradian value
Returns
degree value

◆ radian()

double rcsc::AngleDeg::radian ( ) const
inline

get RADIAN value.

Returns
radian value of degree()

◆ sin()

double rcsc::AngleDeg::sin ( ) const
inline

calculate sine

Returns
sine value

◆ sin_deg()

double rcsc::AngleDeg::sin_deg ( const double & deg)
inlinestatic

static utility. calculate sine value for degree angle

Parameters
degdegree value
Returns
sine value

◆ sinMinMax()

void rcsc::AngleDeg::sinMinMax ( const double & angle_err,
double * minsin,
double * maxsin ) const

calculate min/max sine value with angle error.

Parameters
angle_errerror value of angle
minsinpointer to the solution variable to store the min value
maxsinpointer to the solution variable to store the max value

◆ tan()

double rcsc::AngleDeg::tan ( ) const
inline

calculate tarngetn

Returns
tangent value

◆ tan_deg()

double rcsc::AngleDeg::tan_deg ( const double & deg)
inlinestatic

static utility. calculate tangent value for degree angle

Parameters
degdegree value
Returns
tangent value

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