Aria
2.8.0
|
Interface to the PNI TCM 2, TCM 2.5, and TCM 2.6 3-axis compass (magnetometer) that can sense absolute heading, as well as pitch, roll, and includes a temperature sensor. More...
#include <ArTCM2.h>
Inherited by ArTCMCompassDirect [virtual]
, and ArTCMCompassRobot [virtual]
.
Public Member Functions | |
void | addHeadingDataCallback (ArFunctor1< double > *f) |
virtual bool | blockingConnect (unsigned long connectTimeout=5000) |
If a connection/initialization procedure is required, perform it, wait until data is recieved from the compass, and return true on success, false on failure. More... | |
virtual void | commandAutoCalibration (void)=0 |
Start auto calibration. | |
virtual void | commandContinuousPackets (void)=0 |
Start the compass sending a continuous stream of readings at its fastest rate. | |
virtual void | commandJustCompass (void)=0 |
Command to just send compass heading data. | |
virtual void | commandOff (void)=0 |
Turn sending of data off (Compass remains powered on, this is not its not low power standby mode) | |
virtual void | commandOnePacket (void)=0 |
Get one reading from the compass. | |
virtual void | commandSoftReset (void)=0 |
Command to do a soft reset of the compass. | |
virtual void | commandStopCalibration (void)=0 |
Stop calibration. | |
virtual void | commandUserCalibration (void)=0 |
Start user calibration. | |
virtual bool | connect () |
If a connection/initialization procedure is required, perform it, and return true on success, false on failure. More... | |
double | getCalibrationH (void) const |
Get the calibration H score (See TCM Manual) | |
double | getCalibrationM (void) const |
Get the calibration M score (See TCM Manual) | |
double | getCalibrationV (void) const |
Get the calibration V score (See TCM Manual) | |
double | getCompass (void) const |
Get the compass heading (-180, 180] degrees. More... | |
int | getError (void) const |
double | getHeading (void) const |
Get the compass heading (-180, 180] degrees. | |
int | getPacCount (void) |
Gets the number of readings recieved in the last second. | |
double | getPitch (void) const |
Get the pitch (-180,180] degrees. | |
double | getRoll (void) const |
Get the roll (-180,180] degrees. | |
double | getTemperature (void) const |
Get the temperature (degrees C) | |
double | getXMagnetic (void) const |
Get the magnetic field X component (See TCM2 Manual) | |
double | getYMagnetic (void) const |
Get the magnetic field Y component (See TCM2 Manual) | |
double | getZMagnetic (void) const |
Get the magnetic field Z component (See TCM2 Manual) | |
bool | haveCalibrationH () const |
bool | haveCalibrationM () const |
bool | haveCalibrationV () const |
bool | haveHeading () const |
bool | havePitch () const |
bool | haveRoll () const |
bool | haveTemperature () const |
bool | haveXMagnetic () const |
bool | haveYMagnetic () const |
bool | haveZMagnetic () const |
Protected Member Functions | |
void | incrementPacketCount () |
void | invokeHeadingDataCallbacks (double heading) |
Protected Attributes | |
double | myCalibrationH |
double | myCalibrationM |
double | myCalibrationV |
int | myError |
bool | myHaveCalibrationH |
bool | myHaveCalibrationM |
bool | myHaveCalibrationV |
bool | myHaveHeading |
bool | myHavePitch |
bool | myHaveRoll |
bool | myHaveTemperature |
bool | myHaveXMag |
bool | myHaveYMag |
bool | myHaveZMag |
double | myHeading |
std::list< ArFunctor1< double > *> | myHeadingDataCallbacks |
int | myPacCount |
int | myPacCurrentCount |
double | myPitch |
double | myRoll |
double | myTemperature |
time_t | myTimeLastPacket |
double | myXMag |
double | myYMag |
double | myZMag |
Interface to the PNI TCM 2, TCM 2.5, and TCM 2.6 3-axis compass (magnetometer) that can sense absolute heading, as well as pitch, roll, and includes a temperature sensor.
See subclasses and ArCompassConnector for more information, as well as your robot manuals. PNI's TCM manual is also available for download at the MobileRobots support website, documentation section.
This is an abstract interface. To create a compass interface object, instantiate a subclass or use ArCompassConnector.
|
virtual |
If a connection/initialization procedure is required, perform it, wait until data is recieved from the compass, and return true on success, false on failure.
Otherwise, just return true.
|
virtual |
If a connection/initialization procedure is required, perform it, and return true on success, false on failure.
Otherwise, just return true.
Reimplemented in ArTCMCompassDirect.
|
inline |
Get the compass heading (-180, 180] degrees.