A class to calculate the Sun's position This class is purely virtual.
#include <Suntrajectory.h>
Public Member Functions | |
SunTrajectory () | |
SunTrajectory (const double &i_latitude, const double &i_longitude) | |
virtual | ~SunTrajectory () |
virtual void | setDate (const double &i_julian, const double &i_TZ=0.)=0 |
Set the date and time if no timezone is specified, GMT is assumed. More... | |
virtual void | setLatLon (const double &i_latitude, const double &i_longitude)=0 |
virtual void | setAll (const double &i_latitude, const double &i_longitude, const double &i_julian, const double &i_TZ=0.)=0 |
virtual void | reset ()=0 |
virtual double | getSolarElevation () const =0 |
virtual double | getSolarAzimuth () const =0 |
virtual void | getHorizontalCoordinates (double &azimuth, double &elevation) const =0 |
virtual void | getHorizontalCoordinates (double &azimuth, double &elevation, double &eccentricity) const =0 |
virtual void | getDaylight (double &sunrise, double &sunset, double &daylight)=0 |
virtual double | getSolarTime () const |
Return the current solar time. Since the Sun reaches its zenith at a time different than the local noon, the solar noon does not happen at 12:00 local time. This defines a solar time that has a negative or positive offset with the local time, depending on the seasons (see http://www.jaloxa.eu/resources/daylighting/sunpath.shtml). More... | |
virtual double | getSolarTimeOfDay () const |
Return the current solar time of day. Since the Sun reaches its zenith at a time different than the local noon, the solar noon does not happen at 12:00 local time. This defines a solar time that has a negative or positive offset with the local time, depending on the seasons (see http://www.jaloxa.eu/resources/daylighting/sunpath.shtml). More... | |
virtual void | getEquatorialCoordinates (double &right_ascension, double &declination)=0 |
(http://en.wikipedia.org/wiki/Equatorial_coordinate_system) More... | |
double | getAngleOfIncidence (const double &slope_azi, const double &slope_elev) const |
radiation projection methods More... | |
double | getRadiationOnHorizontal (const double &radiation) const |
double | getRadiationOnSlope (const double &slope_azi, const double &slope_elev, const double &radiation) const |
double | getHorizontalOnSlope (const double &slope_azi, const double &slope_elev, const double &H_radiation, const double &elev_threshold=5.) const |
Project a given horizontal radiation to a given slope. The sun position is the current one, the radiation intensity is given as well as the slope parameters. This should be used after correcting the radiation on the horizontal (by applying atmospheric effects or special handling for dawn/dusk) in order to compute consistent radiation on slopes. More... | |
const std::string | toString () const |
Static Public Member Functions | |
static void | getEaster (const int &year, int &month, int &day) |
Return the date of easter for the given year. More... | |
static double | getAngleOfIncidence (const double &sun_azi, const double &sun_elev, const double &slope_azi, const double &slope_elev) |
static helper for radiation projection More... | |
static double | projectHorizontalToSlope (const double &sun_azi, const double &sun_elev, const double &slope_azi, const double &slope_elev, const double &H_radiation, const double &elev_threshold=5.) |
static double | projectSlopeToHorizontal (const double &sun_azi, const double &sun_elev, const double &slope_azi, const double &slope_elev, const double &S_radiation) |
static double | projectHorizontalToBeam (const double &sun_elev, const double &H_radiation) |
Protected Member Functions | |
virtual void | update ()=0 |
Protected Attributes | |
double | julian_gmt |
double | TZ |
double | latitude |
double | longitude |
double | SolarAzimuthAngle |
double | SolarElevation |
double | eccentricityEarth |
>this is the TRUE solar elevation, not the apparent one More... | |
double | SunRise |
double | SunSet |
double | SunlightDuration |
double | SolarNoon |
double | SunRightAscension |
double | SunDeclination |
double | HourAngle |
Static Protected Attributes | |
static const double | nodata |
mio::SunTrajectory::SunTrajectory | ( | ) |
mio::SunTrajectory::SunTrajectory | ( | const double & | i_latitude, |
const double & | i_longitude | ||
) |
|
inlinevirtual |
double mio::SunTrajectory::getAngleOfIncidence | ( | const double & | slope_azi, |
const double & | slope_elev | ||
) | const |
radiation projection methods
Compute the solar incidence (rad), i.e. the angle between the incident sun beam and the normal to the slope (simplified by Funk (1984 pp.139-140)).
slope_azi | slope azimuth in degrees, bearing |
slope_elev | slope angle in degrees |
|
static |
static helper for radiation projection
|
pure virtual |
Implemented in mio::SunMeeus.
|
static |
Return the date of easter for the given year.
This is the method given in Meeus citing Butcher's Ecclesiastical Calendar. It is valid for all years after October 1582 (since this was the year of introduction of the
Gregorian calendar, suppressing 10 days (jumping from 4.10 to 15.10) compared to the previous Julian calendar).
[in] | year | the year of interest |
[out] | month | the month of Easter |
[out] | day | the day of Easter |
|
pure virtual |
(http://en.wikipedia.org/wiki/Equatorial_coordinate_system)
Implemented in mio::SunMeeus.
|
pure virtual |
Implemented in mio::SunMeeus.
|
pure virtual |
Implemented in mio::SunMeeus.
double mio::SunTrajectory::getHorizontalOnSlope | ( | const double & | slope_azi, |
const double & | slope_elev, | ||
const double & | H_radiation, | ||
const double & | elev_threshold = 5. |
||
) | const |
Project a given horizontal radiation to a given slope. The sun position is the current one, the radiation intensity is given as well as the slope parameters. This should be used after correcting the radiation on the horizontal (by applying atmospheric effects or special handling for dawn/dusk) in order to compute consistent radiation on slopes.
slope_azi | slope azimuth (compass orientation, in degrees) |
slope_elev | slope angle (in degrees) |
H_radiation | radiation intensity on the horizontal |
elev_threshold | all solar elevations less than this threshold will be use this threshold (in degrees, default 5 degrees) |
double mio::SunTrajectory::getRadiationOnHorizontal | ( | const double & | radiation | ) | const |
double mio::SunTrajectory::getRadiationOnSlope | ( | const double & | slope_azi, |
const double & | slope_elev, | ||
const double & | radiation | ||
) | const |
|
pure virtual |
Implemented in mio::SunMeeus.
|
pure virtual |
(see http://en.wikipedia.org/wiki/Horizontal_coordinate_system) please remember that zenith_angle = 90 - elevation
Implemented in mio::SunMeeus.
|
virtual |
Return the current solar time. Since the Sun reaches its zenith at a time different than the local noon, the solar noon does not happen at 12:00 local time. This defines a solar time that has a negative or positive offset with the local time, depending on the seasons (see http://www.jaloxa.eu/resources/daylighting/sunpath.shtml).
|
virtual |
Return the current solar time of day. Since the Sun reaches its zenith at a time different than the local noon, the solar noon does not happen at 12:00 local time. This defines a solar time that has a negative or positive offset with the local time, depending on the seasons (see http://www.jaloxa.eu/resources/daylighting/sunpath.shtml).
|
static |
|
static |
|
static |
|
pure virtual |
Implemented in mio::SunMeeus.
|
pure virtual |
Implemented in mio::SunMeeus.
|
pure virtual |
Set the date and time if no timezone is specified, GMT is assumed.
i_julian | julian date in the time zone of interest |
i_TZ | time zone |
Implemented in mio::SunMeeus.
|
pure virtual |
Implemented in mio::SunMeeus.
const std::string mio::SunTrajectory::toString | ( | ) | const |
|
protectedpure virtual |
|
protected |
>this is the TRUE solar elevation, not the apparent one
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |