[Kstars-devel] Problem with getXY()
Pablo de Vicente
p.devicente at wanadoo.es
Sat Feb 14 16:48:13 CET 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
El Viernes, 13 de Febrero de 2004 22:44, Pablo de Vicente escribió:
> Hello Jason,
>
> I have almost addressed all issues concerning the angular distance
> measurement tool but I still have problems plotting the ruler. I have not
> commited the changes yet till I fix this last issue. The way I plot the
> ruler is as follows: when the angular distance mode is activated the first
> point is stored in a SkyObject called previousClickedObject. When the
> angular mode is finished the distance is computed (correctly) and to plot
> the line I create the first QPoint like this:
>
> beginRulerPoint = getXY( previousClickedPoint(), false, true);
>
> and the second one using the instruction:
>
> QPoint(e->x() , e->y() )
>
> where e is a pointer to QMouseEvent
>
> I use false for the second argument of getXY because the coordinates of
> previousClickedPoint() are stored from the RA and Dec and no explicit
> conversion is done towards Az, El. I used true for the third argument to
> apply refraction correction, but since the other argument is false, this is
> not appliable.
>
> I have debugged the code and the X,Y coordinates returned by getXY are
> incorrect, however the RA and Dec for previousClickedPoint are correct. So,
> I suppose that there is a problem with how I call function getXY.
> getXY accepts as a last argument, scale, which is = 1 by default. I do
> not know which value I should use for scale, and if this is the source of
> problems.
>
> I have noticed that the error plotting the ruler follows a pattern which
> divides the screen in two halfs, one to the left and one the right. That
> is, the artificial offset in X is different when X <0 than when X > 0.
>
> Any ideas?.
>
> regards
>
> Pablo.
Forget about it. The problem plotting the ruler was only present when using
horizontal coordinates view. When using the equatorial coordinates view the
plot was correct.
I had to compute the horizontal coordinates from the equatorial ones before
plotting. That has solved the problem.
Pablo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFALkNHSItUpHl6kJERAjgcAJ9RG2o7pMPIqangRRCVeIy+jICZegCguw7o
fwPyrQUXl4K+S+J4Ja34gms=
=lDdS
-----END PGP SIGNATURE-----
More information about the Kstars-devel
mailing list