SolarSystem.cpp   SolarSystem.cpp 
skipping to change at line 146 skipping to change at line 146
// Init and load the solar system data // Init and load the solar system data
void SolarSystem::init() void SolarSystem::init()
{ {
Q_ASSERT(conf); Q_ASSERT(conf);
Planet::init(); Planet::init();
loadPlanets(); // Load planets data loadPlanets(); // Load planets data
// Compute position and matrix of sun and all the satellites (ie pla nets) // Compute position and matrix of sun and all the satellites (ie pla nets)
// for the first initialization Q_ASSERT that center is sun center ( only impacts on light speed correction) // for the first initialization Q_ASSERT that center is sun center ( only impacts on light speed correction)
computePositions(StelUtils::getJDFromSystem()); computePositions(StelApp::getInstance().getCore()->getJDE());
setSelected(""); // Fix a bug on macosX! Thanks Fumio! setSelected(""); // Fix a bug on macosX! Thanks Fumio!
setFlagMoonScale(conf->value("viewing/flag_moon_scaled", conf->value ("viewing/flag_init_moon_scaled", "false").toBool()).toBool()); // name ch ange setFlagMoonScale(conf->value("viewing/flag_moon_scaled", conf->value ("viewing/flag_init_moon_scaled", "false").toBool()).toBool()); // name ch ange
setMoonScale(conf->value("viewing/moon_scale", 4.0).toFloat()); setMoonScale(conf->value("viewing/moon_scale", 4.0).toFloat());
setFlagPlanets(conf->value("astro/flag_planets").toBool()); setFlagPlanets(conf->value("astro/flag_planets").toBool());
setFlagHints(conf->value("astro/flag_planets_hints").toBool()); setFlagHints(conf->value("astro/flag_planets_hints").toBool());
setFlagLabels(conf->value("astro/flag_planets_labels", true).toBool( )); setFlagLabels(conf->value("astro/flag_planets_labels", true).toBool( ));
setLabelsAmount(conf->value("astro/labels_amount", 3.).toFloat()); setLabelsAmount(conf->value("astro/labels_amount", 3.).toFloat());
setFlagOrbits(conf->value("astro/flag_planets_orbits").toBool()); setFlagOrbits(conf->value("astro/flag_planets_orbits").toBool());
setFlagLightTravelTime(conf->value("astro/flag_light_travel_time", t rue).toBool()); setFlagLightTravelTime(conf->value("astro/flag_light_travel_time", t rue).toBool());
setFlagPointer(conf->value("astro/flag_planets_pointers", true).toBo ol()); setFlagPointer(conf->value("astro/flag_planets_pointers", true).toBo ol());
// Set the algorithm from Astronomical Almanac for computation of ap parent magnitudes for // Set the algorithm from Astronomical Almanac for computation of ap parent magnitudes for
// planets in case observer on the Earth by default // planets in case observer on the Earth by default
setApparentMagnitudeAlgorithmOnEarth(conf->value("astro/apparent_mag nitude_algorithm", "Harris").toString()); setApparentMagnitudeAlgorithmOnEarth(conf->value("astro/apparent_mag nitude_algorithm", "Harris").toString());
setFlagNativeNames(conf->value("viewing/flag_planets_native_names", true).toBool()); setFlagNativeNames(conf->value("viewing/flag_planets_native_names", true).toBool());
// Is enabled the showing of isolated trails for selected objects on ly? // Is enabled the showing of isolated trails for selected objects on ly?
setFlagIsolatedTrails(conf->value("viewing/flag_isolated_trails", tr ue).toBool()); setFlagIsolatedTrails(conf->value("viewing/flag_isolated_trails", tr ue).toBool());
setFlagIsolatedOrbits(conf->value("viewing/flag_isolated_orbits", tr ue).toBool()); setFlagIsolatedOrbits(conf->value("viewing/flag_isolated_orbits", tr ue).toBool());
setFlagPermanentOrbits(conf->value("astro/flag_permanent_orbits", fa lse).toBool()); setFlagPermanentOrbits(conf->value("astro/flag_permanent_orbits", fa lse).toBool());
setOrbitColorStyle(conf->value("astro/planets_orbits_color_style", " one_color").toString());
setFlagEphemerisMarkers(conf->value("astro/flag_ephemeris_markers", true).toBool()); setFlagEphemerisMarkers(conf->value("astro/flag_ephemeris_markers", true).toBool());
setFlagEphemerisDates(conf->value("astro/flag_ephemeris_dates", fals e).toBool()); setFlagEphemerisDates(conf->value("astro/flag_ephemeris_dates", fals e).toBool());
// Settings for calculation of position of Great Red Spot on Jupiter // Settings for calculation of position of Great Red Spot on Jupiter
setFlagCustomGrsSettings(conf->value("astro/flag_grs_custom", false) .toBool()); setFlagCustomGrsSettings(conf->value("astro/flag_grs_custom", false) .toBool());
setCustomGrsLongitude(conf->value("astro/grs_longitude", 216).toInt( )); setCustomGrsLongitude(conf->value("astro/grs_longitude", 216).toInt( ));
setCustomGrsDrift(conf->value("astro/grs_drift", 15.).toDouble()); setCustomGrsDrift(conf->value("astro/grs_drift", 15.).toDouble());
setCustomGrsJD(conf->value("astro/grs_jd", 2456901.5).toDouble()); setCustomGrsJD(conf->value("astro/grs_jd", 2456901.5).toDouble());
// Load colors from config file // Load colors from config file
QString defaultColor = conf->value("color/default_color").toString() ; QString defaultColor = conf->value("color/default_color").toString() ;
setLabelsColor(StelUtils::strToVec3f(conf->value("color/planet_names _color", defaultColor).toString())); setLabelsColor(StelUtils::strToVec3f(conf->value("color/planet_names _color", defaultColor).toString()));
setOrbitsColor(StelUtils::strToVec3f(conf->value("color/planet_orbit setOrbitsColor(StelUtils::strToVec3f(conf->value("color/sso_orbits_c
s_color", defaultColor).toString())); olor", defaultColor).toString()));
setMajorPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/
major_planet_orbits_color", "0.7,0.2,0.2").toString()));
setMoonsOrbitsColor(StelUtils::strToVec3f(conf->value("color/moon_or
bits_color", "0.7,0.2,0.2").toString()));
setMinorPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/
minor_planet_orbits_color", "0.7,0.5,0.5").toString()));
setDwarfPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/
dwarf_planet_orbits_color", "0.7,0.5,0.5").toString()));
setCubewanosOrbitsColor(StelUtils::strToVec3f(conf->value("color/cub
ewano_orbits_color", "0.7,0.5,0.5").toString()));
setPlutinosOrbitsColor(StelUtils::strToVec3f(conf->value("color/plut
ino_orbits_color", "0.7,0.5,0.5").toString()));
setScatteredDiskObjectsOrbitsColor(StelUtils::strToVec3f(conf->value
("color/sdo_orbits_color", "0.7,0.5,0.5").toString()));
setOortCloudObjectsOrbitsColor(StelUtils::strToVec3f(conf->value("co
lor/oco_orbits_color", "0.7,0.5,0.5").toString()));
setCometsOrbitsColor(StelUtils::strToVec3f(conf->value("color/comet_
orbits_color", "0.7,0.8,0.8").toString()));
setMercuryOrbitColor(StelUtils::strToVec3f(conf->value("color/mercur
y_orbit_color", "0.5,0.5,0.5").toString()));
setVenusOrbitColor(StelUtils::strToVec3f(conf->value("color/venus_or
bit_color", "0.9,0.9,0.7").toString()));
setEarthOrbitColor(StelUtils::strToVec3f(conf->value("color/earth_or
bit_color", "0.0,0.0,1.0").toString()));
setMarsOrbitColor(StelUtils::strToVec3f(conf->value("color/mars_orbi
t_color", "0.8,0.4,0.1").toString()));
setJupiterOrbitColor(StelUtils::strToVec3f(conf->value("color/jupite
r_orbit_color", "1.0,0.6,0.0").toString()));
setSaturnOrbitColor(StelUtils::strToVec3f(conf->value("color/saturn_
orbit_color", "1.0,0.8,0.0").toString()));
setUranusOrbitColor(StelUtils::strToVec3f(conf->value("color/uranus_
orbit_color", "0.0,0.7,1.0").toString()));
setNeptuneOrbitColor(StelUtils::strToVec3f(conf->value("color/neptun
e_orbit_color", "0.0,0.3,1.0").toString()));
setTrailsColor(StelUtils::strToVec3f(conf->value("color/object_trail s_color", defaultColor).toString())); setTrailsColor(StelUtils::strToVec3f(conf->value("color/object_trail s_color", defaultColor).toString()));
setPointerColor(StelUtils::strToVec3f(conf->value("color/planet_poin ters_color", "1.0,0.3,0.3").toString())); setPointerColor(StelUtils::strToVec3f(conf->value("color/planet_poin ters_color", "1.0,0.3,0.3").toString()));
recreateTrails(); recreateTrails();
setFlagTrails(conf->value("astro/flag_object_trails", false).toBool( )); setFlagTrails(conf->value("astro/flag_object_trails", false).toBool( ));
StelObjectMgr *objectManager = GETSTELMODULE(StelObjectMgr); StelObjectMgr *objectManager = GETSTELMODULE(StelObjectMgr);
objectManager->registerStelObjectMgr(this); objectManager->registerStelObjectMgr(this);
connect(objectManager, SIGNAL(selectedObjectChanged(StelModule::Stel ModuleSelectAction)), connect(objectManager, SIGNAL(selectedObjectChanged(StelModule::Stel ModuleSelectAction)),
this, SLOT(selectedObjectChange(StelModule::StelModu leSelectAction))); this, SLOT(selectedObjectChange(StelModule::StelModuleSelect Action)));
texPointer = StelApp::getInstance().getTextureManager().createTextur e(StelFileMgr::getInstallationDir()+"/textures/pointeur4.png"); texPointer = StelApp::getInstance().getTextureManager().createTextur e(StelFileMgr::getInstallationDir()+"/textures/pointeur4.png");
texCircle = StelApp::getInstance().getTextureManager().createTexture (StelFileMgr::getInstallationDir()+"/textures/neb.png"); // Load circle texture texCircle = StelApp::getInstance().getTextureManager().createTexture (StelFileMgr::getInstallationDir()+"/textures/neb.png"); // Load circle texture
Planet::hintCircleTex = StelApp::getInstance().getTextureManager().c reateTexture(StelFileMgr::getInstallationDir()+"/textures/planet-indicator. png"); Planet::hintCircleTex = StelApp::getInstance().getTextureManager().c reateTexture(StelFileMgr::getInstallationDir()+"/textures/planet-indicator. png");
StelApp *app = &StelApp::getInstance(); StelApp *app = &StelApp::getInstance();
connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n())); connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n()));
connect(&app->getSkyCultureMgr(), SIGNAL(currentSkyCultureChanged(QS tring)), this, SLOT(updateSkyCulture(QString))); connect(&app->getSkyCultureMgr(), SIGNAL(currentSkyCultureChanged(QS tring)), this, SLOT(updateSkyCulture(QString)));
QString displayGroup = N_("Display Options"); QString displayGroup = N_("Display Options");
addAction("actionShow_Planets", displayGroup, N_("Planets"), "planet sDisplayed", "P"); addAction("actionShow_Planets", displayGroup, N_("Planets"), "planet sDisplayed", "P");
addAction("actionShow_Planets_Labels", displayGroup, N_("Planet labe ls"), "labelsDisplayed", "Alt+P"); addAction("actionShow_Planets_Labels", displayGroup, N_("Planet labe ls"), "labelsDisplayed", "Alt+P");
addAction("actionShow_Planets_Orbits", displayGroup, N_("Planet orbi ts"), "flagOrbits", "O"); addAction("actionShow_Planets_Orbits", displayGroup, N_("Planet orbi ts"), "flagOrbits", "O");
addAction("actionShow_Planets_Trails", displayGroup, N_("Planet trai ls"), "trailsDisplayed", "Shift+T"); addAction("actionShow_Planets_Trails", displayGroup, N_("Planet trai ls"), "trailsDisplayed", "Shift+T");
//there is a small discrepancy in the GUI: "Show planet markers" act ually means show planet hints //there is a small discrepancy in the GUI: "Show planet markers" act ually means show planet hints
addAction("actionShow_Planets_Hints", displayGroup, N_("Planet marke rs"), "flagHints", "Ctrl+P"); addAction("actionShow_Planets_Hints", displayGroup, N_("Planet marke rs"), "flagHints", "Ctrl+P");
//addAction("actionShow_Planets_Markers", displayGroup, N_("Planet s election marker"), "markersDisplayed", "Ctrl+Shift+P"); addAction("actionShow_Planets_Pointers", displayGroup, N_("Planet se lection marker"), "flagPointer", "Ctrl+Shift+P");
addAction("actionShow_Skyculture_Nativenames", displayGroup, N_("Nat ive planet names (from starlore)"), "flagNativeNames", "Ctrl+Shift+N"); addAction("actionShow_Skyculture_Nativenames", displayGroup, N_("Nat ive planet names (from starlore)"), "flagNativeNames", "Ctrl+Shift+N");
} }
void SolarSystem::deinit() void SolarSystem::deinit()
{ {
if(Planet::planetShaderProgram) if(Planet::planetShaderProgram)
Planet::deinitShader(); Planet::deinitShader();
} }
void SolarSystem::recreateTrails() void SolarSystem::recreateTrails()
skipping to change at line 850 skipping to change at line 868
if (funcName=="neptune_special") { if (funcName=="neptune_special") {
posfunc = posFuncType(get_neptune_helio_coordsv); posfunc = posFuncType(get_neptune_helio_coordsv);
osculatingFunc = &get_neptune_helio_osculating_coord s; osculatingFunc = &get_neptune_helio_osculating_coord s;
} }
if (funcName=="pluto_special") if (funcName=="pluto_special")
posfunc = &get_pluto_helio_coordsv; posfunc = &get_pluto_helio_coordsv;
if (posfunc==NULL) if (posfunc==NULL)
{ {
qWarning() << "ERROR : can't find posfunc " << funcN ame << " for " << englishName; qCritical() << "ERROR : can't find posfunc " << func Name << " for " << englishName;
exit(-1); exit(-1);
} }
// Create the Solar System body and add it to the list // Create the Solar System body and add it to the list
QString type = pd.value(secname+"/type").toString(); QString type = pd.value(secname+"/type").toString();
PlanetP p; PlanetP p;
// New class objects, named "plutino", "cubewano", "dwarf pl anet", "SDO", "OCO", has properties // New class objects, named "plutino", "cubewano", "dwarf pl anet", "SDO", "OCO", has properties
// similar to asteroids and we should calculate their positi ons like for asteroids. Dwarf planets // similar to asteroids and we should calculate their positi ons like for asteroids. Dwarf planets
// have one exception: Pluto - we should use special functio n for calculation of orbit of Pluto. // have one exception: Pluto - we should use special functio n for calculation of orbit of Pluto.
if ((type == "asteroid" || type == "dwarf planet" || type == "cubewano" || type == "plutino" || type == "scattered disc object" || type == "Oort cloud object") && !englishName.contains("Pluto")) if ((type == "asteroid" || type == "dwarf planet" || type == "cubewano" || type == "plutino" || type == "scattered disc object" || type == "Oort cloud object") && !englishName.contains("Pluto"))
skipping to change at line 1270 skipping to change at line 1288
} }
float SolarSystem::getPhaseForPlanet(QString planetName) const float SolarSystem::getPhaseForPlanet(QString planetName) const
{ {
PlanetP p = searchByEnglishName(planetName); PlanetP p = searchByEnglishName(planetName);
float r = 0.f; float r = 0.f;
r = p->getPhase(StelApp::getInstance().getCore()->getObserverHelioce ntricEclipticPos()); r = p->getPhase(StelApp::getInstance().getCore()->getObserverHelioce ntricEclipticPos());
return r; return r;
} }
QStringList SolarSystem::getObjectsList(QString objType) const
{
QStringList r;
if (objType.toLower()=="all")
{
r = listAllObjects(true);
// Remove the Sun
r.removeOne("Sun");
// Remove special objects
r.removeOne("Solar System Observer");
r.removeOne("Earth Observer");
}
else
r = listAllObjectsByType(objType, true);
return r;
}
// Search if any Planet is close to position given in earth equatorial posi tion and return the distance // Search if any Planet is close to position given in earth equatorial posi tion and return the distance
StelObjectP SolarSystem::search(Vec3d pos, const StelCore* core) const StelObjectP SolarSystem::search(Vec3d pos, const StelCore* core) const
{ {
pos.normalize(); pos.normalize();
PlanetP closest; PlanetP closest;
double cos_angle_closest = 0.; double cos_angle_closest = 0.;
Vec3d equPos; Vec3d equPos;
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
skipping to change at line 1651 skipping to change at line 1687
emit flagIsolatedOrbitsChanged(b); emit flagIsolatedOrbitsChanged(b);
} }
} }
bool SolarSystem::getFlagIsolatedOrbits() const bool SolarSystem::getFlagIsolatedOrbits() const
{ {
return flagIsolatedOrbits; return flagIsolatedOrbits;
} }
// Set/Get planets names color // Set/Get planets names color
void SolarSystem::setLabelsColor(const Vec3f& c) {Planet::setLabelColor(c); void SolarSystem::setLabelsColor(const Vec3f& c)
} {
const Vec3f& SolarSystem::getLabelsColor(void) const {return Planet::getLab Planet::setLabelColor(c);
elColor();} }
const Vec3f& SolarSystem::getLabelsColor(void) const
{
return Planet::getLabelColor();
}
// Set/Get orbits lines color // Set/Get orbits lines color
void SolarSystem::setOrbitsColor(const Vec3f& c) {Planet::setOrbitColor(c); void SolarSystem::setOrbitsColor(const Vec3f& c)
} {
Vec3f SolarSystem::getOrbitsColor(void) const {return Planet::getOrbitColor Planet::setOrbitColor(c);
();} }
Vec3f SolarSystem::getOrbitsColor(void) const
{
return Planet::getOrbitColor();
}
void SolarSystem::setMajorPlanetsOrbitsColor(const Vec3f &c)
{
Planet::setMajorPlanetOrbitColor(c);
}
Vec3f SolarSystem::getMajorPlanetsOrbitsColor(void) const
{
return Planet::getMajorPlanetOrbitColor();
}
void SolarSystem::setMinorPlanetsOrbitsColor(const Vec3f &c)
{
Planet::setMinorPlanetOrbitColor(c);
}
Vec3f SolarSystem::getMinorPlanetsOrbitsColor(void) const
{
return Planet::getMinorPlanetOrbitColor();
}
void SolarSystem::setDwarfPlanetsOrbitsColor(const Vec3f &c)
{
Planet::setDwarfPlanetOrbitColor(c);
}
Vec3f SolarSystem::getDwarfPlanetsOrbitsColor(void) const
{
return Planet::getDwarfPlanetOrbitColor();
}
void SolarSystem::setMoonsOrbitsColor(const Vec3f &c)
{
Planet::setMoonOrbitColor(c);
}
Vec3f SolarSystem::getMoonsOrbitsColor(void) const
{
return Planet::getMoonOrbitColor();
}
void SolarSystem::setCubewanosOrbitsColor(const Vec3f &c)
{
Planet::setCubewanoOrbitColor(c);
}
Vec3f SolarSystem::getCubewanosOrbitsColor(void) const
{
return Planet::getCubewanoOrbitColor();
}
void SolarSystem::setPlutinosOrbitsColor(const Vec3f &c)
{
Planet::setPlutinoOrbitColor(c);
}
Vec3f SolarSystem::getPlutinosOrbitsColor(void) const
{
return Planet::getPlutinoOrbitColor();
}
void SolarSystem::setScatteredDiskObjectsOrbitsColor(const Vec3f &c)
{
Planet::setScatteredDiscObjectOrbitColor(c);
}
Vec3f SolarSystem::getScatteredDiskObjectsOrbitsColor(void) const
{
return Planet::getScatteredDiscObjectOrbitColor();
}
void SolarSystem::setOortCloudObjectsOrbitsColor(const Vec3f &c)
{
Planet::setOortCloudObjectOrbitColor(c);
}
Vec3f SolarSystem::getOortCloudObjectsOrbitsColor(void) const
{
return Planet::getOortCloudObjectOrbitColor();
}
void SolarSystem::setCometsOrbitsColor(const Vec3f& c)
{
Planet::setCometOrbitColor(c);
}
Vec3f SolarSystem::getCometsOrbitsColor(void) const
{
return Planet::getCometOrbitColor();
}
void SolarSystem::setMercuryOrbitColor(const Vec3f &c)
{
Planet::setMercuryOrbitColor(c);
}
Vec3f SolarSystem::getMercuryOrbitColor(void) const
{
return Planet::getMercuryOrbitColor();
}
void SolarSystem::setVenusOrbitColor(const Vec3f &c)
{
Planet::setVenusOrbitColor(c);
}
Vec3f SolarSystem::getVenusOrbitColor(void) const
{
return Planet::getVenusOrbitColor();
}
void SolarSystem::setEarthOrbitColor(const Vec3f &c)
{
Planet::setEarthOrbitColor(c);
}
Vec3f SolarSystem::getEarthOrbitColor(void) const
{
return Planet::getEarthOrbitColor();
}
void SolarSystem::setMarsOrbitColor(const Vec3f &c)
{
Planet::setMarsOrbitColor(c);
}
Vec3f SolarSystem::getMarsOrbitColor(void) const
{
return Planet::getMarsOrbitColor();
}
void SolarSystem::setJupiterOrbitColor(const Vec3f &c)
{
Planet::setJupiterOrbitColor(c);
}
Vec3f SolarSystem::getJupiterOrbitColor(void) const
{
return Planet::getJupiterOrbitColor();
}
void SolarSystem::setSaturnOrbitColor(const Vec3f &c)
{
Planet::setSaturnOrbitColor(c);
}
Vec3f SolarSystem::getSaturnOrbitColor(void) const
{
return Planet::getSaturnOrbitColor();
}
void SolarSystem::setUranusOrbitColor(const Vec3f &c)
{
Planet::setUranusOrbitColor(c);
}
Vec3f SolarSystem::getUranusOrbitColor(void) const
{
return Planet::getUranusOrbitColor();
}
void SolarSystem::setNeptuneOrbitColor(const Vec3f &c)
{
Planet::setNeptuneOrbitColor(c);
}
Vec3f SolarSystem::getNeptuneOrbitColor(void) const
{
return Planet::getNeptuneOrbitColor();
}
// Set/Get if Moon display is scaled // Set/Get if Moon display is scaled
void SolarSystem::setFlagMoonScale(bool b) void SolarSystem::setFlagMoonScale(bool b)
{ {
if(b!=flagMoonScale) if(b!=flagMoonScale)
{ {
if (!b) getMoon()->setSphereScale(1); if (!b) getMoon()->setSphereScale(1);
else getMoon()->setSphereScale(moonScale); else getMoon()->setSphereScale(moonScale);
flagMoonScale = b; flagMoonScale = b;
emit flagMoonScaleChanged(b); emit flagMoonScaleChanged(b);
skipping to change at line 1763 skipping to change at line 1983
} }
systemPlanets.clear(); systemPlanets.clear();
// Memory leak? What's the proper way of cleaning shared pointers? // Memory leak? What's the proper way of cleaning shared pointers?
// Also delete Comet textures (loaded in loadPlanets() // Also delete Comet textures (loaded in loadPlanets()
Comet::tailTexture.clear(); Comet::tailTexture.clear();
Comet::comaTexture.clear(); Comet::comaTexture.clear();
// Re-load the ssystem.ini file // Re-load the ssystem.ini file
loadPlanets(); loadPlanets();
computePositions(StelUtils::getJDFromSystem()); computePositions(core->getJDE());
setSelected(""); setSelected("");
recreateTrails(); recreateTrails();
// Restore observer location // Restore observer location
core->moveObserverTo(loc, 0., 0.); core->moveObserverTo(loc, 0., 0.);
// Restore flag states // Restore flag states
setFlagMoonScale(flagScaleMoon); setFlagMoonScale(flagScaleMoon);
setMoonScale(moonScale); setMoonScale(moonScale);
setFlagPlanets(flagPlanets); setFlagPlanets(flagPlanets);
skipping to change at line 1859 skipping to change at line 2079
// automatic saving of the setting // automatic saving of the setting
conf->setValue("astro/grs_jd", JD); conf->setValue("astro/grs_jd", JD);
emit customGrsJDChanged(JD); emit customGrsJDChanged(JD);
} }
double SolarSystem::getCustomGrsJD() double SolarSystem::getCustomGrsJD()
{ {
return Planet::customGrsJD; return Planet::customGrsJD;
} }
void SolarSystem::setOrbitColorStyle(QString style)
{
if (style.toLower()=="groups")
Planet::orbitColorStyle = Planet::ocsGroups;
else if (style.toLower()=="major_planets")
Planet::orbitColorStyle = Planet::ocsMajorPlanets;
else
Planet::orbitColorStyle = Planet::ocsOneColor;
}
QString SolarSystem::getOrbitColorStyle() const
{
QString r = "one_color";
switch (Planet::orbitColorStyle)
{
case Planet::ocsOneColor:
r = "one_color";
break;
case Planet::ocsGroups:
r = "groups";
break;
case Planet::ocsMajorPlanets:
r = "major_planets";
break;
}
return r;
}
double SolarSystem::getEclipseFactor(const StelCore* core) const double SolarSystem::getEclipseFactor(const StelCore* core) const
{ {
Vec3d Lp = sun->getEclipticPos(); Vec3d Lp = sun->getEclipticPos();
Vec3d P3 = core->getObserverHeliocentricEclipticPos(); Vec3d P3 = core->getObserverHeliocentricEclipticPos();
const double RS = sun->getRadius(); const double RS = sun->getRadius();
double final_illumination = 1.0; double final_illumination = 1.0;
foreach (const PlanetP& planet, systemPlanets) foreach (const PlanetP& planet, systemPlanets)
{ {
 End of changes. 11 change blocks. 
15 lines changed or deleted 276 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/