Updated FSF address in all files. Fixes ticket:51
[debian/gnuradio] / ezdop / src / host / hunter / src / known.cc
1 /*
2  Copyright 2006 Johnathan Corgan.
3  
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License version 2
6  as published by the Free Software Foundation.
7  
8  This software is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  GNU General Public License for more details.
12  
13  You should have received a copy of the GNU General Public License
14  along with GNU Radio; see the file COPYING.  If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street,
16  Boston, MA 02110-1301, USA.
17 */
18
19 // Application level includes
20 #include "known.h"
21 #include "util.h"
22
23 // wxWidget includes
24 #include <wx/log.h>
25
26 using namespace std;
27
28 KnownTransmitter::KnownTransmitter()
29 {
30     m_valid = false;
31     ClearStats();
32 }
33
34 void KnownTransmitter::Location(const Spherical &location)
35 {
36     m_location = location;
37     m_valid = true;
38     ClearStats();
39 }
40
41 void KnownTransmitter::Clear()
42 {
43     m_valid = false;
44     ClearStats();
45 }
46
47 void KnownTransmitter::ClearStats()
48 {
49     m_histogram.Reset();
50 }
51
52 void KnownTransmitter::Calc(const std::vector<Sample> &samples)
53 {
54     m_histogram.Calc(samples, m_location);
55 }