StelUtils.hpp   StelUtils.hpp 
skipping to change at line 49 skipping to change at line 49
{ {
//! Return the full name of stellarium, i.e. "stellarium 0.9.0" //! Return the full name of stellarium, i.e. "stellarium 0.9.0"
QString getApplicationName(); QString getApplicationName();
//! Return the version of stellarium, i.e. "0.9.0" //! Return the version of stellarium, i.e. "0.9.0"
QString getApplicationVersion(); QString getApplicationVersion();
//! Convert an angle in hms format to radian. //! Convert an angle in hms format to radian.
//! @param h hour component //! @param h hour component
//! @param m minute component //! @param m minute component
//! @param s second component //! @param s second component
//! @return angle in radian //! @return angle in radian
double hmsToRad(unsigned int h, unsigned int m, double s); double hmsToRad(const unsigned int h, const unsigned int m, const do uble s);
//! Convert an angle in +-dms format to radian. //! Convert an angle in +-dms format to radian.
//! @param d degree component //! @param d degree component
//! @param m arcmin component //! @param m arcmin component
//! @param s arcsec component //! @param s arcsec component
//! @return angle in radian //! @return angle in radian
double dmsToRad(int d, unsigned int m, double s); double dmsToRad(const int d, const unsigned int m, const double s);
//! Convert an angle in radian to hms format. //! Convert an angle in radian to hms format.
//! @param rad input angle in radian //! @param rad input angle in radian
//! @param h hour component //! @param h hour component
//! @param m minute component //! @param m minute component
//! @param s second component //! @param s second component
void radToHms(double rad, unsigned int& h, unsigned int& m, double& s); void radToHms(double rad, unsigned int& h, unsigned int& m, double& s);
//! Convert an angle in radian to +-dms format. //! Convert an angle in radian to +-dms format.
//! @param rad input angle in radian //! @param rad input angle in radian
//! @param sign true if positive, false otherwise //! @param sign true if positive, false otherwise
//! @param d degree component //! @param d degree component
//! @param m minute component //! @param m minute component
//! @param s second component //! @param s second component
void radToDms(double rad, bool& sign, unsigned int& d, unsigned int& m, double& s); void radToDms(double rad, bool& sign, unsigned int& d, unsigned int& m, double& s);
//! Convert an angle in radian to a hms formatted string. //! Convert an angle in radian to a hms formatted string.
//! If the second, minute part is == 0, it is not output //! If the second, minute part is == 0, it is not output
//! @param angle input angle in radian //! @param angle input angle in radian
QString radToHmsStrAdapt(double angle); QString radToHmsStrAdapt(const double angle);
//! Convert an angle in radian to a hms formatted string. //! Convert an angle in radian to a hms formatted string.
//! @param angle input angle in radian //! @param angle input angle in radian
//! @param decimal output decimal second value //! @param decimal output decimal second value
QString radToHmsStr(double angle, bool decimal=false); QString radToHmsStr(const double angle, const bool decimal=false);
//! Convert an angle in radian to a dms formatted string. //! Convert an angle in radian to a dms formatted string.
//! If the second, minute part is == 0, it is not output //! If the second, minute part is == 0, it is not output
//! @param angle input angle in radian //! @param angle input angle in radian
//! @param useD Define if letter "d" must be used instead of deg sig n //! @param useD Define if letter "d" must be used instead of deg sig n
QString radToDmsStrAdapt(double angle, bool useD=false); QString radToDmsStrAdapt(const double angle, const bool useD=false);
//! Convert an angle in radian to a dms formatted string. //! Convert an angle in radian to a dms formatted string.
//! @param angle input angle in radian //! @param angle input angle in radian
//! @param useD Define if letter "d" must be used instead of deg sig n //! @param useD Define if letter "d" must be used instead of deg sig n
//! @param decimal output decimal second value //! @param decimal output decimal second value
QString radToDmsStr(double angle, bool decimal=false, bool useD=fals e); QString radToDmsStr(const double angle, const bool decimal=false, co nst bool useD=false);
//! Convert a dms formatted string to an angle in radian //! Convert a dms formatted string to an angle in radian
//! @param s The input string //! @param s The input string
double dmsStrToRad(const QString& s); double dmsStrToRad(const QString& s);
//! Obtains a Vec3f from a string. //! Obtains a Vec3f from a string.
//! @param s the string describing the Vector with the form "x,y,z" //! @param s the string describing the Vector with the form "x,y,z"
//! @return The corresponding vector //! @return The corresponding vector
//! @deprecated Use the >> operator from Vec3f class //! @deprecated Use the >> operator from Vec3f class
Vec3f strToVec3f(const QStringList& s); Vec3f strToVec3f(const QStringList& s);
skipping to change at line 121 skipping to change at line 121
QString vec3fToHtmlColor(const Vec3f& v); QString vec3fToHtmlColor(const Vec3f& v);
//! Converts a color in HTML notation to a Vec3f. //! Converts a color in HTML notation to a Vec3f.
//! @param c The HTML spec color string //! @param c The HTML spec color string
Vec3f htmlColorToVec3f(const QString& c); Vec3f htmlColorToVec3f(const QString& c);
//! Convert from spherical coordinates to Rectangular direction. //! Convert from spherical coordinates to Rectangular direction.
//! @param lng longitude in radian //! @param lng longitude in radian
//! @param lat latitude in radian //! @param lat latitude in radian
//! @param v the resulting 3D unit vector //! @param v the resulting 3D unit vector
void spheToRect(double lng, double lat, Vec3d& v); void spheToRect(const double lng, const double lat, Vec3d& v);
//! Convert from spherical coordinates to Rectangular direction. //! Convert from spherical coordinates to Rectangular direction.
//! @param lng longitude in radian //! @param lng longitude in radian
//! @param lat latitude in radian //! @param lat latitude in radian
//! @param v the resulting 3D unti vector //! @param v the resulting 3D unti vector
void spheToRect(float lng, float lat, Vec3f& v); void spheToRect(const float lng, const float lat, Vec3f& v);
//! Convert from spherical coordinates to Rectangular direction. //! Convert from spherical coordinates to Rectangular direction.
//! @param lng double* to store longitude in radian //! @param lng double* to store longitude in radian
//! @param lat double* to store latitude in radian //! @param lat double* to store latitude in radian
//! @param v the input 3D vector //! @param v the input 3D vector
void rectToSphe(double *lng, double *lat, const Vec3d& v); void rectToSphe(double *lng, double *lat, const Vec3d& v);
//! Convert from spherical coordinates to Rectangular direction. //! Convert from spherical coordinates to Rectangular direction.
//! @param lng float* to store longitude in radian //! @param lng float* to store longitude in radian
//! @param lat float* to store latitude in radian //! @param lat float* to store latitude in radian
skipping to change at line 175 skipping to change at line 175
//! The degree separator may be a degree symbol (\\xBA) in addition //! The degree separator may be a degree symbol (\\xBA) in addition
//! to a 'd' or 'D'. //! to a 'd' or 'D'.
//! @return the angle in radians. //! @return the angle in radians.
//! Latitude: North are positive, South are negative. //! Latitude: North are positive, South are negative.
//! Longitude: East is positive, West is negative. //! Longitude: East is positive, West is negative.
//! Note: if there is a N, S, E or W suffix, any leading + or - //! Note: if there is a N, S, E or W suffix, any leading + or -
//! characters are ignored. //! characters are ignored.
double getDecAngle(const QString& str); double getDecAngle(const QString& str);
//! Check if a number is a power of 2. //! Check if a number is a power of 2.
bool isPowerOfTwo(int value); bool isPowerOfTwo(const int value);
//! Return the first power of two greater or equal to the given valu e. //! Return the first power of two greater or equal to the given valu e.
int smallestPowerOfTwoGreaterOrEqualTo(int value); int smallestPowerOfTwoGreaterOrEqualTo(const int value);
//! Return the smallest size with power-of two dimensions at least a s large as given size. //! Return the smallest size with power-of two dimensions at least a s large as given size.
QSize smallestPowerOfTwoSizeGreaterOrEqualTo(const QSize base); QSize smallestPowerOfTwoSizeGreaterOrEqualTo(const QSize base);
//! Return the inverse sinus hyperbolic of z. //! Return the inverse sinus hyperbolic of z.
double asinh(double z); double asinh(const double z);
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
// New Qt based General Calendar Functions. // New Qt based General Calendar Functions.
//! Make from julianDay a year, month, day for the Julian Date julia nDay represents. //! Make from julianDay a year, month, day for the Julian Date julia nDay represents.
void getDateFromJulianDay(double julianDay, int *year, int *month, i nt *day); void getDateFromJulianDay(const double julianDay, int *year, int *mo nth, int *day);
//! Make from julianDay an hour, minute, second. //! Make from julianDay an hour, minute, second.
void getTimeFromJulianDay(double julianDay, int *hour, int *minute, int *second); void getTimeFromJulianDay(const double julianDay, int *hour, int *mi nute, int *second);
//! Parse an ISO8601 date string. //! Parse an ISO8601 date string.
//! Also handles negative and distant years. //! Also handles negative and distant years.
bool getDateTimeFromISO8601String(const QString& iso8601Date, int* y , int* m, int* d, int* h, int* min, float* s); bool getDateTimeFromISO8601String(const QString& iso8601Date, int* y , int* m, int* d, int* h, int* min, float* s);
//! Format the given Julian Day in (UTC) ISO8601 date string. //! Format the given Julian Day in (UTC) ISO8601 date string.
//! Also handles negative and distant years. //! Also handles negative and distant years.
QString julianDayToISO8601String(double jd); QString julianDayToISO8601String(const double jd);
//! Return the Julian Date matching the ISO8601 date string. //! Return the Julian Date matching the ISO8601 date string.
//! Also handles negative and distant years. //! Also handles negative and distant years.
double getJulianDayFromISO8601String(const QString& iso8601Date, boo l* ok); double getJulianDayFromISO8601String(const QString& iso8601Date, boo l* ok);
//! Format the date and day-of-week per the format in fmt //! Format the date and day-of-week per the format in fmt
//! (see QDateTime::toString()). Uses the @b system locale, not //! (see QDateTime::toString()). Uses the @b system locale, not
//! the one set in Stellarium. //! the one set in Stellarium.
//! @return QString representing the formatted date //! @return QString representing the formatted date
QString localeDateString(int year, int month, int day, int dayOfWeek , QString fmt); QString localeDateString(const int year, const int month, const int day, const int dayOfWeek, const QString fmt);
//! Format the date and day-of-week per the @b system locale's //! Format the date and day-of-week per the @b system locale's
//! QLocale::ShortFormat. //! QLocale::ShortFormat.
//! @return QString representing the formatted date //! @return QString representing the formatted date
QString localeDateString(int year, int month, int day, int dayOfWeek ); QString localeDateString(const int year, const int month, const int day, const int dayOfWeek);
//! Get the current Julian Date from system time. //! Get the current Julian Date from system time.
//! @return the current Julian Date //! @return the current Julian Date
double getJDFromSystem(); double getJDFromSystem();
//! Convert a time of day to the fraction of a Julian Day. //! Convert a time of day to the fraction of a Julian Day.
//! Note that a Julian Day starts at 12:00, not 0:00, and //! Note that a Julian Day starts at 12:00, not 0:00, and
//! so 12:00 == 0.0 and 0:00 == 0.5 //! so 12:00 == 0.0 and 0:00 == 0.5
double qTimeToJDFraction(const QTime& time); double qTimeToJDFraction(const QTime& time);
//! Convert a fraction of a Julian Day to a QTime //! Convert a fraction of a Julian Day to a QTime
QTime jdFractionToQTime(double jd); QTime jdFractionToQTime(const double jd);
//! Return number of hours offset from GMT, using Qt functions. //! Return number of hours offset from GMT, using Qt functions.
float getGMTShiftFromQT(double jd); float getGMTShiftFromQT(const double jd);
//! Convert a QT QDateTime class to julian day. //! Convert a QT QDateTime class to julian day.
//! @param dateTime the UTC QDateTime to convert //! @param dateTime the UTC QDateTime to convert
//! @result the matching decimal Julian Day //! @result the matching decimal Julian Day
double qDateTimeToJd(const QDateTime& dateTime); double qDateTimeToJd(const QDateTime& dateTime);
//! Convert a julian day to a QDateTime. //! Convert a julian day to a QDateTime.
//! @param jd to convert //! @param jd to convert
//! @result the matching UTC QDateTime //! @result the matching UTC QDateTime
QDateTime jdToQDateTime(const double& jd); QDateTime jdToQDateTime(const double& jd);
bool getJDFromDate(double* newjd, int y, int m, int d, int h, int mi //! Compute Julian day number from calendar date.
n, int s); //! Uses QDate functionality if possible, but also works for negativ
e JD.
//! Dates before 1582-10-15 are in the Julian Calendar.
//! @param newjd pointer to JD
//! @param y Calendar year.
//! @param m month, 1=January ... 12=December
//! @param d day
//! @param h hour
//! @param min minute
//! @param s second
//! @result true in all conceivable cases.
bool getJDFromDate(double* newjd, const int y, const int m, const in
t d, const int h, const int min, const int s);
int numberOfDaysInMonthInYear(int month, int year); int numberOfDaysInMonthInYear(const int month, const int year);
bool changeDateTimeForRollover(int oy, int om, int od, int oh, int o min, int os, bool changeDateTimeForRollover(int oy, int om, int od, int oh, int o min, int os,
int* ry, int* rm, int* rd, int* rh, int* rmin, int* rs); int* ry, int* rm, int* rd, int* rh, int* rmin, int* rs);
//! Output a QVariantMap to qDebug(). Formats like a tree where the re are nested objects. //! Output a QVariantMap to qDebug(). Formats like a tree where the re are nested objects.
void debugQVariantMap(const QVariant& m, const QString& indent="", c onst QString& key=""); void debugQVariantMap(const QVariant& m, const QString& indent="", c onst QString& key="");
/// Compute acos(x) /// Compute acos(x)
//! The taylor serie is not accurate around x=1 and x=-1 //! The taylor serie is not accurate around x=1 and x=-1
inline float fastAcos(float x) inline float fastAcos(const float x)
{ {
return M_PI_2 - (x + x*x*x * (1.f/6.f + x*x * (3.f/40.f + 5. f/112.f * x*x)) ); return M_PI_2 - (x + x*x*x * (1.f/6.f + x*x * (3.f/40.f + 5. f/112.f * x*x)) );
} }
//! Compute exp(x) for small exponents x //! Compute exp(x) for small exponents x
inline float fastExp(float x) inline float fastExp(const float x)
{ {
return (x>=0)? return (x>=0)?
(1.f + x*(1.f+ x/2.f*(1.f+ x/3.f*(1.f+x/4.f*(1.f+x/5 .f))))): (1.f + x*(1.f+ x/2.f*(1.f+ x/3.f*(1.f+x/4.f*(1.f+x/5 .f))))):
1.f / (1.f -x*(1.f -x/2.f*(1.f- x/3.f*(1.f-x /4.f*(1.f-x/5.f))))); 1.f / (1.f -x*(1.f -x/2.f*(1.f- x/3.f*(1.f-x /4.f*(1.f-x/5.f)))));
} }
//! Get a night mode version of a color. That is find the brightnes s of a color and set that in the //! Get a night mode version of a color. That is find the brightnes s of a color and set that in the
//! red channel only //! red channel only
inline Vec3f getNightColor(const Vec3f& dayColor) inline Vec3f getNightColor(const Vec3f& dayColor)
{ {
float max = 0.0; float max = 0.0;
for(int i=0; i<3; i++) for(int i=0; i<3; i++)
{ {
max = dayColor[i] > max ? dayColor[i] : max; max = dayColor[i] > max ? dayColor[i] : max;
} }
return Vec3f(max, 0, 0); return Vec3f(max, 0, 0);
} }
//! Calculate and getting sidereal period in days from semi-major ax is (in AU) //! Calculate and getting sidereal period in days from semi-major ax is (in AU)
double calculateSiderealPeriod(double SemiMajorAxis); double calculateSiderealPeriod(const double SemiMajorAxis);
//! Calculate duration of mean solar day QString hoursToHmsStr(const double hours);
double calculateSolarDay(double siderealPeriod, double siderealDay,
bool forwardDirection);
QString hoursToHmsStr(double hours);
//! Get the number of seconds since program start. //! Get the number of seconds since program start.
//! //!
//! @note This is implemented in platform-specific ways to be as pre cise //! @note This is implemented in platform-specific ways to be as pre cise
//! as possible, but there is a fallback for other platforms t hat //! as possible, but there is a fallback for other platforms t hat
//! might not be precise at all. //! might not be precise at all.
//! This is currently used e.g. to measure FPS, but it should never //! This is currently used e.g. to measure FPS, but it should never
//! be used for critical functionality. //! be used for critical functionality.
long double secondsSinceStart(); long double secondsSinceStart();
//! Get Delta-T estimation for a given date. //! Get Delta-T estimation for a given date.
//! Note that this method is valid for the year range: //! Note that this method is valid for the year range:
//! -1999 to +3000, outside of which "0" will be returned. //! -1999 to +3000, outside of which "0" will be returned.
// GZ: I don't see this returning 0. There is always a rough estimat
e beyond that.
//! Implementation of algorithm by Espenak & Meeus (2006) for DeltaT
computation
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByEspenakMeeus(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Schoch (1931) for DeltaT computat
ion,
//! outdated but may be useful for science-historical purposes.
//! Source: Schoch, C. (1931). Die sekulare Accelaration des Mondes
und der Sonne.
//! Astronomische Abhandlungen, Ergnzungshefte zu den Astronomischen
Nachrichten,
//! Band 8, B2. Kiel.
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTBySchoch(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Clemence (1948) for DeltaT comput
ation,
//! outdated but may be useful for science-historical purposes.
//! Source: On the system of astronomical constants.
//! Clemence, G. M.
//! Astronomical Journal, Vol. 53, p. 169
//! 1948AJ.....53..169C [http://adsabs.harvard.edu/abs/1948AJ.....53
..169C]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByClemence(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by IAU (1952) for DeltaT computation
,
//! outdated but may be useful for science-historical purposes.
//! Source: Spencer Jones, H., "The Rotation of the Earth, and the S
ecular Accelerations of the Sun, Moon and Planets",
//! Monthly Notices of the Royal Astronomical Society, 99 (1939), 54
1-558
//! http://adsabs.harvard.edu/abs/1939MNRAS..99..541S
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByIAU(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Astronomical Ephemeris (1960) for
DeltaT computation.
//! Sources: Spencer Jones, H., "The Rotation of the Earth, and the
Secular Accelerations of the Sun, Moon and Planets",
//! Monthly Notices of the Royal Astronomical Society, 99 (1939), 54
1-558
//! http://adsabs.harvard.edu/abs/1939MNRAS..99..541S
//! or Explanatory Supplement to the Astr. Ephemeris, 1961, p.87.
//! Also used by Mucke&Meeus, Canon of Solar Eclipses, Vienna 1983.
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByAstronomicalEphemeris(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Tuckerman (1962, 1964) & Goldstin
e (1973) for DeltaT computation
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByTuckermanGoldstine(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Muller & Stephenson (1975) for De
ltaT computation.
//! Source: The accelerations of the earth and moon from early astro
nomical observations
//! Muller, P. M.; Stephenson, F. R.
//! Growth rhythms and the history of the earth's rotation; Proceedi
ngs of the Interdisciplinary
//! Winter Conference on Biological Clocks and Changes in the Earth'
s Rotation: Geophysical and
//! Astronomical Consequences, Newcastle-upon-Tyne, England, January
8-10, 1974. (A76-18126 06-46)
//! London, Wiley-Interscience, 1975, p. 459-533; Discussion, p. 534
.
//! 1975grhe.conf..459M [http://adsabs.harvard.edu/abs/1975grhe.conf
..459M]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByMullerStephenson(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Stephenson (1978) for DeltaT comp
utation.
//! Source: Pre-Telescopic Astronomical Observations
//! Stephenson, F. R.
//! Tidal Friction and the Earth's Rotation, Proceedings of a Worksh
op, held in Bielefeld,
//! September 26-30, 1977, Edited by P. Brosche, and J. Sundermann.
Berlin: Springer-Verlag, 1978, p.5
//! 1978tfer.conf....5S [http://adsabs.harvard.edu/abs/1978tfer.conf
....5S]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByStephenson1978(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Stephenson (1997) for DeltaT comp
utation.
//! Source: Book "Historical Eclipses and Earth's Rotation" by F. R.
Stephenson (1997)
//! http://ebooks.cambridge.org/ebook.jsf?bid=CBO9780511525186
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByStephenson1997(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Schmadel & Zech (1979) for DeltaT
computation.
//! Outdated, but may be useful for science-historical purposes.
//! Source: Polynomial approximations for the correction delta T E.T
.-U.T. in the period 1800-1975
//! Schmadel, L. D.; Zech, G.
//! Acta Astronomica, vol. 29, no. 1, 1979, p. 101-104.
//! 1979AcA....29..101S [http://adsabs.harvard.edu/abs/1979AcA....29
..101S]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTBySchmadelZech1979(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Morrison & Stephenson (1982) for
DeltaT computation
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByMorrisonStephenson1982(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Stephenson & Morrison (1984) for
DeltaT computation
//! Source: Long-term changes in the rotation of the earth - 700 B.C
. to A.D. 1980.
//! Stephenson, F. R.; Morrison, L. V.
//! Philosophical Transactions, Series A (ISSN 0080-4614), vol. 313,
no. 1524, Nov. 27, 1984, p. 47-70.
//! 1984RSPTA.313...47S [http://adsabs.harvard.edu/abs/1984RSPTA.313
...47S]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds or Zero if date outside years -391..1
600
double getDeltaTByStephensonMorrison1984(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Stephenson & Morrison (1995) for
DeltaT computation
//! Source: Long-Term Fluctuations in the Earth's Rotation: 700 BC t
o AD 1990.
//! Stephenson, F. R.; Morrison, L. V.
//! Philosophical Transactions: Physical Sciences and Engineering, V
olume 351, Issue 1695, pp. 165-202
//! 1995RSPTA.351..165S [http://adsabs.harvard.edu/abs/1995RSPTA.351
..165S]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByStephensonMorrison1995(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Stephenson & Houlden (1986) for D
eltaT computation
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds or 0 if year > 1600
double getDeltaTByStephensonHoulden(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Espenak (1987, 1989) for DeltaT c
omputation.
//! This relation should not be used before around 1950 or after aro
und 2100 (Espenak, pers. comm.).
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByEspenak(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Borkowski (1988) for DeltaT compu
tation.
//! Source: ELP 2000-85 and the dynamic time-universal time relation
//! Borkowski, K. M.
//! Astronomy and Astrophysics (ISSN 0004-6361), vol. 205, no. 1-2,
Oct. 1988, p. L8-L10.
//! 1988A&A...205L...8B [http://adsabs.harvard.edu/abs/1988A&A...205
L...8B]
//! @param jDay the date and time expressed as a julian day //! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds //! @return Delta-T in seconds
double getDeltaT(double jDay); double getDeltaTByBorkowski(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Schmadel & Zech (1988) for DeltaT
computation.
//! Source: Empirical Transformations from U.T. to E.T. for the Peri
od 1800-1988
//! Schmadel, L. D.; Zech, G.
//! Astronomische Nachrichten 309, 219-221
//! 1988AN....309..219S [http://adsabs.harvard.edu/abs/1988AN....309
..219S]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTBySchmadelZech1988(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Chapront-Touzé & Chapront (1991)
for DeltaT computation
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds or 0 if year not in -391..1600
double getDeltaTByChaprontTouze(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of the "historical" part of the algorithm by JPL
Horizons for DeltaT computation.
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds or 0 if year not in -2999..1620 (!)
double getDeltaTByJPLHorizons(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Morrison & Stephenson (2004, 2005
) for DeltaT computation.
//! Sources: Historical values of the Earth's clock error ΔT and the
calculation of eclipses
//! Morrison, L. V.; Stephenson, F. R.
//! Journal for the History of Astronomy (ISSN 0021-8286), Vol. 35,
Part 3, No. 120, p. 327 - 336 (2004)
//! 2004JHA....35..327M [http://adsabs.harvard.edu/abs/2004JHA....35
..327M]
//! Addendum: Historical values of the Earth's clock error
//! Morrison, L. V.; Stephenson, F. R.
//! Journal for the History of Astronomy (ISSN 0021-8286), Vol. 36,
Part 3, No. 124, p. 339 (2005)
//! 2005JHA....36..339M [http://adsabs.harvard.edu/abs/2005JHA....36
..339M]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByMorrisonStephenson2004(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Reijs (2006) for DeltaT computati
on
//! Details: http://www.iol.ie/~geniet/eng/DeltaTeval.htm
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByReijs(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Chapront, Chapront-Touze & Franco
u (1997) & Meeus (1998) for DeltaT computation
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByChaprontMeeus(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Meeus & Simons (2000) for DeltaT
computation.
//! Source: Polynomial approximations to Delta T, 1620-2000 AD
//! Meeus, J.; Simons, L.
//! Journal of the British Astronomical Association, vol.110, no.6,
323
//! 2000JBAA..110..323M [http://adsabs.harvard.edu/abs/2000JBAA..110
..323M]
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds or 0 if year not in 1620..2000
double getDeltaTByMeeusSimons(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Montenbruck & Pfleger (2000) for
DeltaT computation,
//! a data fit through the table of values found in Meeus, Astronomi
cal algorithms (1991).
//! Book "Astronomy on the Personal Computer" by O. Montenbruck & T.
Pfleger (4th ed., 2000)
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds or 0 if not 1825<=year<2005
double getDeltaTByMontenbruckPfleger(const double jDay);
//! Get Delta-T estimation for a given date.
//! Implementation of algorithm by Reingold & Dershowitz (1997, 2001
, 2002, 2007) for DeltaT computation.
//! This is again mostly a data fit based on the table in Meeus, Ast
ronomical Algorithms (1991).
//! This is the version given in the 3rd edition (2007) which added
the fit for 1700..1799 omitted from previous editions.
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T in seconds
double getDeltaTByReingoldDershowitz(const double jDay);
//! Get Secular Acceleration estimation for a given year. //! Get Secular Acceleration estimation for a given year.
//! Method described is here: http://eclipse.gsfc.nasa.gov/SEcat5/se
cular.html
//! For adapting from -26 to -25.858, use -0.91072 * (-25.858 + 26.0
) = -0.12932224
//! For adapting from -26 to -23.895, use -0.91072 * (-23.895 + 26.0
) = -1.9170656
//! @param jDay the JD //! @param jDay the JD
//! @param ndot value n-dot which use in the algorithm
//! @return SecularAcceleration in seconds //! @return SecularAcceleration in seconds
double getMoonSecularAcceleration(double jDay); //! @note n-dot for secular acceleration of the Moon in ELP2000-82B
is -23.8946 "/cy/cy
double getMoonSecularAcceleration(const double jDay, const double nd
ot);
//! Get the standard error (sigma) for the value of DeltaT
//! @param jDay the JD
//! @return sigma in seconds
double getDeltaTStandardError(const double jDay);
} }
#endif // _STELUTILS_HPP_ #endif // _STELUTILS_HPP_
 End of changes. 34 change blocks. 
36 lines changed or deleted 345 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/