Public Types | Public Member Functions | Public Attributes | Private Attributes
Asterx1Driver Class Reference

IRI ROS Specific Driver Class. More...

#include <asterx1_driver.h>

Inheritance diagram for Asterx1Driver:
Inheritance graph
[legend]

List of all members.

Public Types

typedef iri_asterx1::Asterx1Config Config
 define config type

Public Member Functions

 Asterx1Driver ()
 constructor
bool closeDriver (void)
 close driver
void config_update (const Config &new_cfg, uint32_t level=0)
 config update
double getAlt ()
double getCxxEnu ()
double getCxxMap ()
double getCxxWgs ()
double getCxyEnu ()
double getCxyMap ()
double getCxyWgs ()
double getCxzEnu ()
double getCyyEnu ()
double getCyyMap ()
double getCyyWgs ()
double getCyzEnu ()
double getCzzEnu ()
double getCzzMap ()
double getCzzWgs ()
float getHDOP ()
double getLat (bool units=inRADS)
double getLon (bool units=inRADS)
unsigned int getNumSatellites ()
float getPDOP ()
unsigned short int getPVTerror ()
unsigned int getStatus ()
float getTDOP ()
double getTimeStamp ()
unsigned int getTow ()
float getUndulation ()
float getVDOP ()
double getVxMap ()
double getVxWgs ()
double getVyMap ()
double getVyWgs ()
double getVzMap ()
double getVzWgs ()
unsigned short int getWnc ()
double getXMap ()
double getXWgs ()
double getYMap ()
double getYWgs ()
double getZMap ()
double getZWgs ()
bool openDriver (void)
 open driver
void printTM ()
 Prints homogeneous transformation matrix.
int readDataFromDevice ()
 Reads data from device.
void setMapOrigin (double mapLat0, double mapLon0, double mapAlt0, double mapAlpha0)
 set map origin
bool startDriver (void)
 start driver
bool stopDriver (void)
 stop driver
 ~Asterx1Driver ()
 Destructor.

Public Attributes

Config config_
 config variable

Private Attributes

CasteRx1 * gpsDevice

Detailed Description

IRI ROS Specific Driver Class.

This class inherits from the IRI Base class IriBaseDriver, which provides the guidelines to implement any specific driver. The IriBaseDriver class offers an easy framework to integrate functional drivers implemented in C++ with the ROS driver structure. ROS driver_base state transitions are already managed by IriBaseDriver.

The Asterx1Driver class must implement all specific driver requirements to safetely open, close, run and stop the driver at any time. It also must guarantee an accessible interface for all driver's parameters.

The Asterx1Config.cfg needs to be filled up with those parameters suitable to be changed dynamically by the ROS dyanmic reconfigure application. The implementation of the CIriNode class will manage those parameters through methods like postNodeOpenHook() and reconfigureNodeHook().

Definition at line 53 of file asterx1_driver.h.


Member Typedef Documentation

typedef iri_asterx1::Asterx1Config Asterx1Driver::Config

define config type

Define a Config type with the Asterx1Config. All driver implementations will then use the same variable type Config.

Definition at line 66 of file asterx1_driver.h.


Constructor & Destructor Documentation

constructor

In this constructor parameters related to the specific driver can be initalized. Those parameters can be also set in the openDriver() function. Attributes from the main node driver class IriBaseDriver such as loop_rate, may be also overload here.

Definition at line 3 of file asterx1_driver.cpp.

Destructor.

This destructor is called when the object is about to be destroyed.

Definition at line 88 of file asterx1_driver.cpp.


Member Function Documentation

bool Asterx1Driver::closeDriver ( void  ) [virtual]

close driver

