StelObserver.cpp   StelObserver.cpp 
skipping to change at line 239 skipping to change at line 239
if( lat < -90.0 ) lat = -90.0; if( lat < -90.0 ) lat = -90.0;
return Mat4d::zrotation((getHomePlanet()->getSiderealTime(JD, JDE)+c urrentLocation.longitude)*M_PI/180.) return Mat4d::zrotation((getHomePlanet()->getSiderealTime(JD, JDE)+c urrentLocation.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 SpaceShipObserver::SpaceShipObserver(const StelLocation& startLoc, const St
elLocation& target, double atransitSeconds) : StelObserver(startLoc), elLocation& target, double atransitSeconds, double atimeToGo) : StelObserve
moveStartLocation(startLoc), moveTargetLocation(target), art r(startLoc),
ificialPlanet(NULL), transitSeconds(atransitSeconds) moveStartLocation(startLoc), moveTargetLocation(target), art
ificialPlanet(NULL), timeToGo(atimeToGo), transitSeconds(atransitSeconds)
{ {
if(timeToGo<0.0)
timeToGo = transitSeconds;
SolarSystem* ssystem = GETSTELMODULE(SolarSystem); SolarSystem* ssystem = GETSTELMODULE(SolarSystem);
PlanetP targetPlanet = ssystem->searchByEnglishName(moveTargetLocati on.planetName); PlanetP targetPlanet = ssystem->searchByEnglishName(moveTargetLocati on.planetName);
if (moveStartLocation.planetName!=moveTargetLocation.planetName) if (moveStartLocation.planetName!=moveTargetLocation.planetName)
{ {
PlanetP startPlanet = ssystem->searchByEnglishName(moveStart Location.planetName); PlanetP startPlanet = ssystem->searchByEnglishName(moveStart Location.planetName);
if (startPlanet.isNull() || targetPlanet.isNull()) if (startPlanet.isNull() || targetPlanet.isNull())
{ {
qWarning() << "Can't move from planet " + moveStartL ocation.planetName + " to planet " + moveTargetLocation.planetName + " beca use it is unknown"; qWarning() << "Can't move from planet " + moveStartL ocation.planetName + " to planet " + moveTargetLocation.planetName + " beca use it is unknown";
timeToGo = -1.; // Will abort properly the move timeToGo = -1.; // Will abort properly the move
if (targetPlanet==NULL) if (targetPlanet==NULL)
skipping to change at line 264 skipping to change at line 267
moveTargetLocation = moveStartLocation; moveTargetLocation = moveStartLocation;
} }
return; return;
} }
ArtificialPlanet* artPlanet = new ArtificialPlanet(startPlan et); ArtificialPlanet* artPlanet = new ArtificialPlanet(startPlan et);
artPlanet->setDest(targetPlanet); artPlanet->setDest(targetPlanet);
artificialPlanet = QSharedPointer<Planet>(artPlanet); artificialPlanet = QSharedPointer<Planet>(artPlanet);
} }
planet = targetPlanet; planet = targetPlanet;
timeToGo = transitSeconds;
} }
SpaceShipObserver::~SpaceShipObserver() SpaceShipObserver::~SpaceShipObserver()
{ {
artificialPlanet.clear(); artificialPlanet.clear();
planet.clear(); planet.clear();
} }
void SpaceShipObserver::update(double deltaTime) void SpaceShipObserver::update(double deltaTime)
{ {
 End of changes. 3 change blocks. 
5 lines changed or deleted 8 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/