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.
2. 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.
3. 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.
4594c3d...
by
Wolfgang Reissenberger <email address hidden>
Mount box layout corrected so that everything fits well into the window
Summary:
When opening the mount control box (button top right corner of the Mount tab), some elements are partially hidden.
56051aa...
by
Eric Dejouhanet <email address hidden>
Hotfixes for the Focus module
Summary:
This differential is a hotfix for the recent work in the Focus module.
One additional class, FITSSkyObject, was extracted and put in its own source files.
The JMIndex parameter of the Centroid detection was not provided to the source extraction procedure.
The Star Profile Viewer missed a few consts in its management of FITS data buffer, which caused some Jenkins builds to fail on SUSE and FreeBSD.
4f6af9a...
by
Eric Dejouhanet <email address hidden>
Tests for the star detection
Summary:
This differential adds a few FITS load tests and benchmarks.
This alone is not enough to cover the whole detection algorithms, but is a beginning.
fd28026...
by
Eric Dejouhanet <email address hidden>
Refactoring the Focus module.
Summary:
This differential relates to tests and code structure for the Focus module.
Tests show that:
- There is no way to determine when the star detection procedure is done. The capture button should re-enable when everything is finished.
- The CCD Simulator needs improvement for some detection mechanisms to work properly.
- It is difficult to create fixtures with deterministic verifications, although better controlling the simulation time should help.
- Syncing the mount to object coordinates is a good idea to speed up tests.
- When not tracking, the CCD Simulator doesn't render trails, it could be a nice improvement.
- Because kstars_ui_tests is becoming larger, it needs to be divided into multiple smaller tests for efficiency.
- QTest, because failing a test means returning from the test function, is macro hell.
- QComboBox is difficult to control programmatically because of its internal signal management.
We then refactor star detection for clarity and consistency in Focus and attempt to reduce side-effects in FITSData:
- Make FITSData buffer read-only, except for DarkLibrary.
- Move Threshold, Gradient and Centroid detections out of FITSData.
- Move SEP detection out of FITSData.
- Docs, copyrights and adjustments.
- Removing expected failure on Gradient/Threshold.
- Adjust KTRY_EKOS_CLICK to use KTRY_EKOS_GADGET.
- Extract star search block to simplify setCaptureComplete.
- Reset KStars time after starting Ekos.
- Fix object fixture builder.
- Slight delay to overcome the weird toggling of the capture button.
- Separate/simplify annulus and threshold tests.
- Delay target chip retrieval when capture is complete.
- Test frame average, extract code averaging HFRs.