DopplerSamplerOp.h
1 /*
2 
3 MIT License
4 
5 Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in all
15 copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 SOFTWARE.
24 
25 */
26 /*
27 Part of Rack development has been done in the BALTRAD projects part-financed
28 by the European Union (European Regional Development Fund and European
29 Neighbourhood Partnership Instrument, Baltic Sea Region Programme 2007-2013)
30 */
31 
32 #ifndef DOPPLERSAMPLER_OP_H_
33 #define DOPPLERSAMPLER_OP_H_
34 
35 #include "DopplerOp.h"
36 
37 //#include "radar/Doppler.h"
38 #include "radar/PolarSector.h"
39 
40 
41 namespace rack {
42 
43 
45 
49 class DopplerSamplerOp : public DopplerOp {
50 public:
51 
52 
53  DopplerSamplerOp() : DopplerOp(__FUNCTION__, "Projects Doppler speeds to unit circle. Window corners as (azm,range) or (ray,bin)") {
54  parameters.append(w.getParameters());
55  //dataSelector.setQuantity("^(VRAD|VRADH)$");
56  //dataSelector.setMaxCount(1);
57  };
58 
59  virtual inline ~DopplerSamplerOp(){};
60 
61  mutable PolarSector w;
62 
63 
64 protected:
65 
66  DopplerSamplerOp(const std::string & name, const std::string &description) : DopplerOp(name, description){
67  //dataSelector.setQuantity("VRAD");
68  //dataSelector.setMaxCount(1);
69  }
70 
71  virtual
72  void processDataSet(const DataSet<PolarSrc> & srcSweep, DataSet<PolarDst> & dstProduct) const ;
73 
74 
75 };
76 
77 class DopplerDiffPlotterOp : public DopplerSamplerOp { // DopplerWindow unused!
78 
79 public:
80 
81 
82  DopplerDiffPlotterOp() : DopplerSamplerOp(__FUNCTION__, "Plots differences in VRAD data as fucntion of azimuth") {
83  parameters.append(w.getParameters());
84  dataSelector.setMaxCount(1);
85  }
86 
87  // Outputs u and v both, so dst dataSET needed
88  virtual
89  void processDataSet(const DataSet<PolarSrc> & srcSweep, DataSet<PolarDst> & dstProduct) const ;
90 
91 };
92 
93 
94 
95 } // namespace rack
96 
97 
98 #endif
99 
void append(ReferenceMap &rMap, bool replace=true)
Adopts the references of r. If replace==false, only new entries are appended.
Definition: ReferenceMap.h:320
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition: Data.h:1213
Definition: DopplerSamplerOp.h:77
Base class for computing products using Doppler speed [VRAD] data.
Definition: DopplerOp.h:49
Base class for computing products using Doppler speed [VRAD] data.
Definition: DopplerSamplerOp.h:49
Definition: PolarSector.h:47
Definition: DataSelector.cpp:44