10 #include <cppunit/extensions/HelperMacros.h>
11 #include <det/Detector.h>
12 #include <fdet/FDetector.h>
14 #include <fwk/CoordinateSystemRegistry.h>
16 #include <atm/AerosolDB.h>
17 #include <atm/AttenuationResult.h>
18 #include <atm/ScatteringResult.h>
20 #include <atm/ParametricXMLMieModel.h>
22 #include <fwk/CentralConfig.h>
24 #include <utl/TimeStamp.h>
25 #include <utl/UTCDateTime.h>
26 #include <utl/ErrorLogger.h>
27 #include <utl/Point.h>
28 #include <utl/TabulatedFunctionErrors.h>
29 #include <utl/ReferenceEllipsoid.h>
31 #include <tst/Verify.h>
46 CPPUNIT_TEST(testAttenuation);
47 CPPUNIT_TEST(testScattering);
48 CPPUNIT_TEST(testExpertMode);
49 CPPUNIT_TEST_SUITE_END();
55 CentralConfig::GetInstance(BOOTSTRAPFILE);
64 Detector::GetInstance().Update(
UTCDateTime(2005,1,1,0,0,0).GetTimeStamp());
67 Detector::GetInstance().GetFDetector().GetEye(
"Los Leones").GetLocalCoordinateSystem();
89 Point All(0., 0., 0., CSll);
90 Point Bll(0., 0., 2600.*
m, CSll);
91 Point Cll(0., 0., 9000.*
m, CSll);
92 Point Dll(0., 2000.*
m, 2600.*
m, CSll);
93 Point Ell(0., 9000.*
m, 2600.*
m, CSll);
96 Point Cst(0., 0., 10000.*
m, CSst);
98 vector<double> wlength;
104 const Atmosphere& theAtm = Detector::GetInstance().GetAtmosphere();
114 CPPUNIT_ASSERT(Verify<CloseTo>(attACll.GetTransmissionFactor().Y(300.*
nanometer), 0.906834));
119 CPPUNIT_ASSERT(Verify<CloseTo>(attADll.GetTransmissionFactor().Y(300.*
nanometer), 0.894906));
124 CPPUNIT_ASSERT(Verify<CloseTo>(attBDll.GetTransmissionFactor().Y(300.*
nanometer), 0.980601));
129 CPPUNIT_ASSERT(Verify<CloseTo>(attBEll.GetTransmissionFactor().Y(300.*
nanometer), 0.915878));
139 PointToLatitudeLongitudeHeight(
Point(0., 0., 0., CSll)) ).get<2>();
141 PointToLatitudeLongitudeHeight(
Point(0., 0., 0., CSst)) ).get<2>();
145 Point(0., 0., 10000*
m, CSll),
149 Point(0., 0., heightSLll - heightSLst + 10000.*
m, CSst),
160 Detector::GetInstance().Update(
UTCDateTime(2005,1,1,0,0,0).GetTimeStamp());
161 const Atmosphere& theAtm = Detector::GetInstance().GetAtmosphere();
163 vector<double> wlength;
169 CSll(Detector::GetInstance().GetFDetector().GetEye(
"Los Leones").GetLocalCoordinateSystem() );
171 Point pointA(0., 0. , 0., CSll);
172 Point pointB(0., 0. , 1400.*
m, CSll);
173 Point pointC(0., 600.*
m, 1600.*
m, CSll);
263 vector<double> wlength;
269 CSll(Detector::GetInstance().GetFDetector().GetEye(
"Los Leones").GetLocalCoordinateSystem() );
271 Point pointA(0., 0. , 0., CSll);
272 Point pointB(0., 0. , 1400.*
m, CSll);
double GetScatteringAngle() const
Get calculated scattering angle.
Top of the interface to Atmosphere information.
atm::AttenuationResult EvaluateMieAttenuation(const utl::Point &xInit, const utl::Point &xFinal, const std::vector< double > &wLength) const
const utl::TabulatedFunctionErrors & GetTransmissionFactor() const
Transmission factor.
double GetHorizAttLength() const
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
constexpr double nanometer
Class holding the output of the ScatteringResult function.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Reference ellipsoids for UTM transformations.
double GetScaleHeight() const
atm::AttenuationResult EvaluateRayleighAttenuation(const utl::Point &xInit, const utl::Point &xFinal, const std::vector< double > &wLength) const
Compute Rayleigh attenuation between points.
double GetAngstromCoeff() const
const utl::TabulatedFunctionErrors & GetScatteringFactor() const
Scattering factor.
void SetHorizAttLength(const double lMix)
utl::CoordinateSystemPtr Get(const std::string &id)
Get a well-known Coordinate System.
double GetMixHeight() const
Class for computing aerosol scattering and attenuation using simple parameterizations.
double Y(const double x) const
Get or interpolate the Y value that corresponds to parameter x.
atm::ScatteringResult EvaluateMieScattering(const utl::Point &xA, const utl::Point &xB, const double angle, const double distance, const std::vector< double > &wLength) const
Aerosol scattering fraction in a wavelength band.
Class describing the Atmospheric attenuation.
void SetScaleHeight(const double hScl)
atm::ScatteringResult EvaluateMieScattering(const utl::Point &xA, const utl::Point &xB, const double angle, const double distance, const std::vector< double > &xLength) const