[Kstars-devel] kdeedu/kstars/kstars
Pablo de Vicente
p.devicente at wanadoo.es
Wed May 19 17:20:05 CEST 2004
CVS commit by pvicente:
Added a new module which computes the Ecliptic coordinates to/from Equatorial coordinates.
Both modes, interactive and batch mode, are operative. The conversion needs the epoch since
we need to know the obliquity of the ecliptic.
I have added to the SkyPoint class two private members which are the ecliptic longitude and
latitude. I have also added functions to retrieve these values and to set them. Most
important I have created functions EclipticToEquatorial() and EquatorialToEcliptic() which
perform the conversions. These functions are almost identical to findEcliptic() and
setFromEcliptic(), with the difference that the new ones are more object oriented, while the latter
are more typical of non-objective code.
In order not to have collisions with the functions which return and set the ecliptic coordinates
in KSPLanetBase I have chosen names which are very similar but different.
The best solution would be to remove the EquatorialToEcliptic() and EclipticToEquatorial()
functions from KSPlanetBase and all functions which retrieve and set ecliptic coordinates
in that class. We also should remove functions findEcliptic() and etFromEcliptic() from SkyPoint.
However these changes require many modifications in the following classes:
KSAsteroid, KSPlanet, KSPluto, Skypoint, KSComet, KSPlanetBase, KSSun, SkymapDraw, KSMoon
and KStarsData. I am going to investigate how to do this with breaking KStars. If someone else
volunteers...
Unfortunately some of these classes access directly the members of the KSPlanetBase class
instead of using the appropiate functions to modify these values. This fact makes harder
the modifications to be done. However from my point of view this would improve the code.
CCMAIL:kstars-devel at kde.org
A tools/modcalceclipticcoords.cpp 1.1 [GPL (v2+)]
A tools/modcalceclipticcoords.h 1.1 [GPL (v2+)]
A tools/modcalceclipticcoordsdlg.ui 1.1
M +39 -0 skypoint.cpp 1.25
M +43 -0 skypoint.h 1.20
M +1 -1 tools/Makefile.am 1.7
M +14 -0 tools/astrocalc.cpp 1.27
M +6 -1 tools/astrocalc.h 1.18
More information about the Kstars-devel
mailing list