StelUtils.hpp   StelUtils.hpp 
skipping to change at line 136 skipping to change at line 136
//! @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
//! @param v the input 3D vector //! @param v the input 3D vector
void rectToSphe(float *lng, float *lat, const Vec3d& v); void rectToSphe(float *lng, float *lat, const Vec3d& v);
//! Convert from spherical coordinates to Rectangular direction.
//! @param lng float* to store longitude in radian
//! @param lat float* to store latitude in radian
//! @param v the input 3D vector
void rectToSphe(float *lng, float *lat, const Vec3f& v);
//! Convert a string longitude, latitude, RA or Declination angle //! Convert a string longitude, latitude, RA or Declination angle
//! to radians. //! to radians.
//! @param str the angle in format something like these: //! @param str the angle in format something like these:
//! - +53d 51'21.6" //! - +53d 51'21.6"
//! - +53d51'21.6" //! - +53d51'21.6"
//! - -1d 10'31.8" //! - -1d 10'31.8"
//! - +46d6'31" //! - +46d6'31"
//! - 50D46'0"N //! - 50D46'0"N
//! - 123D47'59"W //! - 123D47'59"W
//! - 123.567 N //! - 123.567 N
skipping to change at line 175 skipping to change at line 181
double asinh(double z); double asinh(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(double julianDay, int *year, int *month, i nt *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(double julianDay, int *hour, int *minute, int *second);
//! Utility for formatting to a simple iso 8601 string. //! Parse an ISO8601 date string.
QString sixIntsToIsoString( int year, int month, int day, int hour, //! Also handles negative and distant years.
int minute, int second ); bool getDateTimeFromISO8601String(const QString& iso8601Date, int* y
, int* m, int* d, int* h, int* min, float* s);
QString jdToIsoString(double jd);
//! Format the given Julian Day in (UTC) ISO8601 date string.
//! Also handles negative and distant years.
QString julianDayToISO8601String(double jd);
//! Return the Julian Date matching the ISO8601 date string.
//! Also handles negative and distant years.
double getJulianDayFromISO8601String(const QString& iso8601Date, boo
l* ok);
//! Format the date and day-of-week per the format in fmt (see QDate Time::toString()). //! Format the date and day-of-week per the format in fmt (see QDate Time::toString()).
//! @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(int year, int month, int day, int dayOfWeek , QString fmt);
//! Format the date and day-of-week per the default locale's QLocale ::ShortFormat. //! Format the date and day-of-week per the default locale's 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(int year, int month, int day, 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(void); 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(const double jd); QTime jdFractionToQTime(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(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 n, int s); bool getJDFromDate(double* newjd, int y, int m, int d, int h, int mi n, int s);
int numberOfDaysInMonthInYear(int month, int year); int numberOfDaysInMonthInYear(int month, 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="");
//! Use RegExp for final to parse a QString to six ints, use in the
event QDateTime cannot handle the date.
QList<int> getIntsFromISO8601String(const QString& iso8601Date);
/// 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(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(float x)
{ {
 End of changes. 6 change blocks. 
12 lines changed or deleted 22 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/