[Kstars-devel] branches/KDE/3.5/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Fri Sep 29 04:31:31 CEST 2006
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 at 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 );
More information about the Kstars-devel
mailing list