|
SASHE_VAP
1.0
|
Macros | |
| #define | PI 3.141592653589793 |
| The value of PI. | |
| #define | TWO_PI 6.283185307179586 |
| The value of 2 * PI. | |
| #define | DEG_TO_RAD(a) (a * 0.017453292519943) |
| Convert degrees to radians. | |
| #define | RAD_TO_DEG(a) (a * 57.29577951308232) |
| Convert radians to degrees. | |
| #define | IS_LEAP_YEAR(y) (((y%4) == 0 && (y%100) != 0) || (y%400) == 0) |
| Determine if a 4 digit year is a leap year. | |
| #define | SECS1970_TO_J2000(s) ((s - 946728000.0)/86400.0) |
| Convert seconds since 1970 to days since 2000-01-01 12:00:00. | |
| #define | JD_TO_J2000(JD) (JD - 2451545.0) |
| Convert Julian Day to days since 2000-01-01 12:00:00. | |
| #define | SZA_TO_AIRMASS(sza) (1.0 / (cos(DEG_TO_RAD(sza)) + 0.50572 * pow((96.07995 - sza), -1.6364))) |
| Get the airmass corresponding to a solar zenith angle. | |
Functions | |
| double | get_julian_day (int year, int month, int day, int hour, int minute, int second) |
| Get the Julian day from a calendar date (UT). | |
| double | get_solar_distance (double days_J2000) |
| Get the distance from the Earth to the Sun. | |
| double | get_solar_distance_AA1990 (double days_J2000) |
| Get the distance from the Earth to the Sun. | |
| #define JD_TO_J2000 | ( | JD | ) | (JD - 2451545.0) |
Convert Julian Day to days since 2000-01-01 12:00:00.
Definition at line 72 of file solar_utils.h.
| #define SZA_TO_AIRMASS | ( | sza | ) | (1.0 / (cos(DEG_TO_RAD(sza)) + 0.50572 * pow((96.07995 - sza), -1.6364))) |
Get the airmass corresponding to a solar zenith angle.
Where sza is the apparent solar zenith angle in degrees.
Kasten, F. and Young, A. 1989. Revised optical air mass tables and approximation formula. Applied Optics 28 (22), pp. 4735-4738
Definition at line 85 of file solar_utils.h.
| double get_julian_day | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | hour, | ||
| int | minute, | ||
| int | second | ||
| ) |
Get the Julian day from a calendar date (UT).
This function is based the JavaScript routines provided by NOAA at:
http://www.srrb.noaa.gov/highlights/sunrise/calcdetails.html
which were base on Jean Meeus's book "Astronomical Algorithms".
| year | 4 digit year |
| month | [1 - 12] |
| day | [1 - 31] |
| hour | [0 - 23] |
| minute | [0 - 59] |
| second | [0 - 59] |
Definition at line 53 of file solar_utils.c.
| double get_solar_distance | ( | double | days_J2000 | ) |
Get the distance from the Earth to the Sun.
This function is based the JavaScript routines provided by NOAA at:
http://www.srrb.noaa.gov/highlights/sunrise/calcdetails.html
which were base on Jean Meeus's book "Astronomical Algorithms".
This function can report values between the years -2000 and +3000.
| days_J2000 | days since 2000-01-01 12:00:00 |
Definition at line 91 of file solar_utils.c.
| double get_solar_distance_AA1990 | ( | double | days_J2000 | ) |
Get the distance from the Earth to the Sun.
Algorithm from the Astronomical Almanac 1990, C24.
This function can report values between the years 1950 and 2050.
| days_J2000 | days since 2000-01-01 12:00:00 |
Definition at line 132 of file solar_utils.c.