[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents

Akarsh Simha akarshsimha at gmail.com
Sat Oct 3 20:13:12 CEST 2009


SVN commit 1031008 by asimha:

Re-enable the magnitude limit filter for Deep Sky Objects. IC objects
remain unaffected by the filter as their magnitudes are not well
defined, but NGC objects are affected by the filter.

(I thought there was an open bug on our bugzilla concerning this)

CCMAIL: kstars-devel at kde.org



 M  +6 -9      deepskycomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/deepskycomponent.cpp #1031007:1031008
@@ -332,15 +332,12 @@
 
     double maglim = Options::magLimitDrawDeepSky();
 
-    //FIXME
-    //disabling faint limits until the NGC/IC catalog has reasonable mags
     //adjust maglimit for ZoomLevel
-    //double lgmin = log10(MINZOOM);
-    //double lgmax = log10(MAXZOOM);
-    //double lgz = log10(Options::zoomFactor());
-    //if ( lgz <= 0.75*lgmax ) maglim -= (Options::magLimitDrawDeepSky() - Options::magLimitDrawDeepSkyZoomOut() )*(0.75*lgmax - lgz)/(0.75*lgmax - lgmin);
-    //else
-    maglim = 40.0; //show all deep-sky objects
+    double lgmin = log10(MINZOOM);
+    double lgmax = log10(MAXZOOM);
+    double lgz = log10(Options::zoomFactor());
+    if ( lgz <= 0.75 * lgmax ) 
+        maglim -= (Options::magLimitDrawDeepSky() - Options::magLimitDrawDeepSkyZoomOut() )*(0.75*lgmax - lgz)/(0.75*lgmax - lgmin);
 
     //DrawID drawID = m_skyMesh->drawID();
     MeshIterator region( m_skyMesh, DRAW_BUF );
@@ -373,7 +370,7 @@
             //zoom > 2000.), and it's brighter than maglim (unless mag is
             //undefined (=99.9)
             if ( (size > 1.0 || Options::zoomFactor() > 2000.) &&
-                    (mag > 90.0 || mag < (float)maglim) ) {
+                 ( mag < (float)maglim || obj->isCatalogIC() ) ) {
 
                 QPointF o = map->toScreen( obj );
                 if ( ! map->onScreen( o ) ) continue;


More information about the Kstars-devel mailing list