Fix behavior of DBus method setRaDec, provide a new DBus method setRaDecJ2000…

Authored by asimha on Apr 12 2020, 5:11 AM.

Description

Fix behavior of DBus method setRaDec, provide a new DBus method setRaDecJ2000, and support refraction-corrected altitudes in DBus method setAltAz

This commit does three things:

  1. Fix a mysterious behavior in setRaDec, which "overcorrected" for atmospheric refraction in some buggy way. Unlike SkyMap::setDestination, SkyMap::setClickedPoint does not seem to suffer this atmospheric refraction issue -- so using SkyMap::setClickedPoint instead of SkyMap::setDestination in the DBus method setRaDec and then calling SkyMap::slotCenter works! We largely use setClickedPoint to set the center of the star map almost everywhere across KStars (if my memory serves me right), so this is not a bad workaround.

    KStars::setRaDec now replicates the behavior of typing the same RA/Dec values in the Focus Dialog, as far as I can tell.

    However, this does not fix the behavior of SkyMap::setDestination, and why SkyMap::setDestination has this behavior is still to be investigated.
  1. A similar change to the above is also applied to DBus method org.kde.kstars.setAltAz, whereby it now replicates the behavior of the focus dialog.
  1. The behavior of the focus dialog ("Set Coordinates Manually") in setting Alt/Az coordinates manually is to assume that the supplied altitude is the true (i.e. before refraction) altitude. Which means that, if you enter an altitude of e.g. 5 degrees, the position centered will actually have apparent altitude > 5 degrees when refraction corrections are enabled.

    This same behavior is reflected in org.kde.kstars.setAltAz now. However, there may be reason to center using the refracted coordinates instead. For that, we now support an optional bool argument altIsRefracted to the DBus interface method KStars::setAltAz, that when set to true, will "do the best we can" to interpret the given altitude as the _apparent_ altitude of the center.

Finally, a bit of an administrative / logistical note: This is my
first commit after a long time. I am no longer a PhD student, and am
employed in California. Unlike in many other parts of the US,
California state law allows me to hold copyright on code written in my
personal time and on my personal equipment, as long as there is no
conflict of interest with the goals of my employment. I wish to indeed
explicitly clarify that these and future contributions that I make to
KStars are made in my personal capacity, with my personally-owned
equipment and personally-paid internet connection, and I am not
conveying any rights to any intellectual property of any third
parties.

Details

Committed
asimhaApr 12 2020, 5:30 AM
Parents
R321:4594c3d6434f: Mount box layout corrected so that everything fits well into the window
Branches
Unknown
Tags
Unknown