CARMA C++
|
The AngularRate class can represent an angular rate in any units. More...
#include <carma/services/AngularRate.h>
Public Member Functions | |
AngularRate (double value, const std::string &units) | |
Construct an AngularRate given a value and units. More... | |
const AngularRate | operator+ (const AngularRate &ar) const |
Add two Angular rates. More... | |
AngularRate & | operator+= (const AngularRate &ar) |
Increment AngularRate. More... | |
const AngularRate | operator- (const AngularRate &ar) const |
Subtract two Angular rates. More... | |
AngularRate & | operator-= (const AngularRate &ar) |
Decrement AngularRate. More... | |
virtual | ~AngularRate () |
Destructor. More... | |
![]() | |
ConformableQuantity (double value, const std::string &units) | |
Construct an ConformableQuantity given a value and units. More... | |
virtual double | convert (const std::string &convertTo) const |
Converts this quantity to any conformable units. More... | |
virtual std::string | getUnits () const |
double | getValue () const |
virtual const ConformableQuantity | operator+ (const ConformableQuantity &quantity) const |
Add two ConformableQuantities. More... | |
virtual ConformableQuantity & | operator+= (const ConformableQuantity &quantity) |
Add ConformableQuantity to itself. More... | |
virtual const ConformableQuantity | operator- (const ConformableQuantity &quantity) const |
Subtract two ConformableQuantities. More... | |
virtual ConformableQuantity & | operator-= (const ConformableQuantity &quantity) |
Subtract ConformableQuantity from itself. More... | |
virtual void | reset (double value, const std::string &units) |
Reset method to change value and/or units. More... | |
virtual | ~ConformableQuantity () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
Units | u_ |
Used for converting between units. More... | |
The AngularRate class can represent an angular rate in any units.
It uses the Units class internally to handle conversion of any angular rate unit to any other angular rate unit. For example,
AngularRate ar1(1.0,"degrees/s")
both
AngularRate ar2(1.0227,"radians/s")
ar1
and ar2
represent the (approximately!) the same physical quantity. Binary operations + and - are supported, as is the stream operation <<.
Definition at line 37 of file AngularRate.h.
carma::services::AngularRate::AngularRate | ( | double | value, |
const std::string & | units | ||
) |
Construct an AngularRate given a value and units.
value | The value of this angular rate |
units | The units of the value. |
|
virtual |
Destructor.
const AngularRate carma::services::AngularRate::operator+ | ( | const AngularRate & | ar | ) | const |
Add two Angular rates.
ConformabilityException |
AngularRate& carma::services::AngularRate::operator+= | ( | const AngularRate & | ar | ) |
Increment AngularRate.
const AngularRate carma::services::AngularRate::operator- | ( | const AngularRate & | ar | ) | const |
Subtract two Angular rates.
ConformabilityException |
AngularRate& carma::services::AngularRate::operator-= | ( | const AngularRate & | ar | ) |
Decrement AngularRate.