1 #ifndef CARMA_ENVIRONMENT_WS_H
2 #define CARMA_ENVIRONMENT_WS_H
6 #include <boost/shared_ptr.hpp>
7 #include <boost/circular_buffer.hpp>
11 #include <carma/util/PthreadMutex.h>
12 #include <carma/util/AutoPthreadQuitAndJoinGroup.h>
25 namespace environment {
27 class WSSerialAccessor;
38 float ambientTemperature;
39 float dewpointTemperature;
44 float averageWindSpeed;
45 float averageWindDirection;
48 float waterVaporDensity;
50 std::string weatherStationTime;
60 WS(
const std::string &device,
bool reopen =
false,
bool emulate =
false);
62 void getLatestData(
struct WSData &data);
65 static void readerThreadEP(WS &This);
66 static void writerThreadEP(WS &This);
69 void addRegisterData(
const int regnum,
const float regval);
70 bool parseData(
const char *buf, ssize_t bytes);
71 void readerNormalMode();
72 void readerEmulateMode();
73 void writerNormalMode();
75 const std::string device_;
78 carma::util::AutoPthreadQuitAndJoinGroup group_;
80 boost::shared_ptr<WSSerialAccessor> serial_;
82 boost::circular_buffer<float> windSpeeds_;
83 boost::circular_buffer<float> windDirections_;
93 #endif // CARMA_ENVIRONMENT_WS_H
This class is used to calculate a variety of quantities related to the earth's atmosphere, such as refractivity, saturated pressure, and pathlength (refractivity integrated through the atmosphere).
unsigned int frameType
Half second frames since Jan 1, 2000.
Constants and methods having to do with the earth's atmosphere (e.g.
A simple wrapper class that makes use of ::pthread_mutex_t easier in a C++ world. ...
Various type definitions for util classes.