This class implements a driver for the Gill Windsonic Option 1 Anemometer The sensor is accessed via a standard serial port.
Refer to the manufacturer website for details on this sensor: http://gillinstruments.com/data/manuals/WindSonic-Web-Manual.pdf Configure for single <CR> return, at 2Hz
- See also
- mrpt::obs::CObservationWindSensor
Definition at line 29 of file CGillAnemometer.h.
#include <mrpt/hwdrivers/CGillAnemometer.h>
|
| CGillAnemometer () |
| Default constructor. More...
|
|
virtual | ~CGillAnemometer () |
| Default destructor. More...
|
|
void | doProcess () |
| This method will be invoked at a minimum rate of "process_rate" (Hz) More...
|
|
void | loadConfig_sensorSpecific (const mrpt::utils::CConfigFileBase &configSource, const std::string §ion) |
| Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes) More...
|
|
virtual const mrpt::hwdrivers::TSensorClassId * | GetRuntimeClass () const =0 |
|
TSensorState | getState () const |
| The current state of the sensor
More...
|
|
double | getProcessRate () const |
|
std::string | getSensorLabel () const |
|
void | setSensorLabel (const std::string &sensorLabel) |
|
void | enableVerbose (bool enabled=true) |
| Enable or disable extra debug info dumped to std::cout during sensor operation. More...
|
|
bool | isVerboseEnabled () const |
|
void | loadConfig (const mrpt::utils::CConfigFileBase &configSource, const std::string §ion) |
| Loads the generic settings common to any sensor (See CGenericSensor), then call to "loadConfig_sensorSpecific". More...
|
|
virtual void | initialize () |
| This method can or cannot be implemented in the derived class, depending on the need for it. More...
|
|
void | getObservations (TListObservations &lstObjects) |
| Returns a list of enqueued objects, emptying it (thread-safe). More...
|
|
virtual void | setPathForExternalImages (const std::string &directory) |
| Set the path where to save off-rawlog image files (will be ignored in those sensors where this is not applicable). More...
|
|
void | setExternalImageFormat (const std::string &ext) |
| Set the extension ("jpg","gif","png",...) that determines the format of images saved externally The default is "jpg". More...
|
|
void | setExternalImageJPEGQuality (const unsigned int quality) |
| The quality of JPEG compression, when external images is enabled and the format is "jpg". More...
|
|
unsigned int | getExternalImageJPEGQuality () const |
|
|
bool | tryToOpenTheCOM () |
| Returns true if the COM port is already open, or try to open it in other case. More...
|
|
◆ TListObservations
◆ TListObsPair
◆ TSensorState
◆ CGillAnemometer()
mrpt::hwdrivers::CGillAnemometer::CGillAnemometer |
( |
| ) |
|
◆ ~CGillAnemometer()
virtual mrpt::hwdrivers::CGillAnemometer::~CGillAnemometer |
( |
| ) |
|
|
inlinevirtual |
◆ appendObservation()
void mrpt::hwdrivers::CGenericSensor::appendObservation |
( |
const mrpt::utils::CSerializablePtr & |
obj | ) |
|
|
inlineprotectedinherited |
◆ appendObservations()
void mrpt::hwdrivers::CGenericSensor::appendObservations |
( |
const std::vector< mrpt::utils::CSerializablePtr > & |
obj | ) |
|
|
protectedinherited |
This method must be called by derived classes to enqueue a new observation in the list to be returned by getObservations.
Passed objects must be created in dynamic memory and a smart pointer passed. Example of creation:
mrpt::obs::CObservationGPSPtr o = CObservationGPSPtr( new CObservationGPS() );
o-> ....
void appendObservation(const mrpt::utils::CSerializablePtr &obj)
Like appendObservations() but for just one observation.
If several observations are passed at once in the vector, they'll be considered as a block regarding the grabbing decimation factor.
◆ createSensor()
static CGenericSensor * mrpt::hwdrivers::CGenericSensor::createSensor |
( |
const std::string & |
className | ) |
|
|
staticinherited |
Creates a sensor by a name of the class.
Typically the user may want to create a smart pointer around the returned pointer, whis is made with:
static CGenericSensor * createSensor(const std::string &className)
Creates a sensor by a name of the class.
stlplus::smart_ptr< CGenericSensor > CGenericSensorPtr
- Returns
- A pointer to a new class, or NULL if class name is unknown.
◆ createSensorPtr()
static CGenericSensorPtr mrpt::hwdrivers::CGenericSensor::createSensorPtr |
( |
const std::string & |
className | ) |
|
|
inlinestaticinherited |
Just like createSensor, but returning a smart pointer to the newly created sensor object.
Definition at line 179 of file CGenericSensor.h.
◆ doProcess()
void mrpt::hwdrivers::CGillAnemometer::doProcess |
( |
| ) |
|
|
virtual |
This method will be invoked at a minimum rate of "process_rate" (Hz)
- Exceptions
-
This | method must throw an exception with a descriptive message if some critical error is found. |
Implements mrpt::hwdrivers::CGenericSensor.
◆ enableVerbose()
void mrpt::hwdrivers::CGenericSensor::enableVerbose |
( |
bool |
enabled = true | ) |
|
|
inlineinherited |
Enable or disable extra debug info dumped to std::cout during sensor operation.
Default: disabled unless the environment variable "MRPT_HWDRIVERS_VERBOSE" is set to "1" during object creation.
Definition at line 92 of file CGenericSensor.h.
◆ getExternalImageJPEGQuality()
unsigned int mrpt::hwdrivers::CGenericSensor::getExternalImageJPEGQuality |
( |
| ) |
const |
|
inlineinherited |
◆ getObservations()
void mrpt::hwdrivers::CGenericSensor::getObservations |
( |
TListObservations & |
lstObjects | ) |
|
|
inherited |
Returns a list of enqueued objects, emptying it (thread-safe).
The objects must be freed by the invoker.
◆ getProcessRate()
double mrpt::hwdrivers::CGenericSensor::getProcessRate |
( |
| ) |
const |
|
inlineinherited |
◆ GetRuntimeClass()
◆ getSensorLabel()
std::string mrpt::hwdrivers::CGenericSensor::getSensorLabel |
( |
| ) |
const |
|
inlineinherited |
◆ getState()
TSensorState mrpt::hwdrivers::CGenericSensor::getState |
( |
| ) |
const |
|
inlineinherited |
◆ initialize()
virtual void mrpt::hwdrivers::CGenericSensor::initialize |
( |
| ) |
|
|
inlinevirtualinherited |
This method can or cannot be implemented in the derived class, depending on the need for it.
- Exceptions
-
This | method must throw an exception with a descriptive message if some critical error is found. |
Reimplemented in mrpt::hwdrivers::CActivMediaRobotBase, mrpt::hwdrivers::CBoardDLMS, mrpt::hwdrivers::CBoardENoses, mrpt::hwdrivers::CCameraSensor, mrpt::hwdrivers::CCANBusReader, mrpt::hwdrivers::CGPS_NTRIP, mrpt::hwdrivers::CGyroKVHDSP3000, mrpt::hwdrivers::CHokuyoURG, mrpt::hwdrivers::CIbeoLuxETH, mrpt::hwdrivers::CImpinjRFID, mrpt::hwdrivers::CIMUIntersense, mrpt::hwdrivers::CIMUXSens, mrpt::hwdrivers::CIMUXSens_MT4, mrpt::hwdrivers::CKinect, mrpt::hwdrivers::CLMS100Eth, mrpt::hwdrivers::CNationalInstrumentsDAQ, mrpt::hwdrivers::CNTRIPEmitter, mrpt::hwdrivers::COpenNI2_RGBD360, mrpt::hwdrivers::COpenNI2Sensor, mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors, mrpt::hwdrivers::CPtuHokuyo, mrpt::hwdrivers::CRoboPeakLidar, mrpt::hwdrivers::CSickLaserSerial, mrpt::hwdrivers::CSkeletonTracker, mrpt::hwdrivers::CSwissRanger3DCamera, and mrpt::hwdrivers::CVelodyneScanner.
Definition at line 200 of file CGenericSensor.h.
◆ isVerboseEnabled()
bool mrpt::hwdrivers::CGenericSensor::isVerboseEnabled |
( |
| ) |
const |
|
inlineinherited |
◆ loadConfig()
Loads the generic settings common to any sensor (See CGenericSensor), then call to "loadConfig_sensorSpecific".
- Exceptions
-
This | method throws an exception with a descriptive message if some critical parameter is missing or has an invalid value. |
◆ loadConfig_sensorSpecific()
void mrpt::hwdrivers::CGillAnemometer::loadConfig_sensorSpecific |
( |
const mrpt::utils::CConfigFileBase & |
configSource, |
|
|
const std::string & |
section |
|
) |
| |
|
virtual |
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)
- Exceptions
-
This | method must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value. |
Implements mrpt::hwdrivers::CGenericSensor.
◆ registerClass()
static void mrpt::hwdrivers::CGenericSensor::registerClass |
( |
const TSensorClassId * |
pNewClass | ) |
|
|
staticinherited |
◆ setExternalImageFormat()
void mrpt::hwdrivers::CGenericSensor::setExternalImageFormat |
( |
const std::string & |
ext | ) |
|
|
inlineinherited |
◆ setExternalImageJPEGQuality()
void mrpt::hwdrivers::CGenericSensor::setExternalImageJPEGQuality |
( |
const unsigned int |
quality | ) |
|
|
inlineinherited |
◆ setPathForExternalImages()
virtual void mrpt::hwdrivers::CGenericSensor::setPathForExternalImages |
( |
const std::string & |
directory | ) |
|
|
inlinevirtualinherited |
◆ setSensorLabel()
void mrpt::hwdrivers::CGenericSensor::setSensorLabel |
( |
const std::string & |
sensorLabel | ) |
|
|
inlineinherited |
◆ tryToOpenTheCOM()
bool mrpt::hwdrivers::CGillAnemometer::tryToOpenTheCOM |
( |
| ) |
|
|
private |
Returns true if the COM port is already open, or try to open it in other case.
- Returns
- true if everything goes OK, or false if there are problems opening the port.
◆ COM
◆ com_bauds
int mrpt::hwdrivers::CGillAnemometer::com_bauds |
|
private |
◆ com_port
std::string mrpt::hwdrivers::CGillAnemometer::com_port |
|
private |
◆ m_csObjList
◆ m_external_images_format
std::string mrpt::hwdrivers::CGenericSensor::m_external_images_format |
|
protectedinherited |
◆ m_external_images_jpeg_quality
unsigned int mrpt::hwdrivers::CGenericSensor::m_external_images_jpeg_quality |
|
protectedinherited |
◆ m_grab_decimation
size_t mrpt::hwdrivers::CGenericSensor::m_grab_decimation |
|
protectedinherited |
If set to N>=2, only 1 out of N observations will be saved to m_objList.
Definition at line 117 of file CGenericSensor.h.
◆ m_grab_decimation_counter
size_t mrpt::hwdrivers::CGenericSensor::m_grab_decimation_counter |
|
protectedinherited |
◆ m_knownClasses
std::map< std::string , const TSensorClassId *> mrpt::hwdrivers::CGenericSensor::m_knownClasses |
|
staticprivateinherited |
◆ m_max_queue_len
size_t mrpt::hwdrivers::CGenericSensor::m_max_queue_len |
|
protectedinherited |
◆ m_objList
The queue of objects to be returned by getObservations.
Definition at line 105 of file CGenericSensor.h.
◆ m_path_for_external_images
std::string mrpt::hwdrivers::CGenericSensor::m_path_for_external_images |
|
protectedinherited |
The path where to save off-rawlog images: empty means save images embedded in the rawlog.
Definition at line 129 of file CGenericSensor.h.
◆ m_process_rate
double mrpt::hwdrivers::CGenericSensor::m_process_rate |
|
protectedinherited |
◆ m_sensorLabel
std::string mrpt::hwdrivers::CGenericSensor::m_sensorLabel |
|
protectedinherited |
◆ m_state
◆ m_verbose
bool mrpt::hwdrivers::CGenericSensor::m_verbose |
|
protectedinherited |
◆ pose_pitch
float mrpt::hwdrivers::CGillAnemometer::pose_pitch |
|
private |
◆ pose_roll
float mrpt::hwdrivers::CGillAnemometer::pose_roll |
|
private |
◆ pose_x
float mrpt::hwdrivers::CGillAnemometer::pose_x |
|
private |
◆ pose_y
float mrpt::hwdrivers::CGillAnemometer::pose_y |
|
private |
◆ pose_yaw
float mrpt::hwdrivers::CGillAnemometer::pose_yaw |
|
private |
◆ pose_z
float mrpt::hwdrivers::CGillAnemometer::pose_z |
|
private |