SAGA API
v9.6
|
#include "api_core.h"
Go to the source code of this file.
Classes | |
class | CSG_TimeSpan |
class | CSG_DateTime |
Simplified wrappers for wxDateTime and related classes including functions for the calculation of the Sun's position and the day length.
Definition in file datetime.h.
SAGA_API_DLL_EXPORT double SG_Date_To_JulianDayNumber | ( | const CSG_String & | Date | ) |
Returns the Julian Day Number.
Definition at line 746 of file datetime.cpp.
References CSG_String::AfterFirst(), CSG_String_Tokenizer::Get_Next_Token(), CSG_String_Tokenizer::Get_Tokens_Count(), CSG_String::Length(), and SG_Date_To_JulianDayNumber().
SAGA_API_DLL_EXPORT double SG_Date_To_JulianDayNumber | ( | int | y, |
int | m, | ||
int | d | ||
) |
Returns the Julian Day Number calculated from Gregorian date (year, month, day).
Definition at line 729 of file datetime.cpp.
Referenced by CSG_Table_Value_Date::Set_Value(), and SG_Date_To_JulianDayNumber().
SAGA_API_DLL_EXPORT double SG_Get_Day_Length | ( | const CSG_DateTime & | Date, |
double | Latitude | ||
) |
Definition at line 927 of file datetime.cpp.
References CSG_DateTime::Get_DayOfYear(), and SG_Get_Day_Length().
SAGA_API_DLL_EXPORT double SG_Get_Day_Length | ( | int | DayOfYear, |
double | Latitude | ||
) |
Definition at line 913 of file datetime.cpp.
References M_DEG_TO_RAD, and M_PI.
Referenced by SG_Get_Day_Length().
SAGA_API_DLL_EXPORT int SG_Get_Day_MidOfMonth | ( | int | Month, |
bool | bLeapYear | ||
) |
Returns the day number (starting with zero for the first of January) for the mid of the requested month (January = 0).
Definition at line 784 of file datetime.cpp.
SAGA_API_DLL_EXPORT bool SG_Get_Sun_Position | ( | const CSG_DateTime & | Time, |
double & | RA, | ||
double & | Dec | ||
) |
Definition at line 862 of file datetime.cpp.
References CSG_DateTime::Get_JDN(), and SG_Get_Sun_Position().
SAGA_API_DLL_EXPORT bool SG_Get_Sun_Position | ( | const CSG_DateTime & | Time, |
double | Longitude, | ||
double | Latitude, | ||
double & | Height, | ||
double & | Azimuth | ||
) |
Definition at line 902 of file datetime.cpp.
References CSG_DateTime::Get_JDN(), and SG_Get_Sun_Position().
SAGA_API_DLL_EXPORT bool SG_Get_Sun_Position | ( | double | JulianDayNumber, |
double & | RA, | ||
double & | Dec | ||
) |
Calculates the Sun's position for given date and time as declination and right ascension angles (radians). Solar coordinates according to Jean Meeus: Astronomical Algorithms, accuracy of 0.01 degree
Definition at line 835 of file datetime.cpp.
References M_DEG_TO_RAD.
Referenced by SG_Get_Sun_Position().
SAGA_API_DLL_EXPORT bool SG_Get_Sun_Position | ( | double | JulianDayNumber, |
double | Longitude, | ||
double | Latitude, | ||
double & | Height, | ||
double & | Azimuth | ||
) |
Calculates the Sun's position for given date and time and position on Earth as given by longitude and latitude (radians). Height and Azimuth are calculated as radians. Returns true if Sun is above horizon.
Definition at line 875 of file datetime.cpp.
References M_DEG_TO_RAD, and SG_Get_Sun_Position().
SAGA_API_DLL_EXPORT CSG_String SG_JulianDayNumber_To_Date | ( | double | JDN | ) |
Calculates Gregorian date from Julian Day Number and returns it as ISO 8601 string (yyyy-mm-dd).
Definition at line 698 of file datetime.cpp.
References CSG_String::Printf(), and SG_JulianDayNumber_To_Date().
SAGA_API_DLL_EXPORT bool SG_JulianDayNumber_To_Date | ( | double | JDN, |
int & | y, | ||
int & | m, | ||
int & | d | ||
) |
Expects 'Value' to be the Julian Day Number.
Definition at line 678 of file datetime.cpp.
Referenced by CSG_Table_Value_Date::Set_Value(), and SG_JulianDayNumber_To_Date().
SAGA_API_DLL_EXPORT CSG_String SG_JulianDayNumber_To_Date | ( | int | JDN | ) |
Calculates Gregorian date from Julian Day Number and returns it as ISO 8601 string (yyyy-mm-dd).
Definition at line 719 of file datetime.cpp.
References SG_JulianDayNumber_To_Date().