-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathattenuation.cpp
More file actions
30 lines (25 loc) · 809 Bytes
/
attenuation.cpp
File metadata and controls
30 lines (25 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "attenuation.h"
Attenuation::Attenuation(attenuationFcn model, Heliostat heliostat)
: attenuationFcn (model),Heliostat(heliostat)
{
}
//void Attenuation::setAttenuationModel(attenuationFcn &model)
//{
// m_model = model;
//}
//double Attenuation::getAttenuationFactor()
//{
// double slantRange = getSlantRange() / 1000.;
// m_attenuationFactor = m_model(slantRange);
//}
double Attenuation::vittitoe(const double &slantRange)
{
return (0.99326 - 0.1046 * slantRange + 0.017 * pow(slantRange, 2.0) - 0.002845 * pow(slantRange, 3.0));
}
double Attenuation::mirval(const double &slantRange)
{
if (slantRange <= 1)
return (0.99321 - 0.1176 * slantRange + 0.0197 * pow(slantRange, 2));
else
return qExp(0.1106 * slantRange);
}