In this function, the driver must be closed. Variables related to the driver state must also be taken into account. This function is automatically called by IriBaseDriver::doClose(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 24 of file asterx1_driver.cpp.

void Asterx1Driver::config_update ( const Config new_cfg,
uint32_t  level = 0 
)

config update

In this function the driver parameters must be updated with the input config variable. Then the new configuration state will be stored in the Config attribute.

Parameters:
new_cfgthe new driver configuration state
levellevel in which the update is taken place

Definition at line 60 of file asterx1_driver.cpp.

Definition at line 121 of file asterx1_driver.cpp.

Definition at line 142 of file asterx1_driver.cpp.

Definition at line 138 of file asterx1_driver.cpp.

Definition at line 134 of file asterx1_driver.cpp.

Definition at line 145 of file asterx1_driver.cpp.

Definition at line 141 of file asterx1_driver.cpp.

Definition at line 137 of file asterx1_driver.cpp.

Definition at line 146 of file asterx1_driver.cpp.

Definition at line 143 of file asterx1_driver.cpp.

Definition at line 139 of file asterx1_driver.cpp.

Definition at line 135 of file asterx1_driver.cpp.

Definition at line 147 of file asterx1_driver.cpp.

Definition at line 144 of file asterx1_driver.cpp.

Definition at line 140 of file asterx1_driver.cpp.

Definition at line 136 of file asterx1_driver.cpp.

Definition at line 115 of file asterx1_driver.cpp.

double Asterx1Driver::getLat ( bool  units = inRADS)

Definition at line 119 of file asterx1_driver.cpp.

double Asterx1Driver::getLon ( bool  units = inRADS)

Definition at line 120 of file asterx1_driver.cpp.

Definition at line 112 of file asterx1_driver.cpp.

Definition at line 113 of file asterx1_driver.cpp.

unsigned short int Asterx1Driver::getPVTerror ( )

Definition at line 118 of file asterx1_driver.cpp.

unsigned int Asterx1Driver::getStatus ( void  )

Definition at line 108 of file asterx1_driver.cpp.

Definition at line 114 of file asterx1_driver.cpp.

Definition at line 109 of file asterx1_driver.cpp.

unsigned int Asterx1Driver::getTow ( )

Definition at line 111 of file asterx1_driver.cpp.

Definition at line 117 of file asterx1_driver.cpp.

Definition at line 116 of file asterx1_driver.cpp.

Definition at line 131 of file asterx1_driver.cpp.

Definition at line 128 of file asterx1_driver.cpp.

Definition at line 132 of file asterx1_driver.cpp.

Definition at line 129 of file asterx1_driver.cpp.

Definition at line 133 of file asterx1_driver.cpp.

Definition at line 130 of file asterx1_driver.cpp.

unsigned short int Asterx1Driver::getWnc ( )

Definition at line 110 of file asterx1_driver.cpp.

Definition at line 125 of file asterx1_driver.cpp.

Definition at line 122 of file asterx1_driver.cpp.

Definition at line 126 of file asterx1_driver.cpp.

Definition at line 123 of file asterx1_driver.cpp.

Definition at line 127 of file asterx1_driver.cpp.

Definition at line 124 of file asterx1_driver.cpp.

bool Asterx1Driver::openDriver ( void  ) [virtual]

open driver

In this function, the driver must be openned. Openning errors must be taken into account. This function is automatically called by IriBaseDriver::doOpen(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 10 of file asterx1_driver.cpp.

Prints homogeneous transformation matrix.

Prints the homogeneous transformation matrix from WGS-ECEF to the map frame provided at setMapOrigin().

Definition at line 98 of file asterx1_driver.cpp.

Reads data from device.

Reads current data transmitted by the device and sets all data variables.

Definition at line 103 of file asterx1_driver.cpp.

void Asterx1Driver::setMapOrigin ( double  mapLat0,
double  mapLon0,
double  mapAlt0,
double  mapAlpha0 
)

set map origin

Sets map origin and computes transformation matrix. This call is required if position/velocity data in terms of map coordinates is required. Argument units are: Angles in degrees and altitude in meters.

Definition at line 93 of file asterx1_driver.cpp.

bool Asterx1Driver::startDriver ( void  ) [virtual]

start driver

After this function, the driver and its thread will be started. The driver and related variables should be properly setup. This function is automatically called by IriBaseDriver::doStart(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 36 of file asterx1_driver.cpp.

bool Asterx1Driver::stopDriver ( void  ) [virtual]

stop driver

After this function, the driver's thread will stop its execution. The driver and related variables should be properly setup. This function is automatically called by IriBaseDriver::doStop(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 48 of file asterx1_driver.cpp.


Member Data Documentation

config variable

This variable has all the driver parameters defined in the cfg config file. Is updated everytime function config_update() is called.

Definition at line 74 of file asterx1_driver.h.

CasteRx1* Asterx1Driver::gpsDevice [private]

Definition at line 57 of file asterx1_driver.h.


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


iri_asterx1
Author(s): andreu, acorominas@iri.upc.edu
autogenerated on Fri Dec 6 2013 22:38:17