StelObserver.cpp   StelObserver.cpp 
skipping to change at line 27 skipping to change at line 27
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include "StelObserver.hpp" #include "StelObserver.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "Planet.hpp" #include "Planet.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelNavigator.hpp"
#include "StelLocationMgr.hpp" #include "StelLocationMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include <QDebug> #include <QDebug>
#include <QSettings> #include <QSettings>
#include <QStringList> #include <QStringList>
class ArtificialPlanet : public Planet class ArtificialPlanet : public Planet
{ {
public: public:
skipping to change at line 79 skipping to change at line 79
} }
void ArtificialPlanet::setDest(const PlanetP& dest) void ArtificialPlanet::setDest(const PlanetP& dest)
{ {
ArtificialPlanet::dest = dest; ArtificialPlanet::dest = dest;
englishName = QString("%1->%2").arg(orig_name).arg(dest->getEnglishN ame()); englishName = QString("%1->%2").arg(orig_name).arg(dest->getEnglishN ame());
nameI18 = QString("%1->%2").arg(orig_name_i18n).arg(dest->getNameI18 n()); nameI18 = QString("%1->%2").arg(orig_name_i18n).arg(dest->getNameI18 n());
// rotation: // rotation:
const RotationElements &r(dest->getRotationElements()); const RotationElements &r(dest->getRotationElements());
lastJD = StelApp::getInstance().getCore()->getNavigator()->getJDay() ; lastJD = StelApp::getInstance().getCore()->getJDay();
re.offset = r.offset + fmod(re.offset - r.offset + 360.0*( (lastJD-r e.epoch)/re.period - (lastJD-r.epoch)/r.period), 360.0); re.offset = r.offset + fmod(re.offset - r.offset + 360.0*( (lastJD-r e.epoch)/re.period - (lastJD-r.epoch)/r.period), 360.0);
re.epoch = r.epoch; re.epoch = r.epoch;
re.period = r.period; re.period = r.period;
if (re.offset - r.offset < -180.f) re.offset += 360.f; else if (re.offset - r.offset < -180.f) re.offset += 360.f; else
if (re.offset - r.offset > 180.f) re.offset -= 360.f; if (re.offset - r.offset > 180.f) re.offset -= 360.f;
} }
void ArtificialPlanet::setRot(const Vec3d &r) void ArtificialPlanet::setRot(const Vec3d &r)
skipping to change at line 203 skipping to change at line 203
} }
Mat4d StelObserver::getRotAltAzToEquatorial(double jd) const Mat4d StelObserver::getRotAltAzToEquatorial(double jd) const
{ {
double lat = currentLocation.latitude; double lat = currentLocation.latitude;
// TODO: Figure out how to keep continuity in sky as reach poles // TODO: Figure out how to keep continuity in sky as reach poles
// otherwise sky jumps in rotation when reach poles in equatorial mo de // otherwise sky jumps in rotation when reach poles in equatorial mo de
// This is a kludge // This is a kludge
if( lat > 89.5 ) lat = 89.5; if( lat > 89.5 ) lat = 89.5;
if( lat < -89.5 ) lat = -89.5; if( lat < -89.5 ) lat = -89.5;
return Mat4d::zrotation((getHomePlanet()->getSiderealTime(jd)+curren return Mat4d::zrotation((getHomePlanet()->getSiderealTime(jd)+curren
tLocation.longitude)*(M_PI/180.)) tLocation.longitude)*M_PI/180.)
* Mat4d::yrotation((90.-lat)*(M_PI/180.)); * Mat4d::yrotation((90.-lat)*M_PI/180.);
} }
Mat4d StelObserver::getRotEquatorialToVsop87(void) const Mat4d StelObserver::getRotEquatorialToVsop87(void) const
{ {
return getHomePlanet()->getRotEquatorialToVsop87(); return getHomePlanet()->getRotEquatorialToVsop87();
} }
SpaceShipObserver::SpaceShipObserver(const StelLocation& startLoc, const St elLocation& target, double atransitSeconds) : StelObserver(startLoc), SpaceShipObserver::SpaceShipObserver(const StelLocation& startLoc, const St elLocation& target, double atransitSeconds) : StelObserver(startLoc),
moveStartLocation(startLoc), moveTargetLocation(target), art ificialPlanet(NULL), transitSeconds(atransitSeconds) moveStartLocation(startLoc), moveTargetLocation(target), art ificialPlanet(NULL), transitSeconds(atransitSeconds)
{ {
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 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/