40 typedef enum POSITION_ALGO {
45 SunObject(
const double& i_latitude,
const double& i_longitude,
const double& i_altitude);
46 SunObject(
const double& i_latitude,
const double& i_longitude,
const double& i_altitude,
const double& i_julian,
const double& i_TZ=0.);
49 void setDate(
const double& i_julian,
const double& i_TZ=0.);
51 void setLatLon(
const double& i_latitude,
const double& i_longitude,
const double& i_altitude);
55 void calculateRadiation(
const double& ta,
const double& rh,
double pressure,
const double& ground_albedo);
56 void calculateRadiation(
const double& ta,
const double& rh,
const double& mean_albedo);
57 void getBeamRadiation(
double& R_toa,
double& R_direct,
double& R_diffuse)
const;
59 void getSlopeRadiation(
const double& slope_azi,
const double& slope_elev,
double& R_toa,
double& R_direct,
double& R_diffuse)
const;
62 double getSplittingBoland(
const double& toa_h,
const double& iswr_measured,
const double& t)
const;
63 double getSplitting(
const double& toa_h,
const double& iswr_measured)
const;
65 double getCorrectionFactor(
const double& iswr_measured,
double &Md,
bool &day,
bool &night)
const;
68 double getJulian(
const double& o_TZ)
const {
return (julian_gmt+o_TZ*1./24.);}
77 void getBeamPotential(
const double& sun_elevation,
const double& Eccentricity_corr,
78 const double& ta,
const double& rh,
const double& pressure,
const double& mean_albedo,
79 double& R_toa,
double& R_direct,
double& R_diffuse)
const;
80 void getClearSky(
const double& sun_elevation,
const double& R_toa,
81 const double& ta,
const double& rh,
const double& pressure,
const double& ground_albedo,
82 double& R_direct,
double& R_diffuse)
const;
85 double julian_gmt, TZ;
86 double latitude, longitude, altitude;
87 double elevation_threshold;
88 double beam_toa, beam_direct, beam_diffuse;
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
double getTimeZone() const
Returns timezone.
Definition: Date.cc:401
double getJulian(const bool &gmt=false) const
Return julian date (JD). The julian date is defined as the fractional number of days since -4713-01-0...
Definition: Date.cc:414
Calculate the Sun's position based on the Meeus algorithm. See J. Meeus, "Astronomical Algorithms",...
Definition: Suntrajectory.h:107
A class to calculate Solar radiation characteristics This is largely based on M. Iqbal,...
Definition: Sun.h:37
SunObject(const SunObject::position_algo &alg=MEEUS)
Definition: Sun.cc:36
Date getDate() const
Definition: Sun.h:69
double getJulian(const double &o_TZ) const
Definition: Sun.h:68
void setDate(const double &i_julian, const double &i_TZ=0.)
Definition: Sun.cc:54
void resetAltitude(const double &i_altitude)
Definition: Sun.cc:98
double getSplitting(const double &toa_h, const double &iswr_measured) const
Evaluate the splitting coefficient between direct and diffuse components of the incoming short wave r...
Definition: Sun.cc:306
void getBeamRadiation(double &R_toa, double &R_direct, double &R_diffuse) const
Definition: Sun.cc:271
position_algo
this enum provides the different position algorithms available
Definition: Sun.h:40
@ MEEUS
Jean Meeus' algorithm (Meeus, j. "Astronomical Algorithms", second edition, 1998, Willmann-Bell,...
Definition: Sun.h:41
void setLatLon(const double &i_latitude, const double &i_longitude, const double &i_altitude)
Definition: Sun.cc:72
static const double elevation_dftlThreshold
Definition: Sun.h:74
double getElevationThresh() const
Definition: Sun.h:60
void calculateRadiation(const double &ta, const double &rh, double pressure, const double &ground_albedo)
Definition: Sun.cc:114
static const double rad_threshold
Definition: Sun.h:74
double getCorrectionFactor(const double &iswr_measured, double &Md, bool &day, bool &night) const
Evaluate an atmospheric losses factor. This correction factor is evaluated by comparing the global po...
Definition: Sun.cc:422
void getSlopeRadiation(const double &slope_azi, const double &slope_elev, double &R_toa, double &R_direct, double &R_diffuse) const
Definition: Sun.cc:287
double getSplittingBoland(const double &toa_h, const double &iswr_measured, const double &t) const
Evaluate the splitting coefficient between direct and diffuse components of the incoming short wave r...
Definition: Sun.cc:358
void setElevationThresh(const double &i_elevation_threshold)
Definition: Sun.cc:108
void getHorizontalRadiation(double &R_toa, double &R_direct, double &R_diffuse) const
Definition: Sun.cc:279
SunMeeus position
Definition: Sun.h:73
const std::string toString() const
Definition: Sun.cc:445
void setDate(const Date &date)
Definition: Sun.h:50