MeteoIODoc 2.11.0
mio::SunMeeus Class Reference

Detailed Description

Calculate the Sun's position based on the Meeus algorithm. See J. Meeus, "Astronomical Algorithms", 1998, 2nd ed, Willmann-Bell, Inc., Richmond, VA, USA, ISBN 0-943396-61-1. A useful reference is also NOAA's spreadsheet at http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html or http://energyworksus.com/solar_installation_position.html for comparing positional data. The technical report I. Reda, A. Andreas, "Solar Position Algorithm for Solar Radiation Applications", 2008, NREL/TP-560-34302 also contains an alternative algorithm and very detailed validation data sets.

Author
Mathias Bavay
Date
2010-06-10

#include <Suntrajectory.h>

Public Member Functions

 SunMeeus ()
 
 ~SunMeeus ()
 
 SunMeeus (const double &i_latitude, const double &i_longitude)
 
 SunMeeus (const double &i_latitude, const double &i_longitude, const double &i_julian, const double &i_TZ=0.)
 
void setDate (const double &i_julian, const double &i_TZ=0.)
 Set the date and time if no timezone is specified, GMT is assumed. More...
 
void setLatLon (const double &i_latitude, const double &i_longitude)
 
void setAll (const double &i_latitude, const double &i_longitude, const double &i_julian, const double &i_TZ=0.)
 
void reset ()
 
double getSolarElevation () const
 
double getSolarAzimuth () const
 
void getHorizontalCoordinates (double &azimuth, double &elevation) const
 
void getHorizontalCoordinates (double &azimuth, double &elevation, double &eccentricity) const
 
void getDaylight (double &sunrise, double &sunset, double &MeeusDaylight)
 
void getEquatorialSunVector (double &sunx, double &suny, double &sunz)
 
void getEquatorialCoordinates (double &right_ascension, double &declination)
 (http://en.wikipedia.org/wiki/Equatorial_coordinate_system) More...
 
- Public Member Functions inherited from mio::SunTrajectory
 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 double SideralToLocal (const double &JD)
 
- Static Public Member Functions inherited from mio::SunTrajectory
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)
 

Additional Inherited Members

virtual void update ()=0
 
- Protected Attributes inherited from mio::SunTrajectory
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 inherited from mio::SunTrajectory
static const double nodata
 

Constructor & Destructor Documentation

◆ SunMeeus() [1/3]

mio::SunMeeus::SunMeeus ( )

◆ ~SunMeeus()

mio::SunMeeus::~SunMeeus ( )
inline

◆ SunMeeus() [2/3]

mio::SunMeeus::SunMeeus ( const double &  i_latitude,
const double &  i_longitude 
)

◆ SunMeeus() [3/3]

mio::SunMeeus::SunMeeus ( const double &  i_latitude,
const double &  i_longitude,
const double &  i_julian,
const double &  i_TZ = 0. 
)

Member Function Documentation

◆ getDaylight()

void mio::SunMeeus::getDaylight ( double &  sunrise,
double &  sunset,
double &  MeeusDaylight 
)
virtual

Implements mio::SunTrajectory.

◆ getEquatorialCoordinates()

void mio::SunMeeus::getEquatorialCoordinates ( double &  right_ascension,
double &  declination 
)
virtual

◆ getEquatorialSunVector()

void mio::SunMeeus::getEquatorialSunVector ( double &  sunx,
double &  suny,
double &  sunz 
)

◆ getHorizontalCoordinates() [1/2]

void mio::SunMeeus::getHorizontalCoordinates ( double &  azimuth,
double &  elevation 
) const
virtual

Implements mio::SunTrajectory.

◆ getHorizontalCoordinates() [2/2]

void mio::SunMeeus::getHorizontalCoordinates ( double &  azimuth,
double &  elevation,
double &  eccentricity 
) const
virtual

Implements mio::SunTrajectory.

◆ getSolarAzimuth()

double mio::SunMeeus::getSolarAzimuth ( ) const
virtual

Implements mio::SunTrajectory.

◆ getSolarElevation()

double mio::SunMeeus::getSolarElevation ( ) const
virtual

(see http://en.wikipedia.org/wiki/Horizontal_coordinate_system) please remember that zenith_angle = 90 - elevation

Implements mio::SunTrajectory.

◆ reset()

void mio::SunMeeus::reset ( )
virtual

Implements mio::SunTrajectory.

◆ setAll()

void mio::SunMeeus::setAll ( const double &  i_latitude,
const double &  i_longitude,
const double &  i_julian,
const double &  i_TZ = 0. 
)
virtual

Implements mio::SunTrajectory.

◆ setDate()

void mio::SunMeeus::setDate ( const double &  i_julian,
const double &  i_TZ = 0. 
)
virtual

Set the date and time if no timezone is specified, GMT is assumed.

Parameters
i_julianjulian date in the time zone of interest
i_TZtime zone

Implements mio::SunTrajectory.

◆ setLatLon()

void mio::SunMeeus::setLatLon ( const double &  i_latitude,
const double &  i_longitude 
)
virtual

Implements mio::SunTrajectory.

◆ SideralToLocal()

double mio::SunMeeus::SideralToLocal ( const double &  JD)
static

The documentation for this class was generated from the following files: