StelUtils.cpp   StelUtils.cpp 
skipping to change at line 50 skipping to change at line 50
{ {
//! 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 QString("Stellarium")+" "+StelUtils::getApplicationVersion(); return QString("Stellarium")+" "+StelUtils::getApplicationVersion();
} }
//! Return the version of stellarium, i.e. "0.9.0" //! Return the version of stellarium, i.e. "0.9.0"
QString getApplicationVersion() QString getApplicationVersion()
{ {
#ifdef BZR_REVISION #ifdef RELEASE_BUILD
return QString(PACKAGE_VERSION)+" (BZR r"+BZR_REVISION+")";
#elif SVN_REVISION
return QString(PACKAGE_VERSION)+" (SVN r"+SVN_REVISION+")";
#else
return QString(PACKAGE_VERSION); return QString(PACKAGE_VERSION);
#else
#ifdef BZR_REVISION
return QString(PACKAGE_VERSION)+" (BZR r"+BZR_REVISION+")";
#elif defined(DEV_VERSION)
return QString(DEV_VERSION);
#else
return QString(PACKAGE_VERSION)+QChar(0x03B2);
#endif
#endif #endif
} }
QString getOperatingSystemInfo() QString getOperatingSystemInfo()
{ {
QString OS = "Unknown operating system"; QString OS = "Unknown operating system";
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
switch(QSysInfo::WindowsVersion) switch(QSysInfo::WindowsVersion)
{ {
skipping to change at line 93 skipping to change at line 97
break; break;
case QSysInfo::WV_2003: case QSysInfo::WV_2003:
OS = "Windows Server 2003"; OS = "Windows Server 2003";
break; break;
case QSysInfo::WV_VISTA: case QSysInfo::WV_VISTA:
OS = "Windows Vista"; OS = "Windows Vista";
break; break;
case QSysInfo::WV_WINDOWS7: case QSysInfo::WV_WINDOWS7:
OS = "Windows 7"; OS = "Windows 7";
break; break;
#ifdef WV_WINDOWS8
case QSysInfo::WV_WINDOWS8: case QSysInfo::WV_WINDOWS8:
OS = "Windows 8"; OS = "Windows 8";
break; break;
#endif #if QT_VERSION >= 0x050200
#ifdef WV_WINDOWS8_1
case QSysInfo::WV_WINDOWS8_1: case QSysInfo::WV_WINDOWS8_1:
OS = "Windows 8.1"; OS = "Windows 8.1";
break; break;
#endif #endif
#ifdef WV_WINDOWS10 #if QT_VERSION >= 0x050500
case QSysInfo::WV_WINDOWS10: case QSysInfo::WV_WINDOWS10:
OS = "Windows 10"; OS = "Windows 10";
break; break;
#endif #endif
default: default:
OS = "Unsupported Windows version"; OS = "Unsupported Windows version";
break; break;
} }
// somebody writing something useful for Macs would be great here // somebody writing something useful for Macs would be great here
skipping to change at line 138 skipping to change at line 140
break; break;
case QSysInfo::MV_LION: case QSysInfo::MV_LION:
OS = "Mac OS X 10.7 series"; OS = "Mac OS X 10.7 series";
break; break;
case QSysInfo::MV_MOUNTAINLION: case QSysInfo::MV_MOUNTAINLION:
OS = "Mac OS X 10.8 series"; OS = "Mac OS X 10.8 series";
break; break;
case QSysInfo::MV_MAVERICKS: case QSysInfo::MV_MAVERICKS:
OS = "Mac OS X 10.9 series"; OS = "Mac OS X 10.9 series";
break; break;
#ifdef MV_YOSEMITE
case QSysInfo::MV_YOSEMITE: case QSysInfo::MV_YOSEMITE:
OS = "Mac OS X 10.10 series"; OS = "Mac OS X 10.10 series";
break; break;
#if QT_VERSION >= 0x050500
case QSysInfo::MV_ELCAPITAN:
OS = "Mac OS X 10.11 series";
break;
#endif #endif
default: default:
OS = "Unsupported Mac version"; OS = "Unsupported Mac version";
break; break;
} }
#elif defined Q_OS_LINUX #elif defined Q_OS_LINUX
QFile procVersion("/proc/version"); QFile procVersion("/proc/version");
if(!procVersion.open(QIODevice::ReadOnly | QIODevice::Text)) if(!procVersion.open(QIODevice::ReadOnly | QIODevice::Text))
OS = "Unknown Linux version"; OS = "Unknown Linux version";
skipping to change at line 585 skipping to change at line 590
*lat = asin(v[2]/r); *lat = asin(v[2]/r);
*lng = atan2(v[1],v[0]); *lng = atan2(v[1],v[0]);
} }
void equToEcl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad) void equToEcl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad)
{ {
*lambdaRad=std::atan2(std::sin(raRad)*std::cos(eclRad)+std::tan(decR ad)*std::sin(eclRad), std::cos(raRad)); *lambdaRad=std::atan2(std::sin(raRad)*std::cos(eclRad)+std::tan(decR ad)*std::sin(eclRad), std::cos(raRad));
*betaRad=std::asin(std::sin(decRad)*std::cos(eclRad)-std::cos(decRad )*std::sin(eclRad)*std::sin(raRad)); *betaRad=std::asin(std::sin(decRad)*std::cos(eclRad)-std::cos(decRad )*std::sin(eclRad)*std::sin(raRad));
} }
void eclToEqu(const double lambdaRad, const double betaRad, const double ec
lRad, double *raRad, double *decRad)
{
*raRad = std::atan2(std::sin(lambdaRad)*std::cos(eclRad)-std::tan(be
taRad)*std::sin(eclRad), std::cos(lambdaRad));
*decRad = std::asin(std::sin(betaRad)*std::cos(eclRad)+std::cos(beta
Rad)*std::sin(eclRad)*std::sin(lambdaRad));
}
double getDecAngle(const QString& str) double getDecAngle(const QString& str)
{ {
QRegExp re1("^\\s*([\\+\\-])?\\s*(\\d+)\\s*([hHDd\xBA])\\s*(\\d+)\\s *['Mm]\\s*(\\d+(\\.\\d+)?)\\s*[\"Ss]\\s*([NSEWnsew])?\\s*$"); // DMS/HMS QRegExp re1("^\\s*([\\+\\-])?\\s*(\\d+)\\s*([hHDd\xBA])\\s*(\\d+)\\s *['Mm]\\s*(\\d+(\\.\\d+)?)\\s*[\"Ss]\\s*([NSEWnsew])?\\s*$"); // DMS/HMS
QRegExp re2("^\\s*([\\+\\-])?\\s*(\\d+(\\.\\d+)?).?([NSEWnsew])?\\s* $"); // Decimal QRegExp re2("^\\s*([\\+\\-])?\\s*(\\d+(\\.\\d+)?).?([NSEWnsew])?\\s* $"); // Decimal
QRegExp re3("([+-]?[\\d.]+)°(?:([\\d.]+)')?(?:([\\d.]+)\")?"); // DM S like +121°33'38.28" QRegExp re3("([+-]?[\\d.]+)°(?:([\\d.]+)')?(?:([\\d.]+)\")?"); // DM S like +121°33'38.28"
if (re1.exactMatch(str)) if (re1.exactMatch(str))
{ {
bool neg = (re1.capturedTexts().at(1) == "-"); bool neg = (re1.capturedTexts().at(1) == "-");
float d = re1.capturedTexts().at(2).toFloat(); float d = re1.capturedTexts().at(2).toFloat();
 End of changes. 8 change blocks. 
10 lines changed or deleted 24 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/