StelObserver.cpp   StelObserver.cpp 
skipping to change at line 51 skipping to change at line 51
private: private:
void setRot(const Vec3d &r); void setRot(const Vec3d &r);
static Vec3d getRot(const Planet* p); static Vec3d getRot(const Planet* p);
PlanetP dest; PlanetP dest;
const QString orig_name; const QString orig_name;
const QString orig_name_i18n; const QString orig_name_i18n;
}; };
ArtificialPlanet::ArtificialPlanet(const PlanetP& orig) : ArtificialPlanet::ArtificialPlanet(const PlanetP& orig) :
Planet("", 0, 0, 0, Vec3f(0,0,0), 0, "", Planet("", 0, 0, 0, Vec3f(0,0,0), 0, "",
NULL, NULL, 0, false, true, false), dest(0), NULL, NULL, 0, false, true, false, ""), dest(0),
orig_name(orig->getEnglishName()), orig_name_i18n(orig->getN ameI18n()) orig_name(orig->getEnglishName()), orig_name_i18n(orig->getN ameI18n())
{ {
radius = 0; // radius = 0;
// set parent = sun: // set parent = sun:
if (orig->getParent()) if (orig->getParent())
{ {
parent = orig->getParent(); parent = orig->getParent();
while (parent->getParent()) while (parent->getParent())
parent = parent->getParent(); parent = parent->getParent();
} }
else else
{ {
parent = orig; // sun parent = orig; // sun
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 > 90.0 ) lat = 90.0; if( lat > 90.0 ) lat = 90.0;
if( lat < -90.0 ) lat = -90.0; if( lat < -90.0 ) lat = -90.0;
return Mat4d::zrotation((getHomePlanet()->getSiderealTime(jd)+curren // Include a DeltaT correction. Sidereal time and longitude here are
tLocation.longitude)*M_PI/180.) both in degrees, but DeltaT in seconds of time.
// 360 degrees = 24hrs; 15 degrees = 1hr = 3600s; 1 degree = 240s
// Apply DeltaT correction only for Earth
double deltaT = 0.;
if (getHomePlanet()->getEnglishName()=="Earth")
deltaT = StelUtils::getDeltaT(jd)/240.;
return Mat4d::zrotation((getHomePlanet()->getSiderealTime(jd)+curren
tLocation.longitude-deltaT)*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. 
4 lines changed or deleted 11 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/