StelNavigator.cpp   StelNavigator.cpp 
skipping to change at line 37 skipping to change at line 37
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "StelLocationMgr.hpp" #include "StelLocationMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include <QSettings> #include <QSettings>
#include <QStringList> #include <QStringList>
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <QRegExp>
// Init statics transfo matrices // Init statics transfo matrices
// See vsop87.doc: // See vsop87.doc:
const Mat4d StelNavigator::matJ2000ToVsop87(Mat4d::xrotation(-23.4392803055 555555556*(M_PI/180)) * Mat4d::zrotation(0.0000275*(M_PI/180))); const Mat4d StelNavigator::matJ2000ToVsop87(Mat4d::xrotation(-23.4392803055 555555556*(M_PI/180)) * Mat4d::zrotation(0.0000275*(M_PI/180)));
const Mat4d StelNavigator::matVsop87ToJ2000(matJ2000ToVsop87.transpose()); const Mat4d StelNavigator::matVsop87ToJ2000(matJ2000ToVsop87.transpose());
const Mat4d StelNavigator::matJ2000ToGalactic(-0.054875539726, 0.4941094533 12, -0.867666135858, 0, -0.873437108010, -0.444829589425, -0.198076386122, 0, -0.483834985808, 0.746982251810, 0.455983795705, 0, 0, 0, 0, 1); const Mat4d StelNavigator::matJ2000ToGalactic(-0.054875539726, 0.4941094533 12, -0.867666135858, 0, -0.873437108010, -0.444829589425, -0.198076386122, 0, -0.483834985808, 0.746982251810, 0.455983795705, 0, 0, 0, 0, 1);
const Mat4d StelNavigator::matGalacticToJ2000(matJ2000ToGalactic.transpose( )); const Mat4d StelNavigator::matGalacticToJ2000(matJ2000ToGalactic.transpose( ));
/////////////////////////////////////////////////////////////////////////// ///// /////////////////////////////////////////////////////////////////////////// /////
StelNavigator::StelNavigator() : timeSpeed(JD_SECOND), JDay(0.), position(N ULL) StelNavigator::StelNavigator() : timeSpeed(JD_SECOND), JDay(0.), position(N ULL)
skipping to change at line 61 skipping to change at line 62
{ {
delete position; delete position;
position=NULL; position=NULL;
} }
void StelNavigator::init() void StelNavigator::init()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
defaultLocationID = conf->value("init_location/location","Paris, Par defaultLocationID = conf->value("init_location/location","error").to
is, France").toString(); String();
position = new StelObserver(StelApp::getInstance().getLocationMgr(). bool ok;
locationForSmallString(defaultLocationID)); StelLocation location = StelApp::getInstance().getLocationMgr().loca
tionForString(defaultLocationID, &ok);
if (!ok)
{
qWarning() << "Warning: location" << defaultLocationID << "i
s unknown.";
}
position = new StelObserver(location);
setTimeNow(); setTimeNow();
// Compute transform matrices between coordinates systems // Compute transform matrices between coordinates systems
updateTransformMatrices(); updateTransformMatrices();
// we want to be able to handle the old style preset time, recorded as a double // we want to be able to handle the old style preset time, recorded as a double
// jday, or as a more human readable string... // jday, or as a more human readable string...
bool ok;
QString presetTimeStr = conf->value("navigation/preset_sky_time",245 1545.).toString(); QString presetTimeStr = conf->value("navigation/preset_sky_time",245 1545.).toString();
presetSkyTime = presetTimeStr.toDouble(&ok); presetSkyTime = presetTimeStr.toDouble(&ok);
if (ok) if (ok)
qDebug() << "navigation/preset_sky_time is a double - treati ng as jday:" << presetSkyTime; qDebug() << "navigation/preset_sky_time is a double - treati ng as jday:" << presetSkyTime;
else else
{ {
qDebug() << "navigation/preset_sky_time was not a double, tr eating as string date:" << presetTimeStr; qDebug() << "navigation/preset_sky_time was not a double, tr eating as string date:" << presetTimeStr;
presetSkyTime = StelUtils::qDateTimeToJd(QDateTime::fromStri ng(presetTimeStr)); presetSkyTime = StelUtils::qDateTimeToJd(QDateTime::fromStri ng(presetTimeStr));
} }
 End of changes. 3 change blocks. 
5 lines changed or deleted 12 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/