satellite-channel-estimation-error.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Magister Solutions Ltd
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Jani Puttonen <jani.puttonen@magister.fi>
19  */
20 
21 #ifndef SATELLITE_CHANNEL_ESTIMATION_ERROR_H_
22 #define SATELLITE_CHANNEL_ESTIMATION_ERROR_H_
23 
24 #include <ns3/object.h>
25 #include <ns3/random-variable-stream.h>
26 
27 #include <stdint.h>
28 #include <string>
29 #include <vector>
30 
31 namespace ns3
32 {
33 
43 class SatChannelEstimationError : public Object
44 {
45  public:
50 
56  SatChannelEstimationError(std::string filePathName);
57 
62 
66  static TypeId GetTypeId(void);
67 
71  virtual void DoDispose();
72 
78  double AddError(double sinrInDb) const;
79 
80  private:
85  void ReadFile(std::string filePathName);
86 
91 
96  Ptr<NormalRandomVariable> m_normalRandomVariable;
97 
101  std::vector<double> m_sinrsDb;
102 
106  std::vector<double> m_mueCesDb;
107 
111  std::vector<double> m_stdCesDb;
112 };
113 
114 } // namespace ns3
115 
116 #endif /* SATELLITE_CHANNEL_ESTIMATION_ERROR_H_ */
SatChannelEstimatorError reads from file and stores the channel estimation error mean and standard de...
std::vector< double > m_sinrsDb
SINR values.
uint32_t m_lastSampleIndex
Last sample index of the containers.
Ptr< NormalRandomVariable > m_normalRandomVariable
Normal random variable used to calculate the channel estimation error.
virtual ~SatChannelEstimationError()
Destructor for SatChannelEstimationError.
std::vector< double > m_stdCesDb
Standard deviation values.
double AddError(double sinrInDb) const
Add channel estimation error to SINR.
virtual void DoDispose()
Dispose of this class instance.
std::vector< double > m_mueCesDb
Mean values.
void ReadFile(std::string filePathName)
Read the distribution mean and STD values from file.
static TypeId GetTypeId(void)
inherited from Object
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.