Bug 134824 - Large deep sky object outlines (e.g. for M31) do not always match their actual orientation in the sky
Summary: Large deep sky object outlines (e.g. for M31) do not always match their actua...
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-29 02:52 UTC by Brian White
Modified: 2006-09-29 04:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian White 2006-09-29 02:52:32 UTC
Version:           1.2.4 (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs
OS:                Linux

Orientation of M31 relative to background stars appears to change depending on focus. This also appears to happen for other deep sky objects with large outlines.

To see effect, focus on M31, and it appears approximately correct. Then focus on Mirfak, and M31 appears to rotate approximately 60 degrees clockwise. Then focus on Matar and M31 appears to have rotated 30 degrees anticlockwise.

Similar effect can be seen with M33 by moving focus so that M33 is moved to the edge of the screen.

These objects have associated thumbnails, and these are not being rotated when they should. This is similar to bugs 115731 and 114605, but seems to be due to thumbnails anchoring images to screen orientation instead of being caused by incorrect data.
Comment 1 kstars 2006-09-29 03:06:51 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.
Comment 2 kstars 2006-09-29 04:31:36 UTC
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 );
Comment 3 kstars 2006-09-29 04:42:50 UTC
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 ) {