nidas  v1.2-1520
WindRotator.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2006, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 
27 #ifndef NIDAS_DNYLD_ISFF_WINDROTATOR_H
28 #define NIDAS_DNYLD_ISFF_WINDROTATOR_H
29 
30 namespace nidas { namespace dynld { namespace isff {
31 
39 class WindRotator {
40 public:
41 
42  WindRotator();
43 
44  double getAngleDegrees() const;
45 
46  void setAngleDegrees(double val);
47 
48  void rotate(float* up, float* vp) const;
49 
50 private:
51 
52  double _angle;
53 
54  double _sinAngle;
55 
56  double _cosAngle;
57 };
58 
59 
60 }}} // namespace nidas namespace dynld namespace isff
61 
62 #endif
double _angle
Definition: WindRotator.h:52
double _sinAngle
Definition: WindRotator.h:54
double getAngleDegrees() const
Definition: WindRotator.cc:14
void setAngleDegrees(double val)
Definition: WindRotator.cc:19
void rotate(float *up, float *vp) const
Definition: WindRotator.cc:26
double _cosAngle
Definition: WindRotator.h:56
WindRotator()
Definition: WindRotator.cc:10
Rotate a (U,V) 2D wind vector by an angle.
Definition: WindRotator.h:39