MRPT  2.0.3
CGillAnemometer.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/comms/CSerialPort.h>
15 
16 namespace mrpt::hwdrivers
17 {
18 /** This class implements a driver for the Gill Windsonic Option 1 Anemometer
19  * The sensor is accessed via a standard serial port.
20  *
21  * Refer to the manufacturer website for details on this sensor:
22  *http://gillinstruments.com/data/manuals/WindSonic-Web-Manual.pdf
23  * Configure for single <CR> return, at 2Hz
24  * \sa mrpt::obs::CObservationWindSensor
25  * \ingroup mrpt_hwdrivers_grp
26  */
28 {
30 
31  private:
32  /** COM port name
33  */
34  std::string com_port;
35  int com_bauds;
36 
37  /** COM port
38  */
40 
41  /** Poses
42  */
44 
45  /** Returns true if the COM port is already open, or try to open it in other
46  * case.
47  * \return true if everything goes OK, or false if there are problems
48  * opening the port.
49  */
50  bool tryToOpenTheCOM();
51 
52  public:
53  /** Default constructor.
54  */
56  /** Default destructor.
57  */
58  ~CGillAnemometer() override { COM.close(); };
59  void doProcess() override;
60 
62  const mrpt::config::CConfigFileBase& configSource,
63  const std::string& section) override;
64 }; // End of class def.
65 
66 } // namespace mrpt::hwdrivers
mrpt::comms::CSerialPort::close
void close()
Close the port.
Definition: CSerialPort.cpp:625
CSerialPort.h
mrpt::hwdrivers::CGillAnemometer::CGillAnemometer
CGillAnemometer()
Default constructor.
Definition: CGillAnemometer.cpp:28
mrpt::comms::CSerialPort
A communications serial port built as an implementation of a utils::CStream.
Definition: CSerialPort.h:41
mrpt::hwdrivers
Contains classes for various device interfaces.
Definition: C2DRangeFinderAbstract.h:19
DEFINE_GENERIC_SENSOR
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
Definition: CGenericSensor.h:302
mrpt::hwdrivers::CGillAnemometer::pose_pitch
float pose_pitch
Definition: CGillAnemometer.h:43
mrpt::hwdrivers::CGillAnemometer::loadConfig_sensorSpecific
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &section) override
Loads specific configuration for the device from a given source of configuration parameters,...
Definition: CGillAnemometer.cpp:32
mrpt::hwdrivers::CGillAnemometer::pose_roll
float pose_roll
Definition: CGillAnemometer.h:43
mrpt::hwdrivers::CGillAnemometer::com_bauds
int com_bauds
Definition: CGillAnemometer.h:35
mrpt::hwdrivers::CGillAnemometer::pose_y
float pose_y
Definition: CGillAnemometer.h:43
CObservationWindSensor.h
CConfigFileBase.h
mrpt::hwdrivers::CGillAnemometer::~CGillAnemometer
~CGillAnemometer() override
Default destructor.
Definition: CGillAnemometer.h:58
mrpt::hwdrivers::CGillAnemometer::pose_x
float pose_x
Poses.
Definition: CGillAnemometer.h:43
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
CGenericSensor.h
mrpt::hwdrivers::CGillAnemometer::com_port
std::string com_port
COM port name.
Definition: CGillAnemometer.h:34
mrpt::hwdrivers::CGenericSensor
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Definition: CGenericSensor.h:70
mrpt::hwdrivers::CGillAnemometer::tryToOpenTheCOM
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
Definition: CGillAnemometer.cpp:57
mrpt::hwdrivers::CGillAnemometer::doProcess
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CGillAnemometer.cpp:96
mrpt::hwdrivers::CGillAnemometer::pose_z
float pose_z
Definition: CGillAnemometer.h:43
mrpt::hwdrivers::CGillAnemometer
This class implements a driver for the Gill Windsonic Option 1 Anemometer The sensor is accessed via ...
Definition: CGillAnemometer.h:27
mrpt::hwdrivers::CGillAnemometer::COM
mrpt::comms::CSerialPort COM
COM port.
Definition: CGillAnemometer.h:39
mrpt::hwdrivers::CGillAnemometer::pose_yaw
float pose_yaw
Definition: CGillAnemometer.h:43



Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020