Summary: | Large deep sky object outlines (e.g. for M31) do not always match their actual orientation in the sky | ||
---|---|---|---|
Product: | [Applications] kstars | Reporter: | Brian White <brian_white> |
Component: | general | Assignee: | kstars |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Brian White
2006-09-29 02:52:32 UTC
Confirmed. I will try to fix it today and see if I can get the fix in for 3.5.5...it's supposed to be tagged next week, so it could be tight. BTW, in trunk, the position angles don't rotate like this, but they appear to be off by 90 degrees. I'll fix that as well. Thanks for the report. SVN commit 589956 by harris: Fixing bug #134824 (Position angle of deep sky objects changes with pointing). A 90-degree adjustment to the position angles was being applied incorrectly. Thanks for the report. Also fixing a similar issue in trunk. CCMAIL: kstars-devel@kde.org BUG: 134824 M +5 -2 kstarsdata.cpp M +2 -4 skymapdraw.cpp --- branches/KDE/3.5/kdeedu/kstars/kstars/kstarsdata.cpp #589955:589956 @@ -829,13 +829,16 @@ //object type type = line.mid( 29, 1 ).toInt(); - //major and minor axes and position angle + //major and minor axes ss = line.mid( 31, 5 ); if (ss == " " ) { a = 0.0; } else { a = ss.toFloat(); } ss = line.mid( 37, 5 ); if (ss == " " ) { b = 0.0; } else { b = ss.toFloat(); } + //position angle. The catalog PA is zero when the Major axis + //is horizontal. But we want the angle measured from North, so + //we set PA = 90 - pa. ss = line.mid( 43, 3 ); - if (ss == " " ) { pa = 0; } else { pa = ss.toInt(); } + if (ss == " " ) { pa = 90; } else { pa = 90 - ss.toInt(); } //PGC number ss = line.mid( 47, 6 ); --- branches/KDE/3.5/kdeedu/kstars/kstars/skymapdraw.cpp #589955:589956 @@ -1281,8 +1281,7 @@ if ( mag > 90.0 || mag < (float)maglim ) { QPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) { - //PA for Deep-Sky objects is 90 + PA because major axis is horizontal at PA=0 - double PositionAngle = 90. - findPA( obj, o.x(), o.y(), scale ); + double PositionAngle = findPA( obj, o.x(), o.y(), scale ); //Draw Image if ( drawImage && Options::zoomFactor() > 5.*MINZOOM ) { @@ -1389,9 +1388,8 @@ starobj->draw( psky, sky, spixmap, o.x(), o.y(), true, scale ); } } else { - //PA for Deep-Sky objects is 90 + PA because major axis is horizontal at PA=0 DeepSkyObject *dso = (DeepSkyObject*)obj; - double pa = 90. + findPA( dso, o.x(), o.y(), scale ); + double pa = findPA( dso, o.x(), o.y(), scale ); dso->drawImage( psky, o.x(), o.y(), pa, Options::zoomFactor() ); psky.setBrush( NoBrush ); SVN commit 589957 by harris: Fixing problem with position angles in trunk, related to Bug #134824. CCBUG: 134824 M +6 -4 deepskycomponent.cpp --- trunk/KDE/kdeedu/kstars/kstars/skycomponents/deepskycomponent.cpp #589956:589957 @@ -101,13 +101,16 @@ //object type type = line.mid( 29, 1 ).toInt(); - //major and minor axes and position angle + //major and minor axes ss = line.mid( 31, 5 ); if (ss == " " ) { a = 0.0; } else { a = ss.toFloat(); } ss = line.mid( 37, 5 ); if (ss == " " ) { b = 0.0; } else { b = ss.toFloat(); } + //position angle. The catalog PA is zero when the Major axis + //is horizontal. But we want the angle measured from North, so + //we set PA = 90 - pa. ss = line.mid( 43, 3 ); - if (ss == " " ) { pa = 0; } else { pa = ss.toInt(); } + if (ss == " " ) { pa = 90; } else { pa = 90 - ss.toInt(); } //PGC number ss = line.mid( 47, 6 ); @@ -268,8 +271,7 @@ (mag > 90.0 || mag < (float)maglim) ) { QPointF o = map->toScreen( obj, scale ); if ( o.x() >= 0. && o.x() <= Width && o.y() >= 0. && o.y() <= Height ) { - //PA for Deep-Sky objects is 90 + PA because major axis is horizontal at PA=0 - double PositionAngle = 90. + map->findPA( obj, o.x(), o.y(), scale ); + double PositionAngle = map->findPA( obj, o.x(), o.y(), scale ); //Draw Image if ( drawImage && Options::zoomFactor() > 5.*MINZOOM ) { |