![]() |
Stellarium 0.11.1 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Functions | |
| QString | getApplicationName () |
| QString | getApplicationVersion () |
| double | hmsToRad (unsigned int h, unsigned int m, double s) |
| double | dmsToRad (int d, unsigned int m, double s) |
| void | radToHms (double rad, unsigned int &h, unsigned int &m, double &s) |
| void | radToDms (double rad, bool &sign, unsigned int &d, unsigned int &m, double &s) |
| QString | radToHmsStrAdapt (double angle) |
| QString | radToHmsStr (double angle, bool decimal=false) |
| QString | radToDmsStrAdapt (double angle, bool useD=false) |
| QString | radToDmsStr (double angle, bool decimal=false, bool useD=false) |
| double | dmsStrToRad (const QString &s) |
| Vec3f | strToVec3f (const QStringList &s) |
| Vec3f | strToVec3f (const QString &s) |
| QString | vec3fToHtmlColor (const Vec3f &v) |
| Vec3f | htmlColorToVec3f (const QString &c) |
| void | spheToRect (double lng, double lat, Vec3d &v) |
| void | spheToRect (float lng, float lat, Vec3f &v) |
| void | rectToSphe (double *lng, double *lat, const Vec3d &v) |
| void | rectToSphe (float *lng, float *lat, const Vec3d &v) |
| void | ctRadec2Ecl (const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad) |
| double | getDecAngle (const QString &str) |
| bool | isPowerOfTwo (int value) |
| int | getBiggerPowerOfTwo (int value) |
| double | asinh (double z) |
| void | getDateFromJulianDay (double julianDay, int *year, int *month, int *day) |
| void | getTimeFromJulianDay (double julianDay, int *hour, int *minute, int *second) |
| bool | getDateTimeFromISO8601String (const QString &iso8601Date, int *y, int *m, int *d, int *h, int *min, float *s) |
| QString | julianDayToISO8601String (double jd) |
| double | getJulianDayFromISO8601String (const QString &iso8601Date, bool *ok) |
| QString | localeDateString (int year, int month, int day, int dayOfWeek, QString fmt) |
| QString | localeDateString (int year, int month, int day, int dayOfWeek) |
| double | getJDFromSystem () |
| double | qTimeToJDFraction (const QTime &time) |
| QTime | jdFractionToQTime (double jd) |
| float | getGMTShiftFromQT (double jd) |
| double | qDateTimeToJd (const QDateTime &dateTime) |
| QDateTime | jdToQDateTime (const double &jd) |
| bool | getJDFromDate (double *newjd, int y, int m, int d, int h, int min, int s) |
| int | numberOfDaysInMonthInYear (int month, int year) |
| bool | changeDateTimeForRollover (int oy, int om, int od, int oh, int omin, int os, int *ry, int *rm, int *rd, int *rh, int *rmin, int *rs) |
| void | debugQVariantMap (const QVariant &m, const QString &indent="", const QString &key="") |
| float | fastAcos (float x) |
| float | fastExp (float x) |
contains general purpose utility functions.
| double StelUtils::dmsStrToRad | ( | const QString & | s | ) |
Convert a dms formatted string to an angle in radian.
| dsm | The input string |
| double StelUtils::dmsToRad | ( | int | d, |
| unsigned int | m, | ||
| double | s | ||
| ) |
Convert an angle in +-dms format to radian.
| d | degree component |
| m | arcmin component |
| s | arcsec component |
| bool StelUtils::getDateTimeFromISO8601String | ( | const QString & | iso8601Date, |
| int * | y, | ||
| int * | m, | ||
| int * | d, | ||
| int * | h, | ||
| int * | min, | ||
| float * | s | ||
| ) |
Parse an ISO8601 date string.
Also handles negative and distant years.
| double StelUtils::getDecAngle | ( | const QString & | str | ) |
Convert a string longitude, latitude, RA or Declination angle to radians.
| str | the angle in format something like these:
|
| double StelUtils::getJDFromSystem | ( | ) |
Get the current Julian Date from system time.
| double StelUtils::getJulianDayFromISO8601String | ( | const QString & | iso8601Date, |
| bool * | ok | ||
| ) |
Return the Julian Date matching the ISO8601 date string.
Also handles negative and distant years.
| double StelUtils::hmsToRad | ( | unsigned int | h, |
| unsigned int | m, | ||
| double | s | ||
| ) |
Convert an angle in hms format to radian.
| h | hour component |
| m | minute component |
| s | second component |
| Vec3f StelUtils::htmlColorToVec3f | ( | const QString & | c | ) |
Converts a color in HTML notation to a Vec3f.
| c | The HTML spec color string |
| QDateTime StelUtils::jdToQDateTime | ( | const double & | jd | ) |
Convert a julian day to a QDateTime.
| jd | to convert |
| QString StelUtils::julianDayToISO8601String | ( | double | jd | ) |
Format the given Julian Day in (UTC) ISO8601 date string.
Also handles negative and distant years.
| QString StelUtils::localeDateString | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | dayOfWeek, | ||
| QString | fmt | ||
| ) |
Format the date and day-of-week per the format in fmt (see QDateTime::toString()).
| QString StelUtils::localeDateString | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | dayOfWeek | ||
| ) |
Format the date and day-of-week per the default locale's QLocale::ShortFormat.
| double StelUtils::qDateTimeToJd | ( | const QDateTime & | dateTime | ) |
Convert a QT QDateTime class to julian day.
| dateTime | the UTC QDateTime to convert |
| double StelUtils::qTimeToJDFraction | ( | const QTime & | time | ) |
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 so 12:00 == 0.0 and 0:00 == 0.5
| void StelUtils::radToDms | ( | double | rad, |
| bool & | sign, | ||
| unsigned int & | d, | ||
| unsigned int & | m, | ||
| double & | s | ||
| ) |
Convert an angle in radian to +-dms format.
| rad | input angle in radian |
| sign | true if positive, false otherwise |
| d | degree component |
| m | minute component |
| s | second component |
| QString StelUtils::radToDmsStr | ( | double | angle, |
| bool | decimal = false, |
||
| bool | useD = false |
||
| ) |
Convert an angle in radian to a dms formatted string.
| angle | input angle in radian |
| useD | Define if letter "d" must be used instead of deg sign |
| decimal | output decimal second value |
| QString StelUtils::radToDmsStrAdapt | ( | double | angle, |
| bool | useD = false |
||
| ) |
Convert an angle in radian to a dms formatted string.
If the second, minute part is == 0, it is not output
| angle | input angle in radian |
| useD | Define if letter "d" must be used instead of deg sign |
| void StelUtils::radToHms | ( | double | rad, |
| unsigned int & | h, | ||
| unsigned int & | m, | ||
| double & | s | ||
| ) |
Convert an angle in radian to hms format.
| rad | input angle in radian |
| h | hour component |
| m | minute component |
| s | second component |
| QString StelUtils::radToHmsStr | ( | double | angle, |
| bool | decimal = false |
||
| ) |
Convert an angle in radian to a hms formatted string.
| angle | input angle in radian |
| decimal | output decimal second value |
| QString StelUtils::radToHmsStrAdapt | ( | double | angle | ) |
Convert an angle in radian to a hms formatted string.
If the second, minute part is == 0, it is not output
| angle | input angle in radian |
| void StelUtils::rectToSphe | ( | double * | lng, |
| double * | lat, | ||
| const Vec3d & | v | ||
| ) |
Convert from spherical coordinates to Rectangular direction.
| lng | double* to store longitude in radian |
| lat | double* to store latitude in radian |
| v | the input 3D vector |
| void StelUtils::rectToSphe | ( | float * | lng, |
| float * | lat, | ||
| const Vec3d & | v | ||
| ) |
Convert from spherical coordinates to Rectangular direction.
| lng | float* to store longitude in radian |
| lat | float* to store latitude in radian |
| v | the input 3D vector |
| void StelUtils::spheToRect | ( | double | lng, |
| double | lat, | ||
| Vec3d & | v | ||
| ) |
Convert from spherical coordinates to Rectangular direction.
| lng | longitude in radian |
| lat | latitude in radian |
| v | the resulting 3D unit vector |
| void StelUtils::spheToRect | ( | float | lng, |
| float | lat, | ||
| Vec3f & | v | ||
| ) |
Convert from spherical coordinates to Rectangular direction.
| lng | longitude in radian |
| lat | latitude in radian |
| v | the resulting 3D unti vector |
| Vec3f StelUtils::strToVec3f | ( | const QStringList & | s | ) |
Obtains a Vec3f from a string.
| s | the string describing the Vector with the form "x,y,z" |
| QString StelUtils::vec3fToHtmlColor | ( | const Vec3f & | v | ) |
Converts a Vec3f to HTML color notation.
| v | The vector |
1.7.6.1